[AMD] fix the regression issue for DeepseekV3 on MI300 (#14383)

This commit is contained in:
yctseng0211
2025-12-04 15:30:11 +08:00
committed by GitHub
parent fa78c44a3d
commit d6c490192d

View File

@@ -762,6 +762,15 @@ class Fp8MoEMethod(FusedMoEMethodBase):
w2_weight_scale, requires_grad=False
)
layer.w2_input_scale = None
if _use_aiter:
# add this section for MI300
# Pre-shuffle weights
layer.w13_weight.data = shuffle_weight(
layer.w13_weight.contiguous(), (16, 16)
)
layer.w2_weight.data = shuffle_weight(
layer.w2_weight.contiguous(), (16, 16)
)
elif _use_aiter:
# Pre-shuffle weights
layer.w13_weight.data = shuffle_weight(