[optimize] fuse renormalize into moe_topk_softmax (#7744)
Co-authored-by: ispobock <ispobaoke@gmail.com>
This commit is contained in:
@@ -30,11 +30,11 @@ def moe_align_block_size(
|
||||
def topk_softmax(
|
||||
topk_weights: torch.Tensor,
|
||||
topk_ids: torch.Tensor,
|
||||
token_expert_indices: torch.Tensor,
|
||||
gating_output: float,
|
||||
renormalize: bool = False,
|
||||
) -> None:
|
||||
torch.ops.sgl_kernel.topk_softmax.default(
|
||||
topk_weights, topk_ids, token_expert_indices, gating_output
|
||||
topk_weights, topk_ids, gating_output, renormalize
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user