CPU vs GPU - Is it reasonable?
Ältere Kommentare anzeigen
x1GPU=gpuArray.randn(3,10000);
x2GPU=gpuArray.randn(3,5000);
tic,for i=1:10000, bsxfun(@minus, x1GPU(:,i), x2GPU); end, toc
Elapsed time is 3.068520 seconds.
x1CPU=randn(3,10000);
x2CPU=randn(3,5000);
tic,for i=1:10000, bsxfun(@minus, x1CPU(:,i), x2cPU); end, toc
Elapsed time is 1.520823 seconds.
Computer Specs:
Intel Core i7 processor with 6GB of RAM
NVIDIA GT550M Graphics Card with 2GB of dedicated VRAM
Akzeptierte Antwort
Weitere Antworten (1)
Sparsh Mittal
am 6 Jun. 2015
2 Stimmen
Please see this paper accepted in ACM Computing Surveys 2015, which clarifies the "CPU vs GPU" debate and also makes a case for "CPU-GPU collaborative computing". This paper also clarifies where CPUs are good and GPUs are good.
Kategorien
Mehr zu GPU Computing finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!