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

clCreateBuffer thread safety #202

Open
kukrimate opened this issue Mar 3, 2022 · 0 comments
Open

clCreateBuffer thread safety #202

kukrimate opened this issue Mar 3, 2022 · 0 comments

Comments

@kukrimate
Copy link

By the OpenCL documentation:

All OpenCL API calls are thread-safe except clSetKernelArg. clSetKernelArg is safe to call from any host thread,
and is safe to call re-entrantly so long as concurrent calls operate on different cl_kernel objects. However, the
behavior of the cl_kernel object is undefined if clSetKernelArg is called from multiple host threads on the same
cl_kernel object at the same time. Please note that there are additional limitations as to which OpenCL APIs may be
called from OpenCL callback functions -- please see section 5.9.

oclgrind's clCreateBuffer isn't thread safe, calling it from multiple threads in an application results in heap corruption.

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

No branches or pull requests

1 participant