[cpu] Dispatch un-quantized linear to oneDNN/ACL by default for AArch64 (#27183)

Signed-off-by: Fadi Arafeh <fadi.arafeh@arm.com>
Co-authored-by: Michael Yang <Michael.Yang@arm.com>
This commit is contained in:
Fadi Arafeh
2025-10-21 02:02:58 +00:00
committed by GitHub
co-authored by Michael Yang
parent a03cf9bc70
commit 163965d183
3 changed files with 42 additions and 23 deletions
+2 -5
View File
@@ -8,7 +8,7 @@ import torch
from vllm import _custom_ops as ops
from vllm import envs
from vllm.platforms import CpuArchEnum, current_platform
from vllm.platforms import current_platform
from vllm.utils.torch_utils import direct_register_custom_op
@@ -178,10 +178,7 @@ def dispatch_cpu_unquantized_gemm(
)
if remove_weight:
layer.weight = torch.nn.Parameter(torch.empty(0), requires_grad=False)
elif ops._supports_onednn and (
current_platform.get_cpu_architecture() == CpuArchEnum.X86
or ops.is_onednn_acl_supported()
):
elif ops._supports_onednn:
origin_weight = layer.weight
if remove_weight:
layer.weight = torch.nn.Parameter(torch.empty(0), requires_grad=False)