Unverified Commit b5dfb94f authored by Li, Jiang's avatar Li, Jiang Committed by GitHub
Browse files

[CI/Build][Bugfix] Fix Qwen2.5 tests in CPU CI via fallback silu_and_mul to...


[CI/Build][Bugfix] Fix Qwen2.5 tests in CPU CI via fallback silu_and_mul to torch native implementation (#22145)
Signed-off-by: default avatarjiang1.li <jiang1.li@intel.com>
parent 6d98843b
......@@ -65,11 +65,13 @@ class SiluAndMul(CustomOp):
def __init__(self):
super().__init__()
if current_platform.is_cuda_alike() or current_platform.is_cpu():
if current_platform.is_cuda_alike():
self.op = torch.ops._C.silu_and_mul
elif current_platform.is_xpu():
from vllm._ipex_ops import ipex_ops
self.op = ipex_ops.silu_and_mul
elif current_platform.is_cpu():
self._forward_method = self.forward_native
def forward_native(self, x: torch.Tensor) -> torch.Tensor:
"""PyTorch-native implementation equivalent to forward()."""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment