cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Atmapuri
Journeyman III

Reduction and synhcronization

Hi!

I noticed that it is only possible to use a barrier to synchronize access to local memory. Is it possible to synchronize access to global memory without the need to launch a new kernel?

Thanks!
Atmapuri

0 Likes
4 Replies
nou
Exemplar

short answer is no. ther is no defined way to make global synchronization. you can experiment with global atomic but you can easily end up with locked GPU or incorect results.

0 Likes

This is something we are working on, Evergreen and later hardware provides global synchronization primitives and we are working on exposing them to OpenCL. They won't be in SDK 2.5, so don't get your hopes up about having them anytime soon.
0 Likes

Hi!

Thanks, this means that barrier works only if the kernel is small enough to execute localy? Which parameter returns the number of work items that can be executed (before kernel is enqued) so that kernel execution remains local?


Thanks!
Atmapuri

0 Likes

barriers only work inside a work group. You can divide any large problem into workgroups( size can determined by clGetKernelWorkGroupInfo) and then can acheive synchronization among each workgroup using barriers.

 

0 Likes