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
b545a0b2
Unverified
Commit
b545a0b2
authored
Oct 09, 2025
by
Boyuan Feng
Committed by
GitHub
Oct 10, 2025
Browse files
fix test_simple_inductor_graph_partition (#26522)
Signed-off-by:
Boyuan Feng
<
boyuan@meta.com
>
parent
29255cfc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
tests/compile/piecewise/test_simple.py
tests/compile/piecewise/test_simple.py
+5
-1
vllm/compilation/compiler_interface.py
vllm/compilation/compiler_interface.py
+8
-2
No files found.
tests/compile/piecewise/test_simple.py
View file @
b545a0b2
...
@@ -143,10 +143,14 @@ def test_simple_piecewise_compile(use_inductor):
...
@@ -143,10 +143,14 @@ def test_simple_piecewise_compile(use_inductor):
@
torch
.
inference_mode
()
@
torch
.
inference_mode
()
@
pytest
.
mark
.
parametrize
(
"splitting_ops"
,
[[
"silly.attention"
],
[]])
@
pytest
.
mark
.
parametrize
(
"splitting_ops"
,
[[
"silly.attention"
],
[]])
def
test_simple_inductor_graph_partition
(
splitting_ops
):
def
test_simple_inductor_graph_partition
(
splitting_ops
,
monkeypatch
):
if
not
is_torch_equal_or_newer
(
"2.9.0.dev"
):
if
not
is_torch_equal_or_newer
(
"2.9.0.dev"
):
pytest
.
skip
(
"inductor graph partition is only available in PyTorch 2.9+"
)
pytest
.
skip
(
"inductor graph partition is only available in PyTorch 2.9+"
)
# disable compile cache so that we run separately for different splitting_ops
# and get the expected number of cudagraphs captured.
monkeypatch
.
setenv
(
"VLLM_DISABLE_COMPILE_CACHE"
,
"1"
)
_run_simple_model
(
_run_simple_model
(
# Inductor graph partition automatically resets splitting_ops to an empty list
# Inductor graph partition automatically resets splitting_ops to an empty list
splitting_ops
=
splitting_ops
,
splitting_ops
=
splitting_ops
,
...
...
vllm/compilation/compiler_interface.py
View file @
b545a0b2
...
@@ -332,7 +332,10 @@ class InductorAdaptor(CompilerInterface):
...
@@ -332,7 +332,10 @@ class InductorAdaptor(CompilerInterface):
nonlocal
file_path
nonlocal
file_path
compiled_fn
=
inductor_compiled_graph
.
current_callable
compiled_fn
=
inductor_compiled_graph
.
current_callable
file_path
=
compiled_fn
.
__code__
.
co_filename
# noqa
file_path
=
compiled_fn
.
__code__
.
co_filename
# noqa
if
not
file_path
.
startswith
(
self
.
base_cache_dir
):
if
(
not
file_path
.
startswith
(
self
.
base_cache_dir
)
and
compiled_fn
.
__closure__
is
not
None
):
# hooked in the align_inputs_from_check_idxs function
# hooked in the align_inputs_from_check_idxs function
# in torch/_inductor/utils.py
# in torch/_inductor/utils.py
for
cell
in
compiled_fn
.
__closure__
:
for
cell
in
compiled_fn
.
__closure__
:
...
@@ -359,7 +362,10 @@ class InductorAdaptor(CompilerInterface):
...
@@ -359,7 +362,10 @@ class InductorAdaptor(CompilerInterface):
nonlocal
file_path
nonlocal
file_path
compiled_fn
=
inductor_compiled_graph
.
current_callable
compiled_fn
=
inductor_compiled_graph
.
current_callable
file_path
=
compiled_fn
.
__code__
.
co_filename
# noqa
file_path
=
compiled_fn
.
__code__
.
co_filename
# noqa
if
not
file_path
.
startswith
(
self
.
base_cache_dir
):
if
(
not
file_path
.
startswith
(
self
.
base_cache_dir
)
and
compiled_fn
.
__closure__
is
not
None
):
# hooked in the align_inputs_from_check_idxs function
# hooked in the align_inputs_from_check_idxs function
# in torch/_inductor/utils.py
# in torch/_inductor/utils.py
for
cell
in
compiled_fn
.
__closure__
:
for
cell
in
compiled_fn
.
__closure__
:
...
...
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