[CPU][BugFix] Multiple fixes to w4a8_int8 CPU MoE path (#46739)

Signed-off-by: Fadi Arafeh <fadi.arafeh@arm.com>
This commit is contained in:
Fadi Arafeh
2026-07-06 05:39:20 +00:00
committed by GitHub
parent 394edc8108
commit f1073c050c
10 changed files with 189 additions and 187 deletions
+18
View File
@@ -2974,6 +2974,24 @@ if hasattr(torch.ops._C, "fused_experts_cpu"):
return torch.empty_like(hidden_states)
if hasattr(torch.ops._C, "dynamic_4bit_int_moe"):
@register_fake("_C::dynamic_4bit_int_moe")
def dynamic_4bit_int_moe_fake(
x: torch.Tensor,
topk_ids: torch.Tensor,
topk_weights: torch.Tensor,
w13_packed: torch.Tensor,
w2_packed: torch.Tensor,
hidden_size: int,
intermediate_size: int,
group_size: int,
apply_router_weight_on_input: bool,
activation_kind: int,
) -> torch.Tensor:
return x.new_empty((x.size(0), hidden_size))
def fused_experts_cpu(
hidden_states: torch.Tensor,
w1: torch.Tensor,