diff --git a/vllm/compilation/decorators.py b/vllm/compilation/decorators.py index 4a4903035cf9..f9b344b84d73 100644 --- a/vllm/compilation/decorators.py +++ b/vllm/compilation/decorators.py @@ -402,8 +402,17 @@ def patched_inline_call(self_): output = self.aot_compiled_fn(self, *args, **kwargs) assert aot_compilation_path is not None assert cache_dir is not None - os.makedirs(cache_dir, exist_ok=True) - self.aot_compiled_fn.save_compiled_function(aot_compilation_path) + try: + os.makedirs(cache_dir, exist_ok=True) + self.aot_compiled_fn.save_compiled_function( + aot_compilation_path + ) + except Exception as e: + logger.warning( + "Cannot save aot compilation to path %s, error: %s", + aot_compilation_path, + str(e), + ) else: output = self.compiled_callable(*args, **kwargs) return output