Skip to content
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

[SYCL] Fix handling of interop events for barrier with waitlist #15352

Merged
merged 3 commits into from
Sep 11, 2024

Conversation

againull
Copy link
Contributor

@againull againull commented Sep 10, 2024

Currently Command::getUrEventsBlocking is responsible for preparing a waitlist of UR events for the barrier.
This method used wrong assumption that if isEnqueued() returns false for the event then it doesn't have UR handle because it was not enqueued. So if there is an associated command we would enqueue it to get the desired UR handle, or we would just ignore this event if there is no associated command.

Problem is that sycl::event created with interoperability constructor has isEnqueued() as false (as it is not enqueued by SYCL RT) but it has UR handle provided by user.
Before this patch we just ignored such event as it doesn't have associated command and we didn't put it to the resulting list.

This patch fixes this problem by handling interop events properly in this code path.

@bader
Copy link
Contributor

bader commented Sep 10, 2024

@againull, please, add explanation of the bug in the code logic this patch fixes to the PR description. This should be useful if users will find flaws in this patch. ;)

Copy link
Contributor

@uditagarwal97 uditagarwal97 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for making the changes.

@againull
Copy link
Contributor Author

@againull, please, add explanation of the bug in the code logic this patch fixes to the PR description. This should be useful if users will find flaws in this patch. ;)

Yes, added to the description.

@bader bader merged commit 811db84 into intel:sycl Sep 11, 2024
13 checks passed
@againull againull deleted the interop_barrier_fix branch September 30, 2024 20:23
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