From 608914de30380e3505810c4e01187da2f71e356f Mon Sep 17 00:00:00 2001 From: Frederik Gossen Date: Mon, 6 Apr 2026 12:37:13 -0400 Subject: [PATCH] [Core] Re-enable Inductor pre-grad passes in standalone compile (torch>=2.12) (#38944) Signed-off-by: Frederik Gossen --- vllm/compilation/compiler_interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vllm/compilation/compiler_interface.py b/vllm/compilation/compiler_interface.py index bddacfbbc..5c34d3a1b 100644 --- a/vllm/compilation/compiler_interface.py +++ b/vllm/compilation/compiler_interface.py @@ -345,9 +345,9 @@ class InductorStandaloneAdaptor(CompilerInterface): # Inductor's pre-grad passes don't do anything for vLLM. # The pre-grad passes get run even on cache-hit and negatively impact # vllm cold compile times by O(1s) - # Can remove this after the following issue gets fixed + # Fixed upstream in PyTorch 2.12: # https://github.com/pytorch/pytorch/issues/174502 - if envs.VLLM_ENABLE_PREGRAD_PASSES: + if is_torch_equal_or_newer("2.12.0.dev") or envs.VLLM_ENABLE_PREGRAD_PASSES: pregrad_ctx: Any = contextlib.nullcontext() else: pregrad_ctx = patch(