[Bugfix] Keep JIT warmup under enforce-eager when fault tolerance is on (#58593)

Signed-off-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Kimi <noreply@moonshot.cn>

Nick Hill committed Sep 24, 2026 at 12:07 UTC 074d57fce1a1f39426fdebe8b4affac02c6e749c
2 files changed +31 -7
tests/compile/test_config.py
+15
@@ -264,6 +264,21 @@ def test_enforce_eager(vllm_runner, monkeypatch):
264 pass
265
266
267 +@pytest.mark.parametrize("enable_fault_tolerance", [False, True])
268 +def test_enforce_eager_jit_warmup(enable_fault_tolerance):
269 + """Enforce-eager disables JIT warmup unless fault tolerance is on.
270 +
271 + FT fault detection runs against deadlines that in-inference Triton
272 + compilation latency spikes can blow past, so warmup stays enabled.
273 + """
274 + config = VllmConfig(
275 + model_config=ModelConfig(model="facebook/opt-125m", enforce_eager=True),
276 + parallel_config=ParallelConfig(enable_fault_tolerance=enable_fault_tolerance),
277 + )
278 + assert config.compilation_config.mode == CompilationMode.NONE
279 + assert config.kernel_config.enable_jit_warmup == enable_fault_tolerance
280 +
281 +
282 @pytest.mark.forked
283 def test_torch_compile_disable(vllm_runner, monkeypatch):
284 monkeypatch.setenv("VLLM_ENABLE_V1_MULTIPROCESSING", "0")
vllm/config/vllm.py
+16 -7
@@ -1666,15 +1666,24 @@ class VllmConfig:
1666 )
1667
1668 if self.model_config is not None and self.model_config.enforce_eager:
1669 - logger.warning_once(
1670 - "Enforce eager set, disabling torch.compile, CUDAGraphs, and JIT "
1671 - "kernel warmup. This is equivalent to setting -cc.mode=none "
1672 - "-cc.cudagraph_mode=none and "
1673 - "--kernel_config.enable_jit_warmup=False"
1674 - )
1669 self.compilation_config.mode = CompilationMode.NONE
1670 self.compilation_config.cudagraph_mode = CUDAGraphMode.NONE
1677 - self.kernel_config.enable_jit_warmup = False
1671 + if self.parallel_config.enable_fault_tolerance:
1672 + # Keep JIT warmup: in-inference Triton compilation latency
1673 + # spikes can delay peer-fault detection past its deadline.
1674 + logger.warning_once(
1675 + "Enforce eager set, disabling torch.compile and CUDAGraphs. "
1676 + "This is equivalent to setting -cc.mode=none "
1677 + "-cc.cudagraph_mode=none"
1678 + )
1679 + else:
1680 + logger.warning_once(
1681 + "Enforce eager set, disabling torch.compile, CUDAGraphs, and "
1682 + "JIT kernel warmup. This is equivalent to setting "
1683 + "-cc.mode=none -cc.cudagraph_mode=none and "
1684 + "--kernel_config.enable_jit_warmup=False"
1685 + )
1686 + self.kernel_config.enable_jit_warmup = False
1687
1688 if os.environ.get("TORCH_COMPILE_DISABLE") == "1":
1689 logger.warning_once(