add pad-aware reduce path (#48385)

Signed-off-by: gnovack <novackgm@gmail.com>
This commit is contained in:
gnovack
2026-07-14 18:05:50 -07:00
committed by GitHub
parent 442c421e79
commit f7aadae5e5
7 changed files with 239 additions and 34 deletions
+7 -2
View File
@@ -2138,8 +2138,13 @@ def wvSplitKQ(
# moe
def moe_sum(input: torch.Tensor, output: torch.Tensor):
torch.ops._moe_C.moe_sum(input, output)
def moe_sum(
input: torch.Tensor,
output: torch.Tensor,
topk_ids: torch.Tensor | None = None,
expert_map: torch.Tensor | None = None,
):
torch.ops._moe_C.moe_sum(input, output, topk_ids, expert_map)
def moe_align_block_size(