Skip to content

[SYCL] fix for __sycl_unregister_lib() on Windows and tests #19633

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: sycl
Choose a base branch
from

Conversation

cperkinsintel
Copy link
Contributor

__sycl_unregister_lib() is not being called on Windows when using shared libraries due to a limitation in LLVM/clang To work around this, on Windows we register both __sycl_register_lib() and an std::atexit handler that will call __sycl_unregister_lib() . Further, it was discovered that freeing of the device globals during device images destruction is duplicate and unnecessary. The ~context_impl destructor handles that (and handles it correctly, because a context is needed to free USM memory). So we remove the unneeded duplication. Adding a test that stresses __sycl_unregister_lib() and makes sure there are no resource leaks

Signed-off-by: Chris Perkins <[email protected]>
Signed-off-by: Chris Perkins <[email protected]>
@cperkinsintel
Copy link
Contributor Author

PVC failures is unrelated: #19662

@cperkinsintel cperkinsintel marked this pull request as ready for review August 1, 2025 00:10
@cperkinsintel cperkinsintel requested review from a team as code owners August 1, 2025 00:10
Signed-off-by: Chris Perkins <[email protected]>
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.

1 participant