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
92fea56f
Unverified
Commit
92fea56f
authored
Dec 11, 2025
by
Zhengxu Chen
Committed by
GitHub
Dec 11, 2025
Browse files
[compile] Stop one-off setting enable_aot_compile and use context manager instead. (#30503)
Signed-off-by:
zhxchen17
<
zhxchen17@fb.com
>
parent
e458270a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
vllm/compilation/wrapper.py
vllm/compilation/wrapper.py
+10
-8
No files found.
vllm/compilation/wrapper.py
View file @
92fea56f
...
...
@@ -171,15 +171,17 @@ class TorchCompileWithNoGuardsWrapper:
compiled_ptr
=
self
.
check_invariants_and_forward
aot_context
=
nullcontext
()
if
envs
.
VLLM_USE_AOT_COMPILE
:
if
hasattr
(
torch
.
_dynamo
.
config
,
"enable_aot_compile"
):
torch
.
_dynamo
.
config
.
enable_aot_compile
=
True
aot_context
=
torch
.
_dynamo
.
config
.
patch
(
enable_aot_compile
=
True
)
else
:
msg
=
"torch._dynamo.config.enable_aot_compile is not "
msg
+=
"available. AOT compile is disabled and please "
msg
+=
"upgrade PyTorch version to use AOT compile."
logger
.
warning
(
msg
)
with
aot_context
:
self
.
_compiled_callable
=
torch
.
compile
(
compiled_ptr
,
fullgraph
=
True
,
...
...
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