Error using gpuArray Maximum variable size allowed on the device is exceeded.
34 views (last 30 days)
>> X = gpuArray(X);
>> Error using gpuArray
>> Maximum variable size allowed on the device is exceeded.
My X has the size
[230227128 10] = size(X)
230227128 x 10 > 2147483647 == int32
I am using
March 8, 2019
and GPU has 45 GB (RTX 8000 48 GiB).
I am aware that there is a hard limit of GPU memory usage in Matlab.
But it is indeed discouraging and I am trying to write a C++ code to circumvent it.
Can there be a hotfix on this?
Joss Knight on 2 Nov 2020
The NVIDIA libraries that MATLAB uses to do GPU computation store array lengths as 32-bit integers and therefore MATLAB cannot use any of those libraries for arrays with more than intmax('int32') elements. Therefore this is a hard limit on the array size. Try dividing your computation up.