why GPUarray is slower than CPU?
古いコメントを表示
Hi. GPU vs CPU speed check. why GPUarray is slower than CPU? GPU : GTX 1080, CPU i7-8700K
% ----------------CPU ---------------
for m=1:100
for n=1:100
aa = rand(m,n);
bb= rand(m,n);
cc = corr2(aa,bb);
end
end
fprintf('\n CPU Run time [%2f]', toc);
% ----------------GPU ---------------
for m=1:100
for n=1:100
aaa= rand(m,n,'gpuArray');
bbb= rand(m,n,'gpuArray');
ccc = corr2(aaa,bbb);
end
end
fprintf('\n GPU Run time [%2f]', toc);
Result : CPU Run time [0.320389], GPU Run time [9.299645]
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で GPU 연산 についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!