Opt moe align block size kernel (#14133)
This commit is contained in:
@@ -165,6 +165,8 @@ def test_moe_align_block_size_compare_implementations(
|
||||
]
|
||||
|
||||
max_num_tokens_padded = topk_ids.numel() + (num_experts + 1) * (block_size - 1)
|
||||
if topk_ids.numel() < num_experts + 1:
|
||||
max_num_tokens_padded = topk_ids.numel() * block_size
|
||||
|
||||
sorted_ids_cuda = torch.empty(
|
||||
(max_num_tokens_padded,), dtype=torch.int32, device=topk_ids.device
|
||||
|
||||
Reference in New Issue
Block a user