Forum Discussion
Hi,
Yes, when the first stage in the pipeline is free, the first work-item of the next scheduled work-group will enter even though the rest of the pipeline stages are occupied by work-items from a different workgroup.
For you information, according to the document mentioned above: "the compute unit is available for work-group assignments as long as it has not reached its full capacity", the term “capacity” refers to the maximum number of threads or work-items that can execute in the CU. OpenCL HTML reports provide capacity numbers in the basic blocks (i.e. loops) of ND-range kernels to give a better picture of how work groups might be scheduled. Essentially, as soon as a basic block has enough capacity, the next available work-group and its work-items will be scheduled for that basic block. So, it’s somewhat like the second scenario you described. If the CU is simple enough though and there isn’t enough capacity for multiple work-groups to run simultaneously, then it will be like the first situation you mentioned.
Thanks