@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 177c391db2
Fork 0

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 11, 08:45 UTC

[compile] Disable aot when eager backend is used. (#30810)

Signed-off-by: zhxchen17 <zhxchen17@fb.com>

Zhengxu Chen committed Dec 17, 2025 at 04:55 UTC 177c391db2ad8dfc05906473525d4ae0a55549e0
1 file changed +9 -2
vllm/compilation/decorators.py
+9 -2
@@ -435,7 +435,10 @@ def _support_torch_compile(
435 return self.aot_compiled_fn(self, *args, **kwargs)
436
437 if self.compiled:
438 - assert not envs.VLLM_USE_AOT_COMPILE
438 + assert (
439 + not envs.VLLM_USE_AOT_COMPILE
440 + or self.vllm_config.compilation_config.backend == "eager"
441 + )
442 return TorchCompileWithNoGuardsWrapper.__call__(self, *args, **kwargs)
443
444 # This is the path for the first compilation.
@@ -508,7 +511,11 @@ def _support_torch_compile(
511 _torch27_patch_tensor_subclasses(),
512 torch._inductor.config.patch(**inductor_config_patches),
513 ):
511 - if envs.VLLM_USE_AOT_COMPILE:
514 + use_aot_compile = envs.VLLM_USE_AOT_COMPILE
515 + if self.vllm_config.compilation_config.backend == "eager":
516 + logger.warning("Detected eager backend, disabling AOT compile.")
517 + use_aot_compile = False
518 + if use_aot_compile:
519 self.aot_compiled_fn = self.aot_compile(*args, **kwargs)
520 output = self.aot_compiled_fn(self, *args, **kwargs)
521 assert aot_compilation_path is not None