[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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user