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
51ef828f
Unverified
Commit
51ef828f
authored
Jan 20, 2025
by
youkaichao
Committed by
GitHub
Jan 20, 2025
Browse files
[torch.compile] fix sym_tensor_indices (#12191)
Signed-off-by:
youkaichao
<
youkaichao@gmail.com
>
parent
df450aa5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
vllm/compilation/backends.py
vllm/compilation/backends.py
+5
-1
No files found.
vllm/compilation/backends.py
View file @
51ef828f
...
...
@@ -624,9 +624,13 @@ class VllmBackend:
]
# index of tensors that have symbolic shapes (batch size)
# for weights and static buffers, they will have concrete shapes.
# symbolic shape only happens for input tensors.
from
torch.fx.experimental.symbolic_shapes
import
is_symbolic
self
.
sym_tensor_indices
=
[
i
for
i
,
x
in
enumerate
(
fake_args
)
if
isinstance
(
x
,
torch
.
_subclasses
.
fake_tensor
.
FakeTensor
)
if
isinstance
(
x
,
torch
.
_subclasses
.
fake_tensor
.
FakeTensor
)
and
\
any
(
is_symbolic
(
d
)
for
d
in
x
.
size
())
]
# compiler managed cudagraph input buffers
...
...
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