GPU amount of availible shared memory is less that it is seemed to be

5 ビュー (過去 30 日間)
Mikhail
Mikhail 2014 年 11 月 3 日
コメント済み: Erik S. 2015 年 2 月 8 日
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

回答 (1 件)

Erik S.
Erik S. 2015 年 2 月 8 日
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 件のコメント
Erik S.
Erik S. 2015 年 2 月 8 日
For me the memory required for the matrices is: AonGPU 293 MB BonGPU 191 MB

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGPU Computing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by