[AMD] Dsv4/pr2 compressor opt (#26208)
Co-authored-by: wunhuang <wunhuang@amd.com> Co-authored-by: Thomas Wang <1am9trash@gmail.com> Co-authored-by: Xinyi Song <86638975+RolaoDenthu@users.noreply.github.com> Co-authored-by: HaiShaw <hixiao@gmail.com> Co-authored-by: amd-danli103 <danli103@amd.com> Co-authored-by: Lin, Soga <soga.lin@amd.com> Co-authored-by: Raiden-Makoto <Raiden-Makoto@users.noreply.github.com> Co-authored-by: Hubert Lu <55214931+hubertlu-tw@users.noreply.github.com> Co-authored-by: yichiche@amd.com <jacky.cheng> Co-authored-by: yctseng0211 <yctseng@amd.com> Co-authored-by: Bingxu Chen <bingxche@amd.com>
This commit is contained in:
co-authored by
wunhuang
Thomas Wang
Xinyi Song
HaiShaw
amd-danli103
Lin, Soga
Raiden-Makoto
Hubert Lu
yichiche@amd.com
yctseng0211
Bingxu Chen
parent
7c0fbc8c2e
commit
3f5e2c7688
@@ -368,6 +368,35 @@ void apply_shuffle_mul_sum(
|
||||
const torch::Tensor& permutation,
|
||||
const std::optional<torch::Tensor>& factors);
|
||||
|
||||
/*
|
||||
* From csrc/elementwise (DeepSeek-V4 norm + rope)
|
||||
*/
|
||||
void dsv4_fused_q_norm_rope(
|
||||
const at::Tensor& q_input,
|
||||
at::Tensor& q_output,
|
||||
const at::Tensor& freqs_cis,
|
||||
const at::Tensor& positions,
|
||||
double eps);
|
||||
|
||||
void dsv4_fused_k_norm_rope_flashmla(
|
||||
const at::Tensor& kv,
|
||||
const at::Tensor& kv_weight,
|
||||
const at::Tensor& freqs_cis,
|
||||
const at::Tensor& positions,
|
||||
const at::Tensor& out_loc,
|
||||
at::Tensor& kvcache,
|
||||
double eps,
|
||||
int64_t page_size);
|
||||
|
||||
void dsv4_fused_q_indexer_rope_hadamard_quant(
|
||||
const at::Tensor& q_input,
|
||||
at::Tensor& q_fp8,
|
||||
const at::Tensor& weight,
|
||||
at::Tensor& weights_out,
|
||||
double weight_scale,
|
||||
const at::Tensor& freqs_cis,
|
||||
const at::Tensor& positions);
|
||||
|
||||
void fused_qk_norm_rope(
|
||||
torch::Tensor& qkv,
|
||||
int64_t num_heads_q,
|
||||
|
||||
Reference in New Issue
Block a user