Forum Discussion
Altera_Forum
Honored Contributor
8 years agomax_work_group_size vs reqd_work_group_size
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_si...
Altera_Forum
Honored Contributor
8 years ago"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.