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

Fix a race condition when using thrust::async::sort #188

Merged
merged 2 commits into from
Oct 21, 2019

Conversation

TE-StephenTiedemann
Copy link
Contributor

@TE-StephenTiedemann TE-StephenTiedemann commented Oct 18, 2019

Thrust asynchronous sort uses a non-blocking CUDA stream that may start to work on data created on default stream before that is completely done. This PR forces the use of the default stream with the main difference compared to synchronous sort now that there is cudaStreamSynchronize instead of cudaDeviceSynchronize after each sort.

@TE-StephenTiedemann TE-StephenTiedemann added bug release-note-bugfix Auto-release; Bug fixes labels Oct 18, 2019
@TakuyaNarihira TakuyaNarihira merged commit bed050b into master Oct 21, 2019
@YukioOobuchi YukioOobuchi deleted the fix/20191016-async-sort-race-condition branch January 20, 2020 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug release-note-bugfix Auto-release; Bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants