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!