フィルターのクリア

GPU wrong results

1 回表示 (過去 30 日間)
Georgios
Georgios 2011 年 10 月 27 日
Hello, I just started using GPU with matlab and I get some strange results. I run the following code
a = rand(2^10,2^10,'single');
G = gpuArray(a);
F = fft2(G);
err = isequal(gather(G), a)
Normally the value o 'err' should be 1, but in this case is not. If you call another function, e.g. instead of fft2 call atan, then the value of err is 1. Do you have any idea why this happens?
The GPU model is "GeForce GTX 580" and the matlab version is 2010b.
Thanks a lot.
  7 件のコメント
Walter Roberson
Walter Roberson 2011 年 10 月 31 日
It appears that the German Wischi-Waschi came down to English as "wishy-washy". I had no idea of the origin of the English term before.
Georgios
Georgios 2011 年 10 月 31 日
Thank you all for your replies. The OS is ubuntu 10.4 and I think that we already use the latest driver (I will ask the administrator).

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

回答 (2 件)

Jan
Jan 2011 年 10 月 27 日
Do you expect absolutely equal results without rounding errors? This will happen as an exception only. Please check:
g = gather(G);
disp(max(abs(g(:) - a(:))));
  4 件のコメント
Jan
Jan 2011 年 10 月 31 日
A large FFT2 produces some heat on the GPU. Does this influence the local memory such that your data are simply corrupted?
Georgios
Georgios 2011 年 10 月 31 日
In my case, fft2 runs for less that a sec. I don't think this produces so much heat.

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


Thomas
Thomas 2011 年 11 月 2 日
Georgios, I ran it on our GPU pool
gpuDevice
tic ()
a = rand(2^10,2^10,'single');
G = gpuArray(a);
F = fft2(G);
err = isequal(gather(G), a)
toc ();
The output was ans =
parallel.gpu.CUDADevice handle
Package: parallel.gpu
Properties:
Name: 'Tesla M2070-Q'
Index: 1
ComputeCapability: '2.0'
SupportsDouble: 1
DriverVersion: 4.1000
MaxThreadsPerBlock: 1024
MaxShmemPerBlock: 49152
MaxThreadBlockSize: [1024 1024 64]
MaxGridSize: [65535 65535]
SIMDWidth: 32
TotalMemory: 5.6366e+09
FreeMemory: 5.5281e+09
MultiprocessorCount: 14
ClockRateKHz: 1147000
ComputeMode: 'Default'
GPUOverlapsTransfers: 1
KernelExecutionTimeout: 0
CanMapHostMemory: 1
DeviceSupported: 1
DeviceSelected: 1
err =
1
Elapsed time is 0.054194 seconds.
I am getting an err = 1 output..

カテゴリ

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