Skip to content

Commit c3c604a

Browse files
BoyuanFengMatthewBonanni
authored andcommitted
use_aot_compile should respect VLLM_DISABLE_COMPILE_CACHE (vllm-project#27698)
Signed-off-by: Boyuan Feng <boyuan@meta.com>
1 parent 6672689 commit c3c604a

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

vllm/envs.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,19 @@ def maybe_convert_bool(value: str | None) -> bool | None:
247247
return bool(int(value))
248248

249249

250+
def disable_compile_cache() -> bool:
251+
return bool(int(os.getenv("VLLM_DISABLE_COMPILE_CACHE", "0")))
252+
253+
250254
def use_aot_compile() -> bool:
251255
from vllm.utils.torch_utils import is_torch_equal_or_newer
252256

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+
254263
return os.environ.get("VLLM_USE_AOT_COMPILE", default_value) == "1"
255264

256265

@@ -963,9 +972,7 @@ def get_vllm_port() -> int | None:
963972
"VLLM_LOG_BATCHSIZE_INTERVAL": lambda: float(
964973
os.getenv("VLLM_LOG_BATCHSIZE_INTERVAL", "-1")
965974
),
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,
969976
# If set, vllm will run in development mode, which will enable
970977
# some additional endpoints for developing and debugging,
971978
# e.g. `/reset_prefix_cache`

0 commit comments

Comments
 (0)