Skip to content

Commit e3d8186

Browse files
[compile] Add fallback path to AOT compile when serialization fails. (#27350)
Signed-off-by: zhxchen17 <[email protected]> Co-authored-by: Cyrus Leung <[email protected]>
1 parent f5710ef commit e3d8186

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

vllm/compilation/decorators.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,17 @@ def patched_inline_call(self_):
403403
output = self.aot_compiled_fn(self, *args, **kwargs)
404404
assert aot_compilation_path is not None
405405
assert cache_dir is not None
406-
os.makedirs(cache_dir, exist_ok=True)
407-
self.aot_compiled_fn.save_compiled_function(aot_compilation_path)
406+
try:
407+
os.makedirs(cache_dir, exist_ok=True)
408+
self.aot_compiled_fn.save_compiled_function(
409+
aot_compilation_path
410+
)
411+
except Exception as e:
412+
logger.warning(
413+
"Cannot save aot compilation to path %s, error: %s",
414+
aot_compilation_path,
415+
str(e),
416+
)
408417
else:
409418
output = self.compiled_callable(*args, **kwargs)
410419
return output

0 commit comments

Comments
 (0)