[Bugfix][CPU] Fix DeepSeek-R1 (FP8 MLA + MoE) correctness on CPU backend (#56773)

Signed-off-by: jiang1.li <jiang1.li@intel.com>
This commit is contained in:
Li, Jiang
2026-09-14 17:30:28 +08:00
committed by GitHub
parent dc89fdfb0e
commit 79f0be21ff
2 changed files with 3 additions and 0 deletions
@@ -261,6 +261,8 @@ class CPUFp8BlockScaledMMKernel(Fp8BlockScaledMMLinearKernel):
return True, None
def process_weights_after_loading(self, layer: torch.nn.Module) -> None:
if getattr(layer, "_cpu_skip_gemm_dispatch", False):
return
# Skip the base class process (FP8 padding / fnuz normalization)
# which is GPU-oriented. Instead, VNNI-prepack weights for AMX.
params = self._get_layer_params(layer)
@@ -468,6 +468,7 @@ class CPUExpertsFp8(mk.FusedMoEExpertsModular):
RoutingMethodType.Renormalize,
RoutingMethodType.RenormalizeNaive,
RoutingMethodType.DeepseekV4,
RoutingMethodType.DeepSeekV3,
]
@staticmethod