[Bugfix] Fix topk_ids indices_type for CUTLASS w8a8 FP8 MoE (#20166)

Signed-off-by: Ming Yang <yming@meta.com>
This commit is contained in:
Ming Yang
2025-07-08 23:10:57 +00:00
committed by GitHub
parent baba0389f7
commit c438183e99
3 changed files with 17 additions and 11 deletions
@@ -78,7 +78,7 @@ class PplxPrepareAndFinalize(mk.FusedMoEPrepareAndFinalize):
return self.max_num_tokens
def topk_indices_dtype(self) -> Optional[torch.dtype]:
return torch.uint32
return torch.int32
def num_dispatchers(self) -> int:
return self.num_dispatchers_
@@ -100,7 +100,9 @@ class PplxPrepareAndFinalize(mk.FusedMoEPrepareAndFinalize):
hidden_dim = a1.size(-1) # K
assert topk_ids.size(0) == num_tokens
# assert expert_map is None, "NYI"
assert expert_map is None, """with expert map, -1 id is used for
non-local token; this causes error when casting ids to the
topk_indices_dtype() uint32"""
# Is this always going to be a1.device?
device = a1.device