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
[Hardware][POWERPC] Disable oneDNN path in vllm/model_executor/layers/utils.py for Powerpc (#27422)
Signed-off-by: Akash Kaothalkar <akash.kaothalkar@ibm.com> Co-authored-by: Akash Kaothalkar <akash.kaothalkar@ibm.com>
Akash kaothalkar committed
Oct 24, 2025 at 02:51 UTC
f417746ad7ce0d0ab810c33083195168d42b09ab
1 file changed
+5
-2
vllm/model_executor/layers/utils.py
+5
-2
@@ -8,7 +8,7 @@ import torch
8
9
from vllm import _custom_ops as ops
10
from vllm import envs
11
-from vllm.platforms import current_platform
11
+from vllm.platforms import CpuArchEnum, current_platform
12
from vllm.utils.torch_utils import direct_register_custom_op
13
14
@@ -178,7 +178,10 @@ def dispatch_cpu_unquantized_gemm(
178
)
179
if remove_weight:
180
layer.weight = torch.nn.Parameter(torch.empty(0), requires_grad=False)
181
- elif ops._supports_onednn:
181
+ elif (
182
+ ops._supports_onednn
183
+ and current_platform.get_cpu_architecture() != CpuArchEnum.POWERPC
184
+ ):
185
origin_weight = layer.weight
186
if remove_weight:
187
layer.weight = torch.nn.Parameter(torch.empty(0), requires_grad=False)