[CPU] Add fused GDN support for AMX CPU platform (#42707)

Signed-off-by: jiang1.li <jiang1.li@intel.com>
This commit is contained in:
Li, Jiang
2026-05-18 03:04:36 -07:00
committed by GitHub
parent 2267f70070
commit b4601ad43f
8 changed files with 407 additions and 14 deletions
+13
View File
@@ -233,6 +233,19 @@ def dispatch_cpu_unquantized_gemm(
layer.cpu_linear = torch.nn.functional.linear
return
if layer.weight.ndim != 2:
# this is not a linear layer
# For now it should be a causal_conv1d op
if torch.cpu._is_amx_tile_supported():
# prepack conv weight
layer.weight.data = ops.causal_conv1d_weight_pack(
layer.weight.view(
layer.weight.size(0),
layer.weight.size(2),
)
)
return
N, K = layer.weight.size()
dtype = layer.weight.dtype