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 5, 12:15 UTC
[Core] Re-enable Inductor pre-grad passes in standalone compile (torch>=2.12) (#38944)
Signed-off-by: Frederik Gossen <frgossen@meta.com>
Frederik Gossen committed
Apr 6, 2026 at 12:37 UTC
608914de30380e3505810c4e01187da2f71e356f
1 file changed
+2
-2
vllm/compilation/compiler_interface.py
+2
-2
@@ -345,9 +345,9 @@ class InductorStandaloneAdaptor(CompilerInterface):
345
# Inductor's pre-grad passes don't do anything for vLLM.
346
# The pre-grad passes get run even on cache-hit and negatively impact
347
# vllm cold compile times by O(1s)
348
- # Can remove this after the following issue gets fixed
348
+ # Fixed upstream in PyTorch 2.12:
349
# https://github.com/pytorch/pytorch/issues/174502
350
- if envs.VLLM_ENABLE_PREGRAD_PASSES:
350
+ if is_torch_equal_or_newer("2.12.0.dev") or envs.VLLM_ENABLE_PREGRAD_PASSES:
351
pregrad_ctx: Any = contextlib.nullcontext()
352
else:
353
pregrad_ctx = patch(