mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-07-18 05:57:09 +08:00
Disable the torch.compile cache checks when VLLM_DISABLE_COMPILE_CACHE=1 (#16573)
Signed-off-by: Lu Fang <lufang@fb.com>
This commit is contained in:
parent
10fd1d7380
commit
4d17e20310
@ -11,6 +11,7 @@ import torch
|
|||||||
import torch._inductor.compile_fx
|
import torch._inductor.compile_fx
|
||||||
import torch.fx as fx
|
import torch.fx as fx
|
||||||
|
|
||||||
|
import vllm.envs as envs
|
||||||
from vllm.config import VllmConfig
|
from vllm.config import VllmConfig
|
||||||
from vllm.utils import is_torch_equal_or_newer
|
from vllm.utils import is_torch_equal_or_newer
|
||||||
|
|
||||||
@ -317,10 +318,14 @@ class InductorAdaptor(CompilerInterface):
|
|||||||
inner_compile=hijacked_compile_fx_inner,
|
inner_compile=hijacked_compile_fx_inner,
|
||||||
config_patches=current_config)
|
config_patches=current_config)
|
||||||
|
|
||||||
assert hash_str is not None, (
|
# We treat VLLM_DISABLE_COMPILE_CACHE as the overall switch for torch
|
||||||
"failed to get the hash of the compiled graph")
|
# compilation cache. So turn off the checks if we disable the
|
||||||
assert file_path is not None, (
|
# compilation cache.
|
||||||
"failed to get the file path of the compiled graph")
|
if not envs.VLLM_DISABLE_COMPILE_CACHE:
|
||||||
|
assert hash_str is not None, (
|
||||||
|
"failed to get the hash of the compiled graph")
|
||||||
|
assert file_path is not None, (
|
||||||
|
"failed to get the file path of the compiled graph")
|
||||||
return compiled_graph, (hash_str, file_path)
|
return compiled_graph, (hash_str, file_path)
|
||||||
|
|
||||||
def load(self,
|
def load(self,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user