diff --git a/vllm/compilation/backends.py b/vllm/compilation/backends.py index c493a764f56..3a0b07f833a 100644 --- a/vllm/compilation/backends.py +++ b/vllm/compilation/backends.py @@ -382,6 +382,10 @@ def __call__(self, graph: fx.GraphModule, example_inputs) -> Callable: hash_content = [] for filepath in forward_code_files: hash_content.append(filepath) + if filepath == "": + # This means the function was dynamically generated, with + # e.g. exec(). We can't actually check these. + continue with open(filepath) as f: hash_content.append(f.read()) import hashlib