diff --git a/vllm/compilation/compiler_interface.py b/vllm/compilation/compiler_interface.py index 8fa8ce279deba..9293610cc2469 100644 --- a/vllm/compilation/compiler_interface.py +++ b/vllm/compilation/compiler_interface.py @@ -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)