Skip to content

Commit 7bded29

Browse files
committed
Fix inductor config
Signed-off-by: ilmarkov <markovilya197@gmail.com>
1 parent 624b7af commit 7bded29

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

vllm/compilation/backends.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,12 @@ def compile(
225225
# Let compile_fx generate a key for us
226226
maybe_key = None
227227
else:
228-
maybe_key = f"artifact_compile_range_{compile_range}_subgraph_{graph_index}"
228+
maybe_key = "artifact_compile_range_"
229+
if compile_range is None:
230+
maybe_key += "dynamic_shape"
231+
else:
232+
maybe_key += f"{compile_range[0]}_{compile_range[1]}"
233+
maybe_key += f"_subgraph_{graph_index}"
229234
with self.compile_context(compile_range):
230235
compiled_graph, handle = self.compiler.compile(
231236
graph,

vllm/compilation/compiler_interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,8 @@ def metrics_context(self) -> contextlib.AbstractContextManager:
594594

595595

596596
def set_inductor_config(config, compile_range):
597-
if isinstance(compile_range, tuple):
598-
# for a specific range of batchsizes, tuning triton kernel parameters
597+
if isinstance(compile_range, tuple) and compile_range[0] == compile_range[1]:
598+
# for a specific batch size, tuning triton kernel parameters
599599
# can be beneficial
600600
config["max_autotune"] = envs.VLLM_ENABLE_INDUCTOR_MAX_AUTOTUNE
601601
config["coordinate_descent_tuning"] = (

0 commit comments

Comments
 (0)