Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GPU Thread Synchronization Multi-Core CPU Threads with OpenCL

I have been working on GPU threads synchronization with multi-core CPU threads with OpenCL. I did see some CUDA Examples, however, I would be more clear on this concept if someone could give me some hints on the synchronization part in terms of OpenCL. Thanks in advance for any assistance on this matter.

like image 890
Harrisson Avatar asked Oct 28 '16 13:10

Harrisson


1 Answers

David Ehrmann is right on the source. I just wanted to add a few cases:

  • Barriers in cpu-devices is very slow, slowing effect is even more than speedup ratio between cpu and gpu(at least for a mid-tier amd desktop cpu and a low-end intel mobile cpu)
  • If none of the workitems in a workgroup hits a barrier,they don't have to hit it ever. An example could be early-quitting in the kernel on workgroup level where an image is processed(or not processed) in a checkerboard manner which makes alternating workgroups process or not process.(yes, this is inefficient but more complex workgroup-picking algorithms can be easy this way where some parameters or data are unknown in compile time)
  • Atomic functions are not barriers. They just access an updated(by other workitems, atomically) memory cell and update it atomically.
like image 58
huseyin tugrul buyukisik Avatar answered Oct 17 '22 15:10

huseyin tugrul buyukisik