| diff --git a/test_conformance/integer_ops/test_int_basic_ops.cpp b/test_conformance/integer_ops/test_int_basic_ops.cpp |
| index 519e5be..7b4ff08 100644 |
| --- a/test_conformance/integer_ops/test_int_basic_ops.cpp |
| +++ b/test_conformance/integer_ops/test_int_basic_ops.cpp |
| @@ -514,7 +514,7 @@ test_integer_ops_threaded(cl_device_id deviceID, cl_context context, cl_command_ |
| maxDeviceGlobalMem = (maxDeviceGlobalMem * 3) >> 2; |
| // Now reduce num_elements so that the total device memory usage does not exceed 75% of global device memory. |
| size_t type_size = get_explicit_type_size(type); |
| - while ((cl_ulong)threadcount * 4 * num_elements * type_size * vectorSize > maxDeviceGlobalMem) |
| + while ((cl_ulong)threadcount * 4 * num_elements * type_size * vectorSize > maxDeviceGlobalMem || (num_elements > 64*1024)) |
| { |
| num_elements >>= 1; |
| } |