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
dd39baf7
Unverified
Commit
dd39baf7
authored
Sep 17, 2025
by
Kunshang Ji
Committed by
GitHub
Sep 17, 2025
Browse files
[XPU] Fix xpu model runner call torch.cuda APIs (#25011)
Signed-off-by:
Kunshang Ji
<
kunshang.ji@intel.com
>
parent
43a62c51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
vllm/v1/worker/xpu_model_runner.py
vllm/v1/worker/xpu_model_runner.py
+5
-1
No files found.
vllm/v1/worker/xpu_model_runner.py
View file @
dd39baf7
...
@@ -45,8 +45,12 @@ def _torch_cuda_wrapper():
...
@@ -45,8 +45,12 @@ def _torch_cuda_wrapper():
self
.
synchronize
=
lambda
:
None
self
.
synchronize
=
lambda
:
None
try
:
try
:
# replace cuda
Event
with xpu
Event
, this should work by default
# replace cuda
APIs
with xpu
APIs
, this should work by default
torch
.
cuda
.
Event
=
torch
.
xpu
.
Event
torch
.
cuda
.
Event
=
torch
.
xpu
.
Event
torch
.
cuda
.
Stream
=
torch
.
xpu
.
Stream
torch
.
cuda
.
default_stream
=
torch
.
xpu
.
current_stream
torch
.
cuda
.
current_stream
=
torch
.
xpu
.
current_stream
torch
.
cuda
.
stream
=
torch
.
xpu
.
stream
yield
yield
finally
:
finally
:
# if anything goes wrong, just patch it with a placeholder
# if anything goes wrong, just patch it with a placeholder
...
...
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