Skip to content

Conversation

@againull
Copy link
Contributor

@againull againull commented Dec 19, 2024

PR#16056 fixed multi-device support for persistent cache but also changed format of the files in persistent cache - we used to write number of binaries before binary size and binary data but stopped doing that because we always have a single binary (for a single device) per file. Because of that new runtime stopped working with persistent cache created by older runtimes.

This PR restores the old format of files in persistent cache.

For that we need to write number of binaries to the file (before binary size and binary data) though it is always equal to 1 in current implementation. Even in the old implementation we could only put a single binary to the persistent cache in all scenarios, multi-device case wasn't supported, didn't have an API to create a program from multiple binaries. So we can assert that number of binaries is always 1 when reading from the cache.

PR#16056 fixed multi-device support for persistent cache but also
changed format of the files in persistent cache - we used to write
number of binaries before binary size and binary data but stopped doing that
because we always have a single binary (for a single device) per file. Because of that
new runtime stopped working with persistent cache created by older runtimes.

This PR restores the old format of files in persistent cache.

For that we need to write number of binaries to the file (before binary size and binary data)
though it is always equal to 1 in current implementation. Even in the old implementation
we could only put a single binary to the persistent cache in all scenarios, multi-device
case wasn't supported, didn't have an API to create a program from multiple binaries.
So we can assert that number of binaries is always 1 when reading from the cache.
@againull againull requested a review from a team as a code owner December 19, 2024 17:50
Copy link
Contributor

@cperkinsintel cperkinsintel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome

@againull againull merged commit a188950 into intel:sycl Dec 19, 2024
15 checks passed
@sarnex
Copy link
Contributor

sarnex commented Dec 19, 2024

@againull Seeing some test fails in poscommit, can you a look and revert if the fix isn't easy? Thanks

https://github.com/intel/llvm/actions/runs/12420201018/job/34677207764

@againull
Copy link
Contributor Author

againull commented Dec 19, 2024

@againull Seeing some test fails in poscommit, can you a look and revert if the fix isn't easy? Thanks

https://github.com/intel/llvm/actions/runs/12420201018/job/34677207764

Fix is easy enough, I will open a PR shortly.

UPD. PR with the fix: #16430

KornevNikita pushed a commit that referenced this pull request Feb 25, 2025
[PR#16056](#16056) fixed multi-device
support for persistent cache but also changed format of the files in
persistent cache - we used to write number of binaries before binary
size and binary data but stopped doing that because we always have a
single binary (for a single device) per file. Because of that new
runtime stopped working with persistent cache created by older runtimes.

This PR restores the old format of files in persistent cache.

For that we need to write number of binaries to the file (before binary
size and binary data) though it is always equal to 1 in current
implementation. Even in the old implementation we could only put a
single binary to the persistent cache in all scenarios, multi-device
case wasn't supported, didn't have an API to create a program from
multiple binaries. So we can assert that number of binaries is always 1
when reading from the cache.
@againull againull deleted the persistent_old_format branch September 29, 2025 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants