[ROCm][Perf] DSv3.2 MI355X TP4 decode-step orchestration cleanup (3 micro-opts) (#42982)

Signed-off-by: Frida Andersson <fanderss@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
frida-andersson
2026-05-29 04:26:57 -07:00
committed by GitHub
co-authored by Cursor
parent ab12aab127
commit 0b56815a24
2 changed files with 60 additions and 30 deletions
+2 -4
View File
@@ -304,10 +304,8 @@ class DeepseekV2MoE(nn.Module):
self.is_rocm_aiter_moe_enabled
and self.gate.e_score_correction_bias is not None
):
# AITER biased_grouped_topk requires the correction bias dtype to
# match the router logits. Keep DeepSeek's correction bias in fp32
# by requesting fp32 router logits for this routing path.
self.gate.set_out_dtype(torch.float32)
# Accumulates in fp32; avoids bf16->fp32 cast.
self.gate.set_out_dtype(self.gate.weight.dtype)
if config.n_shared_experts is None or self.is_fusion_moe_shared_experts_enabled:
self.shared_experts = None