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, 01:45 UTC
`use_aot_compile` should respect `VLLM_DISABLE_COMPILE_CACHE` (#27698)
Signed-off-by: Boyuan Feng <boyuan@meta.com>
Boyuan Feng committed
Oct 29, 2025 at 10:08 UTC
a9fe0793f2697928a0eacba9f8664646c547941c
1 file changed
+11
-4
vllm/envs.py
+11
-4
@@ -247,10 +247,19 @@ def maybe_convert_bool(value: str | None) -> bool | None:
247
return bool(int(value))
248
249
250
+def disable_compile_cache() -> bool:
251
+ return bool(int(os.getenv("VLLM_DISABLE_COMPILE_CACHE", "0")))
252
+
253
+
254
def use_aot_compile() -> bool:
255
from vllm.utils.torch_utils import is_torch_equal_or_newer
256
253
- default_value = "1" if is_torch_equal_or_newer("2.10.0.dev") else "0"
257
+ default_value = (
258
+ "1"
259
+ if is_torch_equal_or_newer("2.10.0.dev") and not disable_compile_cache()
260
+ else "0"
261
+ )
262
+
263
return os.environ.get("VLLM_USE_AOT_COMPILE", default_value) == "1"
264
265
@@ -963,9 +972,7 @@ environment_variables: dict[str, Callable[[], Any]] = {
972
"VLLM_LOG_BATCHSIZE_INTERVAL": lambda: float(
973
os.getenv("VLLM_LOG_BATCHSIZE_INTERVAL", "-1")
974
),
966
- "VLLM_DISABLE_COMPILE_CACHE": lambda: bool(
967
- int(os.getenv("VLLM_DISABLE_COMPILE_CACHE", "0"))
968
- ),
975
+ "VLLM_DISABLE_COMPILE_CACHE": disable_compile_cache,
976
# If set, vllm will run in development mode, which will enable
977
# some additional endpoints for developing and debugging,
978
# e.g. `/reset_prefix_cache`