Improve "failed to get the hash of the compiled graph" error (#18956)

Signed-off-by: rzou <zou3519@gmail.com>
This commit is contained in:
Richard Zou 2025-05-30 11:00:54 -04:00 committed by GitHub
parent b29ca5c4d5
commit 84ec470fca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -415,8 +415,14 @@ class InductorAdaptor(CompilerInterface):
# compilation cache. So turn off the checks if we disable the
# compilation cache.
if not envs.VLLM_DISABLE_COMPILE_CACHE:
assert hash_str is not None, (
"failed to get the hash of the compiled graph")
if hash_str is None:
raise RuntimeError(
"vLLM failed to compile the model. The most "
"likely reason for this is that a previous compilation "
"failed, leading to a corrupted compilation artifact. "
"We recommend trying to "
"remove ~/.cache/vllm/torch_compile_cache and try again "
"to see the real issue. ")
assert file_path is not None, (
"failed to get the file path of the compiled graph")
return compiled_graph, (hash_str, file_path)