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
46eb30f5
Unverified
Commit
46eb30f5
authored
Jan 10, 2026
by
Laith Sakka
Committed by
GitHub
Jan 10, 2026
Browse files
make assume_32_bit_indexing configurable (#32044)
Signed-off-by:
Laith Sakka
<
lsakka@meta.com
>
parent
0dd63639
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
vllm/compilation/decorators.py
vllm/compilation/decorators.py
+3
-1
vllm/config/compilation.py
vllm/config/compilation.py
+6
-0
No files found.
vllm/compilation/decorators.py
View file @
46eb30f5
...
...
@@ -522,7 +522,9 @@ def _support_torch_compile(
# assume_32bit_indexing is only available in torch 2.10.0.dev+
inductor_config_patches
=
{}
if
is_torch_equal_or_newer
(
"2.10.0.dev"
):
inductor_config_patches
[
"assume_32bit_indexing"
]
=
True
inductor_config_patches
[
"assume_32bit_indexing"
]
=
(
self
.
compilation_config
.
dynamic_shapes_config
.
assume_32_bit_indexing
)
with
(
patch
.
object
(
...
...
vllm/config/compilation.py
View file @
46eb30f5
...
...
@@ -278,7 +278,11 @@ class DynamicShapesConfig:
artifacts also.
When type is backed, aot_compile must be disabled for this mode to work.
until this change picked up https://github.com/pytorch/pytorch/pull/169239.
"""
assume_32_bit_indexing
:
bool
=
True
"""
whether all tensor sizes can use 32 bit indexing.
"""
def
compute_hash
(
self
)
->
str
:
...
...
@@ -640,6 +644,7 @@ class CompilationConfig:
"compilation_time"
,
"static_forward_context"
,
"pass_config"
,
# handled separately below
"dynamic_shapes_config"
,
# handled separately below
}
from
vllm.config.utils
import
get_hash_factors
,
hash_factors
...
...
@@ -647,6 +652,7 @@ class CompilationConfig:
factors
=
get_hash_factors
(
self
,
ignored_factors
)
factors
[
"pass_config"
]
=
self
.
pass_config
.
compute_hash
()
factors
[
"dynamic_shapes_config"
]
=
self
.
dynamic_shapes_config
.
compute_hash
()
return
hash_factors
(
factors
)
def
__repr__
(
self
)
->
str
:
...
...
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