1
votes

I have question about work-groups processing in OpenCL. If I have 10 work-groups and every work-groups has 8 work-items. Is there an strictly order of work-group processing on GPU? Are the work-groups processed from 1 to 10, or it's possible that the work-groups are processed random.

1

1 Answers

5
votes

You can't predict how the threads inside the kernel are going to be processed. You can only assure that inside a workgroup the threads will run more or less in sync, and you can use barriers.

If you need some kind of sync inside ALL your threads. Maybe its time to have 2 separate kernels, or completely change the way you are going to code your kernel.