File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff 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+
250254def 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`
You can’t perform that action at this time.
0 commit comments