openvino
24050866 - [core] Recover from model cache write failures (#35132)

Commit
39 days ago
[core] Recover from model cache write failures (#35132) ## Summary Make file-based model cache write failures recoverable and keep cache entries consistent. Before this change, a cache write failure during model export could leave an invalid cache entry and break subsequent cache use. After this change: - file-based cache writes either complete successfully or the failed cache entry is removed - recoverable cache export failures no longer fail model compilation - the cache write path stays simple and writes directly to the final blob path ### Details: - File-based cache writes directly to the final `.blob` path. - Repeated writes to the same cache entry overwrite the existing blob. - Existing blob permissions are temporarily relaxed before overwrite, then restored to read-only after a successful store. - Cache export failures are handled in `CoreImpl`, which removes the failed cache entry on caching errors. - Stream write failures remain recoverable and do not fail model compilation. - GPU export failures that surface as `ov::Exception` are also treated as recoverable cache export failures. - Other unexpected exceptions are still propagated. ### Result: - before: a cache write failure could leave a broken cache entry and break subsequent cache use - after: failed cache writes are discarded, cache state remains usable, and subsequent runs continue normally ### Tickets: - CVS-104958 ### AI Assistance: - *AI assistance used: yes*
Author
Parents
Loading