Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
d4e61945
Unverified
Commit
d4e61945
authored
Jan 17, 2025
by
Li, Jiang
Committed by
GitHub
Jan 17, 2025
Browse files
[CI/Build][CPU][Bugfix] Fix CPU CI (#12150)
Signed-off-by:
jiang1.li
<
jiang1.li@intel.com
>
parent
07934cc2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
.buildkite/run-cpu-test.sh
.buildkite/run-cpu-test.sh
+2
-2
vllm/model_executor/layers/activation.py
vllm/model_executor/layers/activation.py
+6
-2
No files found.
.buildkite/run-cpu-test.sh
View file @
d4e61945
...
...
@@ -83,6 +83,6 @@ function cpu_tests() {
tests/lora/test_qwen2vl.py"
}
# All of CPU tests are expected to be finished less than
25
mins.
# All of CPU tests are expected to be finished less than
40
mins.
export
-f
cpu_tests
timeout
3
0m bash
-c
"cpu_tests
$CORE_RANGE
$NUMA_NODE
"
timeout
4
0m bash
-c
"cpu_tests
$CORE_RANGE
$NUMA_NODE
"
vllm/model_executor/layers/activation.py
View file @
d4e61945
...
...
@@ -30,8 +30,10 @@ class FatreluAndMul(CustomOp):
def
__init__
(
self
,
threshold
:
float
=
0.
):
super
().
__init__
()
self
.
threshold
=
threshold
if
current_platform
.
is_cuda_alike
()
or
current_platform
.
is_cpu
()
:
if
current_platform
.
is_cuda_alike
():
self
.
op
=
torch
.
ops
.
_C
.
fatrelu_and_mul
elif
current_platform
.
is_cpu
():
self
.
_forward_method
=
self
.
forward_native
def
forward_native
(
self
,
x
:
torch
.
Tensor
)
->
torch
.
Tensor
:
d
=
x
.
shape
[
-
1
]
//
2
...
...
@@ -100,11 +102,13 @@ class MulAndSilu(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
.
mul_and_silu
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()."""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment