File tree 2 files changed +8
-4
lines changed
vllm/model_executor/layers 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,6 @@ function cpu_tests() {
83
83
tests/lora/test_qwen2vl.py"
84
84
}
85
85
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.
87
87
export -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):
30
30
def __init__ (self , threshold : float = 0. ):
31
31
super ().__init__ ()
32
32
self .threshold = threshold
33
- if current_platform .is_cuda_alike () or current_platform . is_cpu () :
33
+ if current_platform .is_cuda_alike ():
34
34
self .op = torch .ops ._C .fatrelu_and_mul
35
+ elif current_platform .is_cpu ():
36
+ self ._forward_method = self .forward_native
35
37
36
38
def forward_native (self , x : torch .Tensor ) -> torch .Tensor :
37
39
d = x .shape [- 1 ] // 2
@@ -100,11 +102,13 @@ class MulAndSilu(CustomOp):
100
102
101
103
def __init__ (self ):
102
104
super ().__init__ ()
103
- if current_platform .is_cuda_alike () or current_platform . is_cpu () :
105
+ if current_platform .is_cuda_alike ():
104
106
self .op = torch .ops ._C .mul_and_silu
105
107
elif current_platform .is_xpu ():
106
108
from vllm ._ipex_ops import ipex_ops
107
109
self .op = ipex_ops .silu_and_mul
110
+ elif current_platform .is_cpu ():
111
+ self ._forward_method = self .forward_native
108
112
109
113
def forward_native (self , x : torch .Tensor ) -> torch .Tensor :
110
114
"""PyTorch-native implementation equivalent to forward()."""
You can’t perform that action at this time.
0 commit comments