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
6c5f82e5
Unverified
Commit
6c5f82e5
authored
Sep 19, 2025
by
Chendi.Xue
Committed by
GitHub
Sep 20, 2025
Browse files
[BUG FIX][NON-CUDA]quick fix to avoid call cudagraph_unsafe in attention (#25298)
Signed-off-by:
Chendi Xue
<
Chendi.Xue@intel.com
>
parent
b7f186bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
vllm/attention/layer.py
vllm/attention/layer.py
+6
-2
No files found.
vllm/attention/layer.py
View file @
6c5f82e5
...
@@ -29,6 +29,10 @@ from vllm.utils import GiB_bytes, direct_register_custom_op
...
@@ -29,6 +29,10 @@ from vllm.utils import GiB_bytes, direct_register_custom_op
logger
=
init_logger
(
__name__
)
logger
=
init_logger
(
__name__
)
USE_XFORMERS_OPS
=
None
USE_XFORMERS_OPS
=
None
try
:
tag_cudagraph_unsafe
=
(
torch
.
_C
.
Tag
.
cudagraph_unsafe
,
)
except
AttributeError
:
tag_cudagraph_unsafe
=
()
# type: ignore[assignment]
def
check_xformers_availability
():
def
check_xformers_availability
():
...
@@ -577,7 +581,7 @@ direct_register_custom_op(
...
@@ -577,7 +581,7 @@ direct_register_custom_op(
mutates_args
=
[],
mutates_args
=
[],
fake_impl
=
unified_attention_fake
,
fake_impl
=
unified_attention_fake
,
dispatch_key
=
current_platform
.
dispatch_key
,
dispatch_key
=
current_platform
.
dispatch_key
,
tags
=
(
torch
.
_C
.
T
ag
.
cudagraph_unsafe
,
),
tags
=
t
ag
_
cudagraph_unsafe
,
)
)
...
@@ -628,5 +632,5 @@ direct_register_custom_op(
...
@@ -628,5 +632,5 @@ direct_register_custom_op(
mutates_args
=
[
"output"
,
"output_block_scale"
],
mutates_args
=
[
"output"
,
"output_block_scale"
],
fake_impl
=
unified_attention_with_output_fake
,
fake_impl
=
unified_attention_with_output_fake
,
dispatch_key
=
current_platform
.
dispatch_key
,
dispatch_key
=
current_platform
.
dispatch_key
,
tags
=
(
torch
.
_C
.
T
ag
.
cudagraph_unsafe
,
),
tags
=
t
ag
_
cudagraph_unsafe
,
)
)
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