Skip to content

Commit b5dfb94

Browse files
authored
[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 <[email protected]>
1 parent 6d98843 commit b5dfb94

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vllm/model_executor/layers/activation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,13 @@ class SiluAndMul(CustomOp):
6565

6666
def __init__(self):
6767
super().__init__()
68-
if current_platform.is_cuda_alike() or current_platform.is_cpu():
68+
if current_platform.is_cuda_alike():
6969
self.op = torch.ops._C.silu_and_mul
7070
elif current_platform.is_xpu():
7171
from vllm._ipex_ops import ipex_ops
7272
self.op = ipex_ops.silu_and_mul
73+
elif current_platform.is_cpu():
74+
self._forward_method = self.forward_native
7375

7476
def forward_native(self, x: torch.Tensor) -> torch.Tensor:
7577
"""PyTorch-native implementation equivalent to forward()."""

0 commit comments

Comments
 (0)