Skip to content

Commit 499b074

Browse files
authored
[Misc] refactor code by import as for torch._inductor.config (#23677)
Signed-off-by: Andy Xie <[email protected]>
1 parent ff0e59d commit 499b074

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vllm/v1/worker/cpu_model_runner.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ def __init__(self, *args, **kwargs) -> None:
138138

139139
@contextmanager
140140
def _set_global_compilation_settings(config: VllmConfig):
141-
import torch._inductor.config
141+
import torch._inductor.config as torch_inductor_config
142142

143143
inductor_config = config.compilation_config.inductor_compile_config
144144
# Note: The MKLDNN and CPPGEMM backend requires freezing parameters.
145-
freezing_value = torch._inductor.config.freezing
145+
freezing_value = torch_inductor_config.freezing
146146
try:
147147
if inductor_config.get("max_autotune", False):
148-
torch._inductor.config.freezing = True
148+
torch_inductor_config.freezing = True
149149
yield
150150
finally:
151-
torch._inductor.config.freezing = freezing_value
151+
torch_inductor_config.freezing = freezing_value

0 commit comments

Comments
 (0)