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
[CI/Build][Bugfix] Fix Qwen2.5 tests in CPU CI via fallback silu_and_mul to torch native implementation (#22145)
Signed-off-by: jiang1.li <jiang1.li@intel.com>
Li, Jiang committed
Aug 3, 2025 at 20:34 UTC
b5dfb94fa013d4488e6678ae2b0cd08576a12326
1 file changed
+3
-1
vllm/model_executor/layers/activation.py
+3
-1
@@ -65,11 +65,13 @@ class SiluAndMul(CustomOp):
65
66
def __init__(self):
67
super().__init__()
68
- if current_platform.is_cuda_alike() or current_platform.is_cpu():
68
+ if current_platform.is_cuda_alike():
69
self.op = torch.ops._C.silu_and_mul
70
elif current_platform.is_xpu():
71
from vllm._ipex_ops import ipex_ops
72
self.op = ipex_ops.silu_and_mul
73
+ elif current_platform.is_cpu():
74
+ self._forward_method = self.forward_native
75
76
def forward_native(self, x: torch.Tensor) -> torch.Tensor:
77
"""PyTorch-native implementation equivalent to forward()."""