Error using gpuArray Maximum variable size allowed on the device is exceeded.

51 vues (au cours des 30 derniers jours)
HyoSeung Kang
HyoSeung Kang le 29 Oct 2020
Commenté : John Lee le 9 Nov 2022
>> 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
R2019a (9.6.0.1072779)
64-bit (win64)
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?

Réponses (1)

Joss Knight
Joss Knight le 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.
  3 commentaires
Subhash Chandra Ranga
Subhash Chandra Ranga le 9 Août 2021
May I know how to split the data then feed it to a function and again combine the result
John Lee
John Lee le 9 Nov 2022
I am experiencing the same problem. I just started to use a A100 80GB PCIe anticipating to calculate eig() on a single very large matrix close to half of the GPU memory size. And I found this post.
The gpuArray size limit of intmax('uint32') seems to be too restrictive these days. It means I could just use 3090Ti or even 1080Ti since I don't use many gpuArray variables simultaneously.
Is there a MATLAB's plan to increase the gpuArray size limit to intmax('uint64'), or
is there a multi-step numerical algorithm to make the input matrix to eig() smaller and achieve the same end result (I doubt)?

Connectez-vous pour commenter.

Catégories

En savoir plus sur GPU Computing dans Help Center et File Exchange

Tags

Produits


Version

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by