Forum Discussion
Altera_Forum
Honored Contributor
8 years agoWork-groups' number
Hi everyone, I would like to say how I can set the number of work groups. I know the attribute "reqd_work_group_size(X,Y,Z)" allows to establish the number of W-I inside a work group (W-G's dimens...
Altera_Forum
Honored Contributor
8 years agoThe local size (number of work-items per work-group) and global size (total number of work-items) are both set in the host code and passed as arguments to clEnqueueNDRangeKernel(). The number of work-groups per dimension is equal to global size per dimension divided by local size per dimension. If you are using reqd_work_group_size() in the kernel, the local size you pass to clEnqueueNDRangeKernel() in the host code MUST match the numbers you pass to reqd_work_group_size() or else the kernel launch will fail.