[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:
co-authored by
Cursor
parent
ab12aab127
commit
0b56815a24
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user