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
f569c654
Unverified
Commit
f569c654
authored
Dec 14, 2025
by
Laith Sakka
Committed by
GitHub
Dec 14, 2025
Browse files
enable unbacked with aot_compile (#30462)
Signed-off-by:
Laith Sakka
<
lsakka@meta.com
>
parent
97f2f160
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
tests/compile/test_dynamic_shapes_compilation.py
tests/compile/test_dynamic_shapes_compilation.py
+8
-2
vllm/compilation/decorators.py
vllm/compilation/decorators.py
+0
-8
No files found.
tests/compile/test_dynamic_shapes_compilation.py
View file @
f569c654
...
@@ -36,7 +36,7 @@ def get_test_models():
...
@@ -36,7 +36,7 @@ def get_test_models():
DynamicShapesType
.
BACKED_SIZE_OBLIVIOUS
,
DynamicShapesType
.
BACKED_SIZE_OBLIVIOUS
,
],
],
)
)
@
pytest
.
mark
.
parametrize
(
"use_aot_compile"
,
[
"0"
])
@
pytest
.
mark
.
parametrize
(
"use_aot_compile"
,
[
"0"
,
"1"
])
@
pytest
.
mark
.
parametrize
(
"use_bytecode_hook"
,
[
True
,
False
])
@
pytest
.
mark
.
parametrize
(
"use_bytecode_hook"
,
[
True
,
False
])
@
pytest
.
mark
.
parametrize
(
"evaluate_guards"
,
[
False
,
True
])
@
pytest
.
mark
.
parametrize
(
"evaluate_guards"
,
[
False
,
True
])
@
pytest
.
mark
.
skipif
(
@
pytest
.
mark
.
skipif
(
...
@@ -54,6 +54,12 @@ def test_dynamic_shapes_compilation(
...
@@ -54,6 +54,12 @@ def test_dynamic_shapes_compilation(
if
use_bytecode_hook
and
shapes_type
==
DynamicShapesType
.
UNBACKED
:
if
use_bytecode_hook
and
shapes_type
==
DynamicShapesType
.
UNBACKED
:
pytest
.
skip
(
"UNBACKED dynamic shapes require VLLM_USE_BYTECODE_HOOK=0"
)
pytest
.
skip
(
"UNBACKED dynamic shapes require VLLM_USE_BYTECODE_HOOK=0"
)
if
evaluate_guards
and
shapes_type
==
DynamicShapesType
.
UNBACKED
:
pytest
.
skip
(
"unbacked dynamic shapes do not add guards"
)
if
evaluate_guards
and
use_aot_compile
:
pytest
.
skip
(
"evaluate_guards requires use_aot_compile=0"
)
monkeypatch
.
setenv
(
"VLLM_USE_AOT_COMPILE"
,
use_aot_compile
)
monkeypatch
.
setenv
(
"VLLM_USE_AOT_COMPILE"
,
use_aot_compile
)
monkeypatch
.
setenv
(
"VLLM_USE_BYTECODE_HOOK"
,
"1"
if
use_bytecode_hook
else
"0"
)
monkeypatch
.
setenv
(
"VLLM_USE_BYTECODE_HOOK"
,
"1"
if
use_bytecode_hook
else
"0"
)
...
@@ -120,7 +126,7 @@ def test_model_specialization_with_evaluate_guards(
...
@@ -120,7 +126,7 @@ def test_model_specialization_with_evaluate_guards(
and
dynamic_shapes_type
==
DynamicShapesType
.
BACKED
and
dynamic_shapes_type
==
DynamicShapesType
.
BACKED
and
evaluate_guards
and
evaluate_guards
):
):
pytest
.
skip
(
"evaluate_guards for backed does not work with aot_compile
=1"
)
pytest
.
skip
(
"evaluate_guards for backed does not work with aot_compile=1"
)
@
support_torch_compile
@
support_torch_compile
class
ModelWithSizeCheck
(
torch
.
nn
.
Module
):
class
ModelWithSizeCheck
(
torch
.
nn
.
Module
):
...
...
vllm/compilation/decorators.py
View file @
f569c654
...
@@ -390,14 +390,6 @@ def _support_torch_compile(
...
@@ -390,14 +390,6 @@ def _support_torch_compile(
serialized backend artifacts), then we need to generate a new AOT
serialized backend artifacts), then we need to generate a new AOT
compile artifact from scratch.
compile artifact from scratch.
"""
"""
# Validate that AOT compile is not used with unbacked dynamic
# shapes. aot_compile re-allocates backed symbols post dynamo!
if
ds_type
==
DynamicShapesType
.
UNBACKED
:
raise
ValueError
(
"AOT compilation is not compatible with UNBACKED dynamic shapes. "
"Please use BACKED or BACKED_SIZE_OBLIVIOUS dynamic shapes type "
"when VLLM_USE_AOT_COMPILE is enabled."
)
from
.caching
import
compilation_config_hash_factors
from
.caching
import
compilation_config_hash_factors
factors
:
list
[
str
]
=
compilation_config_hash_factors
(
self
.
vllm_config
)
factors
:
list
[
str
]
=
compilation_config_hash_factors
(
self
.
vllm_config
)
...
...
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