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
667d3de5
Commit
667d3de5
authored
Mar 26, 2026
by
zhuwenwen
Browse files
[Bugfix] Fix mock.patch resolution failure for standalone_compile.FakeTensorMode on Python <= 3.10
parent
25f2f756
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
vllm/compilation/compiler_interface.py
vllm/compilation/compiler_interface.py
+9
-2
No files found.
vllm/compilation/compiler_interface.py
View file @
667d3de5
...
...
@@ -373,8 +373,15 @@ class InductorStandaloneAdaptor(CompilerInterface):
break
if
input_fake_mode
is
not
None
:
fake_mode_ctx
:
Any
=
patch
(
"torch._inductor.standalone_compile.FakeTensorMode"
,
# Use patch.object on the actual module from sys.modules
# because in Python <=3.10 the string-based patch() resolves
# torch._inductor.standalone_compile to the wrapper function
# (defined in __init__.py) instead of the module.
import
sys
fake_mode_ctx
:
Any
=
patch
.
object
(
sys
.
modules
[
"torch._inductor.standalone_compile"
],
"FakeTensorMode"
,
lambda
*
a
,
**
kw
:
input_fake_mode
,
)
else
:
...
...
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