Affect of local_work_size on performance and why it is

自古美人都是妖i 提交于 2019-12-06 12:24:27

The local-work-size, aka work-group-size, is the number of work-items in each work-group.

Each work-group is executed on a compute-unit which is able to handle a bunch of work-items, not only one.

So when you are using too small groups you waste some computing power, and only got a coarse parallelization at the compute-unit level.

But if you have too many work-items in a group you can also lose some opportunnity for parallelization as some compute-units may not be used, whereas other would be overused.

So you could test with many values to find the best one or just let OpenCL pick a good one for you by passing NULL as the local-work-size.

PS : I'll be interested in knowing the peformance with OpenCL choice compared to your previous values, so could you please make a test and post the results. Thanks :)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!