-
Notifications
You must be signed in to change notification settings - Fork 63
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
False positive "Read-write" data race with barrier-protected global memory access #159
Comments
The name of the In OpenCL 1.x, there is no mechanism to synchronise global memory access between different work-groups. You can see from the data-race messages that Oclgrind is producing that there are two different work-groups involved in the race. |
Thank you, that is exactly what was going on. Actually I was misled by the flag CLK_GLOBAL_MEM_FENCE that, implicitly, made me think that barriers can prevent data races in global memory. |
I am running the following (minimal) example
Using the --data-races option. I obtain the following result
However, according to my understanding of the barrier mechanism, this should not happen since the function sread "protects" the read operation with two barriers. Am I missing something or is this a bug?
Thank you
PS. Code in attachment
issue-min.zip
The text was updated successfully, but these errors were encountered: