[Feature] Support DeepEP normal & Redundant Experts on NPU (#9881)

This commit is contained in:
Even Zhou
2025-09-10 20:35:26 -07:00
committed by GitHub
parent 5b7448de77
commit 5b64f006ec
15 changed files with 319 additions and 111 deletions
+8
View File
@@ -330,6 +330,14 @@ class TopK(CustomOp):
)
topk_weights = topk_weights / topk_weights_sum
if expert_location_dispatch_info is not None:
topk_ids = topk_ids_logical_to_physical(
topk_ids, expert_location_dispatch_info
)
get_global_expert_distribution_recorder().on_select_experts(
topk_ids=topk_ids
)
return StandardTopKOutput(topk_weights, topk_ids, _)
else:
self.topk_config.torch_native = True