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 race condition in OpenCL kernel #3535

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Feb 21, 2024

  1. Fix race condition in OpenCL kernel

    Without the barrier at the end of barrierOR, it is possible for
    work-item 0 to start the next loop iteration and update predicates[0]
    while other work-items are still inside barrierOR reading `predicates`,
    meaning they read the next loop iteration's exit condition. This results
    in a divergent loop, where not all work-items reach the same barriers.
    
    A previous fix identified this as a problem only on NVIDIA platforms,
    but strictly speaking a barrier is required in all cases to avoid a spec
    violation and undefined behaviour.
    frasercrmck committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    6150eee View commit details
    Browse the repository at this point in the history