Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

Work-groups' number

Altera_Forum
Honored Contributor II
864 Views

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 dimension) in three dimensions but it is not clear to me how to decide the number of these W-G. Could you help me? Thanks for your help
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
79 Views

The 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.

Altera_Forum
Honored Contributor II
79 Views

Ok thanks. Then the numbers in the attribute "reqd_work_group_size" represent the local size (in three dimensions) not the global size, is it correct? Thanks.

Altera_Forum
Honored Contributor II
79 Views

 

--- Quote Start ---  

Ok thanks. Then the numbers in the attribute "reqd_work_group_size" represent the local size (in three dimensions) not the global size, is it correct? Thanks. 

--- Quote End ---  

 

Yes, it represents the local size (also called work-group size).
Altera_Forum
Honored Contributor II
79 Views

Perfect. Thanks yor your help

Reply