How to increase the speed of submatrix data transfer using gpuArray rather than CPU?
Infos
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Afficher commentaires plus anciens
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
Réponses (2)
Walter Roberson
le 6 Avr 2016
0 votes
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.
1 commentaire
Sung Hwan Heo
le 6 Avr 2016
Joss Knight
le 15 Avr 2016
0 votes
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.
Cette question est clôturée.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!