From 51e5806d76b5e111627263d3f75c3c43e61f50d4 Mon Sep 17 00:00:00 2001 From: weichen Date: Thu, 13 Nov 2025 14:32:40 +0800 Subject: [PATCH] [0.11.0-dev][Bugfix][EPLB] Quick fix for missing log2phy conversion (#4150) ### What this PR does / why we need it? Quick fix for missing log2phy conversion in MC2 token_dispatcher, which has been already fixed in main branch https://github.com/vllm-project/vllm-ascend/pull/3512. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? e2e & ut Signed-off-by: Pr0Wh1teGivee --- vllm_ascend/ops/moe/token_dispatcher.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vllm_ascend/ops/moe/token_dispatcher.py b/vllm_ascend/ops/moe/token_dispatcher.py index 5182e9e..da9b2be 100644 --- a/vllm_ascend/ops/moe/token_dispatcher.py +++ b/vllm_ascend/ops/moe/token_dispatcher.py @@ -178,6 +178,10 @@ class TokenDispatcherWithMC2(MoETokenDispatcher): apply_router_weight_on_input: bool = False, with_quant: bool = False, dynamic_eplb: bool = False): + # Apply log2phy if needed + if log2phy is not None: + topk_ids = log2phy[topk_ids] + self.with_quant = with_quant self.expert_map = expert_map self.topk_ids = topk_ids