error in working with SVD using GPUArray: GPU failed with CUDA error status: out of memory.
2 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
Joss Knight
2016-9-30
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 GPU Computing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!