diff --git a/test_conformance/atomics/test_atomics.cpp b/test_conformance/atomics/test_atomics.cpp index 34b34ed3..c0c01363 100644 --- a/test_conformance/atomics/test_atomics.cpp +++ b/test_conformance/atomics/test_atomics.cpp @@ -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 ) {