optimize moe_align_kernel cuda (#3347)

This commit is contained in:
Xiaoyu Zhang authored and GitHub committed 2025-02-07 00:53:46 +08:00
1 parent adeee15204
commit cdae77b03d
3 files changed
+29 -21

No files matched your search

@@ -417,12 +417,12 @@ def moe_align_block_size(
num_tokens_post_pad,
)
else:
token_cnts_buffer = torch.empty(
token_cnts_buffer = torch.zeros(
(num_experts + 1) * num_experts,
dtype=torch.int32,
device=topk_ids.device,
)
cumsum_buffer = torch.empty(
cumsum_buffer = torch.zeros(
num_experts + 1, dtype=torch.int32, device=topk_ids.device
)