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
e6d811dd
Unverified
Commit
e6d811dd
authored
Aug 20, 2024
by
jianyizh
Committed by
GitHub
Aug 20, 2024
Browse files
[XPU] fallback to native implementation for xpu custom op (#7670)
parent
c4be16e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
vllm/model_executor/custom_op.py
vllm/model_executor/custom_op.py
+3
-1
No files found.
vllm/model_executor/custom_op.py
View file @
e6d811dd
...
...
@@ -30,7 +30,9 @@ class CustomOp(nn.Module):
return
self
.
forward_cuda
(
*
args
,
**
kwargs
)
def
forward_xpu
(
self
,
*
args
,
**
kwargs
):
raise
NotImplementedError
# By default, we assume that XPU ops are compatible with the
# PyTorch-native implementation.
return
self
.
forward_native
(
*
args
,
**
kwargs
)
def
forward_cpu
(
self
,
*
args
,
**
kwargs
):
# By default, we assume that CPU ops are compatible with CUDA ops.
...
...
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