Skip to content

[SYCL] Fix race that occurs when using sampler in parallel #2267

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
Aug 13, 2020

Conversation

alexanderfle
Copy link
Contributor

This patch fixes sporadic hangs caused by data race in m_contextToSampler(MContextToSampler) variable of the sampler_impl class. Adding new elements into this shared map from different threads led to a race.

  1. Added missing mutex and lock guards when accessing m_contextToSampler(MContextToSampler) variable
  2. Aligned variables names in the sampler_impl class

Signed-off-by: Alexander Flegontov [email protected]

@alexanderfle alexanderfle requested a review from a team as a code owner August 5, 2020 18:21
@alexanderfle alexanderfle requested a review from rbegam August 5, 2020 18:21
Signed-off-by: Alexander Flegontov <[email protected]>
Copy link
Contributor

@rbegam rbegam left a comment

Choose a reason for hiding this comment

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

LGTM. Would it be possible to add a test case?

@alexanderfle
Copy link
Contributor Author

alexanderfle commented Aug 12, 2020

Would it be possible to add a test case?

@rbegam, No, I think since this is a sporadic issue and we already have a test suit to check this thread safety issue.

@alexanderfle alexanderfle requested a review from rbegam August 12, 2020 06:46
@bader bader merged commit 34f0c10 into intel:sycl Aug 13, 2020
jsji pushed a commit that referenced this pull request Jan 11, 2024
…obal variable declarations (#2267)

Global variable declarations are not permitted to have no address space or addrspace(0). This PR is to document this contract.

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@e66cfea
Chenyang-L pushed a commit that referenced this pull request Feb 18, 2025
Update link for updating UNIFIED_RUNTIME_TAG in contribution doc
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