A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
Add VLLM_ENABLE_INDUCTOR_MAX_AUTOTUNE & VLLM_ENABLE_INDUCTOR_COORDINA… (#25493)
Signed-off-by: rouchenzi <ruochenwen@gmail.com> Signed-off-by: rouchenzi <40842833+rouchenzi@users.noreply.github.com>
rouchenzi committed
Sep 23, 2025 at 15:17 UTC
eca7be9077aa22e70da5c2ef04ff056e3c7bdc58
2 files changed
+18
-2
vllm/compilation/compiler_interface.py
+3
-2
@@ -551,8 +551,9 @@ def set_inductor_config(config, runtime_shape):
551
if isinstance(runtime_shape, int):
552
# for a specific batchsize, tuning triton kernel parameters
553
# can be beneficial
554
- config["max_autotune"] = True
555
- config["coordinate_descent_tuning"] = True
554
+ config["max_autotune"] = envs.VLLM_ENABLE_INDUCTOR_MAX_AUTOTUNE
555
+ config["coordinate_descent_tuning"] = (
556
+ envs.VLLM_ENABLE_INDUCTOR_COORDINATE_DESCENT_TUNING)
557
558
559
class EagerAdaptor(CompilerInterface):
vllm/envs.py
+15
@@ -193,6 +193,8 @@ if TYPE_CHECKING:
193
VLLM_DBO_COMM_SMS: int = 20
194
GPT_OSS_SYSTEM_TOOL_MCP_LABELS: list[str] = []
195
VLLM_PATTERN_MATCH_DEBUG: Optional[str] = None
196
+ VLLM_ENABLE_INDUCTOR_MAX_AUTOTUNE: bool = True
197
+ VLLM_ENABLE_INDUCTOR_COORDINATE_DESCENT_TUNING: bool = True
198
VLLM_USE_NCCL_SYMM_MEM: bool = False
199
VLLM_NCCL_INCLUDE_PATH: Optional[str] = None
200
@@ -1413,6 +1415,17 @@ environment_variables: dict[str, Callable[[], Any]] = {
1415
"code_interpreter",
1416
"web_search_preview"]),
1417
1418
+ # Enable max_autotune & coordinate_descent_tuning in inductor_config
1419
+ # to compile static shapes passed from compile_sizes in compilation_config
1420
+ # If set to 1, enable max_autotune; By default, this is enabled (1)
1421
+ "VLLM_ENABLE_INDUCTOR_MAX_AUTOTUNE":
1422
+ lambda: bool(int(os.getenv("VLLM_ENABLE_INDUCTOR_MAX_AUTOTUNE", "1"))),
1423
+ # If set to 1, enable coordinate_descent_tuning;
1424
+ # By default, this is enabled (1)
1425
+ "VLLM_ENABLE_INDUCTOR_COORDINATE_DESCENT_TUNING":
1426
+ lambda: bool(int(os.getenv("VLLM_ENABLE_INDUCTOR_COORDINATE_DESCENT_TUNING",
1427
+ "1"))),
1428
+
1429
# Flag to enable NCCL symmetric memory allocation and registration
1430
"VLLM_USE_NCCL_SYMM_MEM":
1431
lambda: bool(int(os.getenv("VLLM_USE_NCCL_SYMM_MEM", "0"))),
@@ -1513,6 +1526,8 @@ def compute_hash() -> str:
1526
"VLLM_ROCM_QUICK_REDUCE_CAST_BF16_TO_FP16",
1527
"VLLM_ROCM_QUICK_REDUCE_MAX_SIZE_BYTES_MB",
1528
"VLLM_ROCM_FP8_MFMA_PAGE_ATTN",
1529
+ "VLLM_ENABLE_INDUCTOR_MAX_AUTOTUNE",
1530
+ "VLLM_ENABLE_INDUCTOR_COORDINATE_DESCENT_TUNING",
1531
]
1532
for key in environment_variables_to_hash:
1533
# if this goes out of sync with environment_variables,