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
2faad083
Unverified
Commit
2faad083
authored
Apr 14, 2026
by
Alessandro Sangiorgi
Committed by
GitHub
Apr 14, 2026
Browse files
[compile] Nest inductor cache under AOT compile dir (#39718)
Signed-off-by:
Alessandro Sangiorgi
<
asangior@redhat.com
>
parent
23f37602
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
vllm/compilation/decorators.py
vllm/compilation/decorators.py
+10
-0
No files found.
vllm/compilation/decorators.py
View file @
2faad083
...
@@ -507,6 +507,16 @@ def _support_torch_compile(
...
@@ -507,6 +507,16 @@ def _support_torch_compile(
hash_key
,
hash_key
,
)
)
# Hash-level dir; shared across ranks on the same node.
self
.
compilation_config
.
local_cache_dir
=
cache_dir
inductor_cache
=
os
.
path
.
join
(
cache_dir
,
"inductor_cache"
)
os
.
makedirs
(
inductor_cache
,
exist_ok
=
True
)
# Process-wide: post-load execution, CUDA-graph capture, and later
# autotune/recompile all need to write under {hash}/inductor_cache/.
# Unconditional because torch's cache_dir() may have pre-filled the
# /tmp default during import, making setdefault a no-op.
os
.
environ
[
"TORCHINDUCTOR_CACHE_DIR"
]
=
inductor_cache
rank
=
self
.
vllm_config
.
parallel_config
.
rank
rank
=
self
.
vllm_config
.
parallel_config
.
rank
dp_rank
=
self
.
vllm_config
.
parallel_config
.
data_parallel_index
dp_rank
=
self
.
vllm_config
.
parallel_config
.
data_parallel_index
cache_dir
=
os
.
path
.
join
(
cache_dir
,
f
"rank_
{
rank
}
_
{
dp_rank
}
"
)
cache_dir
=
os
.
path
.
join
(
cache_dir
,
f
"rank_
{
rank
}
_
{
dp_rank
}
"
)
...
...
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