[optimize] fuse renormalize into moe_topk_softmax (#7744)

Co-authored-by: ispobock <ispobaoke@gmail.com>
This commit is contained in:
Yi Zhang
2025-07-03 12:42:44 -07:00
committed by GitHub
co-authored by ispobock
parent 6840a7bbb2
commit 2998c4bdf4
7 changed files with 254 additions and 101 deletions
+1 -4
View File
@@ -222,10 +222,7 @@ void moe_align_block_size(
bool pad_sorted_token_ids);
void topk_softmax(
torch::Tensor& topk_weights,
torch::Tensor& topk_indices,
torch::Tensor& token_expert_indices,
torch::Tensor& gating_output);
torch::Tensor& topk_weights, torch::Tensor& topk_indices, torch::Tensor& gating_output, bool renormalize);
std::vector<at::Tensor> moe_fused_gate(
at::Tensor& input,