What is the algorithm to determine optimal work group size and number of workgroup
You discover these values experimentally for your algorithm. Use a profiler to get hard numbers. I like to use CL_DEVICE_MAX_COMPUTE_UNITS as the number of work groups, because I often rely on synchronizing work items. I usually run kernels with little branching, so the take the same time to execute in each compute unit. Some multiple … Read more