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
499b074b
Unverified
Commit
499b074b
authored
Sep 01, 2025
by
Ning Xie
Committed by
GitHub
Sep 01, 2025
Browse files
[Misc] refactor code by import as for torch._inductor.config (#23677)
Signed-off-by:
Andy Xie
<
andy.xning@gmail.com
>
parent
ff0e59d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
vllm/v1/worker/cpu_model_runner.py
vllm/v1/worker/cpu_model_runner.py
+4
-4
No files found.
vllm/v1/worker/cpu_model_runner.py
View file @
499b074b
...
@@ -138,14 +138,14 @@ def _torch_cuda_wrapper():
...
@@ -138,14 +138,14 @@ def _torch_cuda_wrapper():
@
contextmanager
@
contextmanager
def
_set_global_compilation_settings
(
config
:
VllmConfig
):
def
_set_global_compilation_settings
(
config
:
VllmConfig
):
import
torch._inductor.config
import
torch._inductor.config
as
torch_inductor_config
inductor_config
=
config
.
compilation_config
.
inductor_compile_config
inductor_config
=
config
.
compilation_config
.
inductor_compile_config
# Note: The MKLDNN and CPPGEMM backend requires freezing parameters.
# Note: The MKLDNN and CPPGEMM backend requires freezing parameters.
freezing_value
=
torch
.
_inductor
.
config
.
freezing
freezing_value
=
torch_inductor
_
config
.
freezing
try
:
try
:
if
inductor_config
.
get
(
"max_autotune"
,
False
):
if
inductor_config
.
get
(
"max_autotune"
,
False
):
torch
.
_inductor
.
config
.
freezing
=
True
torch_inductor
_
config
.
freezing
=
True
yield
yield
finally
:
finally
:
torch
.
_inductor
.
config
.
freezing
=
freezing_value
torch_inductor
_
config
.
freezing
=
freezing_value
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