Skip to content

[SYCL] Clean up shared events from queues upon reaching a threshold #3068

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
merged 2 commits into from
Jan 26, 2021

Conversation

sergey-semenov
Copy link
Contributor

Previously the shared ownership of some events (USM and those without
dependencies) by queues was released only upon calls to
queue::wait/wait_and_throw(). If the application uses exclusively
event::wait() instead, those events will be kept alive until the
destruction of the queue.

The patch addresses this problem by introducing a threshold on shared
events associated with each queue. If that threshold is exceeded upon
adding a new shared event to the queue, its events are queried for
their execution status and the completed ones are released.

Previously the shared ownership of some events (USM and those without
dependencies) by queues was released only upon calls to
queue::wait/wait_and_throw(). If the application exclusively uses
event::wait() instead, those events will be kept alive until the
destruction of the queue.

The patch addresses this problem by introducing a threshold on shared
events associated with each queue. If that threshold is exceeded upon
adding a new shared event for the queue, its events are queried for
their execution status and the completed ones are released.
@sergey-semenov sergey-semenov requested a review from a team as a code owner January 21, 2021 13:44
@romanovvlad romanovvlad merged commit 461fa02 into intel:sycl Jan 26, 2021
@sergey-semenov sergey-semenov deleted the cleanupqueuesharedevents branch January 26, 2021 08: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.

2 participants