Limit workgroup size for atomics tests (#1197)

* Limit workgroup size for atomics tests

This avoids extremely large local buffer size and slow run

* Always limit workgroup size
This commit is contained in:
Senran (Stephen) Zhang
2021-09-07 00:14:36 +08:00
committed by GitHub
parent 0601c6f765
commit 34e47322db

View File

@@ -200,6 +200,10 @@ int test_atomic_function(cl_device_id deviceID, cl_context context, cl_command_q
error = clGetKernelWorkGroupInfo( kernel, deviceID, CL_KERNEL_WORK_GROUP_SIZE, sizeof( workSize ), &workSize, NULL );
test_error( error, "Unable to obtain max work group size for device and kernel combo" );
// Limit workSize to avoid extremely large local buffer size and slow
// run.
if (workSize > 65536) workSize = 65536;
// "workSize" is limited to that of the first dimension as only a 1DRange is executed.
if( maxSizes[0] < workSize )
{