error in working with SVD using GPUArray: GPU failed with CUDA error status: out of memory.

2 vues (au cours des 30 derniers jours)
Hi. I'm using GPUArray to calculate singular value decomposition (SVD) of a symmetric matrix. I'm able to calculate the SVD for a 10,000x10,000 symmetric matrix by using the standard SVD function in MATLAB and also GPUArray. However, when I used a bigger symmetric matrix with dimension 20000x20000, the standard SVD function in MATLAB works in calculating the SVD but the GPUArray does not work to calculate the SVD and I get the following error;
Error using gpuArray/svd Call to Real Double SVD on the GPU failed with CUDA error status: out of memory.
Here is the code;
N=20000
d = 1000000*rand(N,1); % The diagonal values
t = triu(bsxfun(@min,d,d.').*rand(N),1); % The upper trianglar random values
M = diag(d)+t+t.'; % Put them together in a symmetric matrix
T=gpuArray(M);
[U1,S1,V1]=svd(M);
[U2,S2,V2]=svd(T);
Could this be hardware issue (GPU device) or do I need to adjust my programming? I'm using GPU with Ubuntu Linux workstation with 64GB but the MATLAB in this workstation memory is 16GB. Do any of you have any suggestion on how I can calculate the SVD for large matrices by using GPU?

Réponse acceptée

Joss Knight
Joss Knight le 30 Sep 2016
Your GPU doesn't have enough memory for this calculation. You need to reduce the size of your problem, do some algebra to divide your problem into multiple sub-problems, or get a GPU with more memory.
  1 commentaire
arfah ahmad
arfah ahmad le 30 Sep 2016
Hi Joss. Thanks so much for your answer. I'll try as your suggested. Might be reduce the size of my matrix will be the best option at this moment

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

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

Community Treasure Hunt

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

Start Hunting!

Translated by