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,000×10,000 symmetric matrix by using the standard SVD function in MATLAB and also GPUArray. However, when I used a bigger symmetric matrix with dimension 20000×20000, 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=20000d = 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?
Best Answer