[CPU][Zen] Pass f32 weight scales to the zentorch INT8 MoE (#59434)

Signed-off-by: Ganesh R <Ganesh.R@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Douglas Lehr <91553416+dllehr-amd@users.noreply.github.com>
This commit is contained in:
Ganesh R
2026-10-01 15:51:53 +08:00
committed by GitHub
co-authored by Cursor Douglas Lehr
parent e12b735109
commit 5addde2a0a
2 changed files with 11 additions and 8 deletions
+3 -2
View File
@@ -224,8 +224,9 @@ def test_zen_int8_dispatch_contract(
call = mock_zentorch_fused_moe["fused_moe"]
assert call["w13_scales"].shape == (EXPERT_NUM, 2 * INTERMEDIATE_SIZE)
assert call["w2_scales"].shape == (EXPERT_NUM, HIDDEN_SIZE)
assert call["w13_scales"].dtype == torch.bfloat16
assert call["w2_scales"].dtype == torch.bfloat16
# f32 scales keep the layer on zentorch's fast routed MoE executor.
assert call["w13_scales"].dtype == torch.float32
assert call["w2_scales"].dtype == torch.float32
assert call["act"] == act.value.lower()
assert call["skip_weighted"] is False
assert call["topk_weights"].dtype == torch.float32