Fix EPLB mapping for TopK paths (#25285)

This commit is contained in:
xutizhou
2026-05-17 23:26:04 -07:00
committed by GitHub
parent 6ccc5b807d
commit 6a21dd20b1
2 changed files with 34 additions and 4 deletions
-4
View File
@@ -860,8 +860,6 @@ def biased_topk_impl(
topk_weights *= routed_scaling_factor
topk_weights, topk_ids = topk_weights.to(torch.float32), topk_ids.to(torch.int32)
topk_ids = topk_ids_logical_to_physical(topk_ids, expert_location_dispatch_info)
_mask_topk_ids_padded_region(topk_ids, num_token_non_padded)
return topk_weights, topk_ids
@@ -893,8 +891,6 @@ def biased_topk_jit_kernel_impl(
apply_routed_scaling_factor_on_output=apply_routed_scaling_factor_on_output,
)
topk_weights, topk_ids = topk_weights.to(torch.float32), topk_ids.to(torch.int32)
topk_ids = topk_ids_logical_to_physical(topk_ids, expert_location_dispatch_info)
_mask_topk_ids_padded_region(topk_ids, num_token_non_padded)
return topk_weights, topk_ids