You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@posch and I noted for the CUDA version of the benchmarks that large array sizes cause an integer overflow in the check whether the required amount of memory exceeds the GPUs global memory capacity:
if (props.totalGlobalMem < 3*ARRAY_SIZE*sizeof(T))
throwstd::runtime_error("Device does not have enough memory for all 3 buffers");
On a x86_64 system with Linux (and GCC 8.3) an "large enough" array size of, e.g., 1024^3 causes an overflow when multiplied with three. The resulting (negative) value is then sign extended/promoted to (unsigned) size_t and compared with the memory capacity. The comparison shown above returns true even if the device in use has 40 GB or more of memory and could therefore provide the space for the three arrays.
This may affect not only the CUDA version of the benchmark.
The text was updated successfully, but these errors were encountered:
Hi,
@posch and I noted for the CUDA version of the benchmarks that large array sizes cause an integer overflow in the check whether the required amount of memory exceeds the GPUs global memory capacity:
BabelStream/src/cuda/CUDAStream.cu
Lines 53 to 55 in e21134d
On a x86_64 system with Linux (and GCC 8.3) an "large enough" array size of, e.g., 1024^3 causes an overflow when multiplied with three. The resulting (negative) value is then sign extended/promoted to (unsigned)
size_t
and compared with the memory capacity. The comparison shown above returns true even if the device in use has 40 GB or more of memory and could therefore provide the space for the three arrays.This may affect not only the CUDA version of the benchmark.
The text was updated successfully, but these errors were encountered: