From 85be04978d76843635690300246aaf2f29a307fa Mon Sep 17 00:00:00 2001 From: karverma-amd Date: Mon, 28 Sep 2026 05:21:57 -0500 Subject: [PATCH] [AMD][DSV4] moe: enable shared-expert fusion on the grouped-topk path (megamoe) (#40943) --- python/sglang/srt/layers/moe/topk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sglang/srt/layers/moe/topk.py b/python/sglang/srt/layers/moe/topk.py index c3eb309af9..a4b6541f64 100644 --- a/python/sglang/srt/layers/moe/topk.py +++ b/python/sglang/srt/layers/moe/topk.py @@ -2556,7 +2556,7 @@ def select_experts( renormalize=renormalize, num_expert_group=num_expert_group, topk_group=topk_group, - num_fused_shared_experts=num_fused_shared_experts, + num_fused_shared_experts=num_fused_shared_experts_for_gate, routed_scaling_factor=routed_scaling_factor, apply_routed_scaling_factor_on_output=apply_routed_scaling_factor_on_output, scoring_func=scoring_func, @@ -2570,7 +2570,7 @@ def select_experts( renormalize=renormalize, num_expert_group=num_expert_group, topk_group=topk_group, - num_fused_shared_experts=num_fused_shared_experts, + num_fused_shared_experts=num_fused_shared_experts_for_gate, routed_scaling_factor=routed_scaling_factor, apply_routed_scaling_factor_on_output=apply_routed_scaling_factor_on_output, )