Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17267 Discussions

max_work_group_size vs reqd_work_group_size

Altera_Forum
Honored Contributor II
2,195 Views

Hello, 

Can anybody tell what is real difference between these two attributes: max_work_group_size and reqd_work_group_size? 

for example between max_work_group_size(256) and reqd_work_group_size(256)? Is there any benefit in using reqd_work_group_size, while max_work_group_size is a super-set of it?  

I guessed the reqd_work_group_size leads to more optimized hardware, but after some tests I saw even the hardware size did not change that much. 

thanks
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
1,125 Views

"max_work_group_size" is for cases where you want to change your work-group size at runtime, but you know the maximum limit for the work-group size and hence, supply the compiler with this info to prevent excessive local memory allocation. "reqd_work_group_size" is for cases where you are absolutely sure your work-group size is fixed at runtime, and supply the compiler with this info to minimize area utilization. In this case, if you try to invoke the kernel with a work-group size that is different from what is set in the kernel, you will get a runtime error. These attributes mainly affect local memory utilization and if you are not using local memory in your kernel, the area utilization difference will be minimal.

0 Kudos
Reply