@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 8c1d4acbfe
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 14, 05:30 UTC

[CPU] Disable oneDNN linear on non-x86 platforms (#25166)

Signed-off-by: jiang1.li <jiang1.li@intel.com>

Li, Jiang committed Sep 19, 2025 at 15:27 UTC 8c1d4acbfe70a1dffdb9a3db57b4d12329350295
1 file changed +3 -2
vllm/model_executor/layers/utils.py
+3 -2
@@ -7,7 +7,7 @@ import torch
7
8 from vllm import _custom_ops as ops
9 from vllm import envs
10 -from vllm.platforms import current_platform
10 +from vllm.platforms import CpuArchEnum, current_platform
11 from vllm.utils import direct_register_custom_op
12
13
@@ -167,7 +167,8 @@ def dispatch_cpu_unquantized_gemm(
167 if remove_weight:
168 layer.weight = torch.nn.Parameter(torch.empty(0),
169 requires_grad=False)
170 - elif ops._supports_onednn:
170 + elif (ops._supports_onednn
171 + and current_platform.get_cpu_architecture() == CpuArchEnum.X86):
172 origin_weight = layer.weight
173 if remove_weight:
174 layer.weight = torch.nn.Parameter(torch.empty(0),