Skip to content

[SYCL] Avoid datarace when waiting on the same event in multiple threads #1803

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 1 commit into from
Jun 10, 2020
Merged

[SYCL] Avoid datarace when waiting on the same event in multiple threads #1803

merged 1 commit into from
Jun 10, 2020

Conversation

dnmokhov
Copy link
Contributor

@dnmokhov dnmokhov commented Jun 2, 2020

One thread could acquire shared access in waitForEvent after another
thread executed cleanupFinishedCommands (which has exclusive access).
This resulted in "Event has no associated command?" assertion failure
in GraphProcessor::waitForEvent.

Signed-off-by: Dmitri Mokhov [email protected]

@dnmokhov dnmokhov requested a review from a team as a code owner June 2, 2020 14:06
@dnmokhov dnmokhov requested review from rbegam and dm-vodopyanov and removed request for rbegam June 2, 2020 14:06
Copy link
Contributor

@romanovvlad romanovvlad left a comment

Choose a reason for hiding this comment

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

Thanks! Please add a test.

One thread could acquire shared access in `waitForEvent` after another
thread executed `cleanupFinishedCommands` (which has exclusive access).
This resulted in "Event has no associated command?" assertion failure
in `GraphProcessor::waitForEvent`.

Signed-off-by: Dmitri Mokhov <[email protected]>
@dnmokhov dnmokhov requested review from romanovvlad and s-kanaev June 9, 2020 02:55
@bader bader merged commit 5737ad9 into intel:sycl Jun 10, 2020
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.

4 participants