필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to increase the speed of submatrix data transfer using gpuArray rather than CPU?

조회 수: 1 (최근 30일)
Sung Hwan Heo
Sung Hwan Heo 2016년 4월 6일
마감: MATLAB Answer Bot 2021년 8월 20일
Hello. My problem is... How can I reduce the difference btw. them? The size of matrix is smaller than 1000 by 1000. If possible (whether this is intrinsic limitation) please tell me a proper method.
A = rand(512);
gA = gpuArray(A);
tic; B = A(50:100,50:100); toc
tic; gB = gA(50:100,50:100); toc

답변 (2개)

Walter Roberson
Walter Roberson 2016년 4월 6일
Instead of using tic and toc, use timeit() for the first case, and gputimeit() for the second case. Those will give you more accurate times.

Joss Knight
Joss Knight 2016년 4월 15일
I think the problem is intrinsic. Even on my Kepler K20c the GPU is slower for this case. This is a memory intensive non-coherent operation and you don't have enough data.
Best solution: Try to do more! Perhaps if you're doing this same indexing to multiple matrices, you should do them all at once, for instance.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by