File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
vllm/model_executor/layers Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,6 @@ function cpu_tests() {
8383 tests/lora/test_qwen2vl.py"
8484}
8585
86- # All of CPU tests are expected to be finished less than 25 mins.
86+ # All of CPU tests are expected to be finished less than 40 mins.
8787export -f cpu_tests
88- timeout 30m bash -c " cpu_tests $CORE_RANGE $NUMA_NODE "
88+ timeout 40m bash -c " cpu_tests $CORE_RANGE $NUMA_NODE "
Original file line number Diff line number Diff line change @@ -30,8 +30,10 @@ class FatreluAndMul(CustomOp):
3030 def __init__ (self , threshold : float = 0. ):
3131 super ().__init__ ()
3232 self .threshold = threshold
33- if current_platform .is_cuda_alike () or current_platform . is_cpu () :
33+ if current_platform .is_cuda_alike ():
3434 self .op = torch .ops ._C .fatrelu_and_mul
35+ elif current_platform .is_cpu ():
36+ self ._forward_method = self .forward_native
3537
3638 def forward_native (self , x : torch .Tensor ) -> torch .Tensor :
3739 d = x .shape [- 1 ] // 2
@@ -100,11 +102,13 @@ class MulAndSilu(CustomOp):
100102
101103 def __init__ (self ):
102104 super ().__init__ ()
103- if current_platform .is_cuda_alike () or current_platform . is_cpu () :
105+ if current_platform .is_cuda_alike ():
104106 self .op = torch .ops ._C .mul_and_silu
105107 elif current_platform .is_xpu ():
106108 from vllm ._ipex_ops import ipex_ops
107109 self .op = ipex_ops .silu_and_mul
110+ elif current_platform .is_cpu ():
111+ self ._forward_method = self .forward_native
108112
109113 def forward_native (self , x : torch .Tensor ) -> torch .Tensor :
110114 """PyTorch-native implementation equivalent to forward()."""
You can’t perform that action at this time.
0 commit comments