Skip to content

[SYCL] Release global shared implementation pointers early #4786

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

Merged

Conversation

steffenlarsen
Copy link
Contributor

Currently the global handler keeps shared pointers to SYCL object implementations alive until an intentionally late destruction. Backends that rely on global state may destroy its global state prior to the global handler releasing its references to SYCL object implementations that are in turn keeping backend objects alive.
These changes enforce a release of the global handler's references to globally tracked SYCL objects at regular global destructor time to avoid the objects unintentionally staying alive for too long.

Currently the global handler keeps shared pointers to SYCL object
implementations alive until an intentionally late destruction. Backends
that rely on global state may destroy its global state prior to the
global handler releasing its references to SYCL object implementations
that are in turn keeping backend objects alive.
These changes enforce a release of the global handler's references to
globally tracked SYCL objects at regular global destructor time to
avoid the objects unintentionally staying alive for too long.

Signed-off-by: Steffen Larsen <[email protected]>
@steffenlarsen steffenlarsen requested a review from a team as a code owner October 19, 2021 11:54
Copy link
Contributor

@s-kanaev s-kanaev left a comment

Choose a reason for hiding this comment

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

LGTM

@bader bader merged commit 7575853 into intel:sycl Oct 19, 2021
@steffenlarsen steffenlarsen deleted the steffen/early_global_shared_implptr_release branch December 6, 2023 11:38
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