GPU amount of availible shared memory is less that it is seemed to be
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi all, I am just started to use GPU. So, I tried to compute example from http://www.mathworks.com/products/parallel-computing/tutorials.html
Basically, it is:
A = magic(5000);
f = ones(1,20)/20;
AonGPU = gpuArray(A);
BonGPU = filter(f, 1, AonGPU);
This is from tutorial video. But in my machine I got error:
Error using parallel.gpu.GPUArray/filter An unexpected error occurred trying to launch a kernel. The CUDA error was: CUDA_ERROR_INVALID_VALUE.
I figured out that this is due to the lack of memory: if I use A = magic(3000) instead there is no error.
Now, I checked - size of array A= magic(5000) is 200 megabytes. The same size on gpu has array AonGPU -
I checked it with the help of gpuDevice command. My Graphics card is Nvidia Geforce 650 Ti with 1 GB
memory.
However, only about 700 mb is availible (gpuDevice). Nevertheless, 200 mb is less then 700 mb. Also my array BonGPU
should be 200 mb (sizes are equal), but still 400 mb is less then 700 mb.
Why it happens?
Second, if you use are using GPU calculations, please provide what Graphics card do you have.
Thanks,
Mikhail
0 comentarios
Respuestas (1)
Erik S.
el 8 de Feb. de 2015
Hi,
I tried your code with A=magic(5000); It works on my Gpu. I am using a Nvidia Geforce GT 640M, with 2 GB memory. What functions do you use to check the available Gpu memory?
1 comentario
Erik S.
el 8 de Feb. de 2015
For me the memory required for the matrices is: AonGPU 293 MB BonGPU 191 MB
Ver también
Categorías
Más información sobre GPU Computing en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!