Borrar filtros
Borrar filtros

accessing data while working on gpu

1 visualización (últimos 30 días)
bazrafshan88@gmail.com
bazrafshan88@gmail.com el 10 de Ag. de 2017
Editada: Joss Knight el 10 de Ag. de 2017
Hi everyone
I am going to use a gpu to speed the fft2 command during an iteration which includes around 10,000,000 times calling fft2. Unfortunately, for each iteration, I need the fft2 output matrix to manipulate its elements. So, using gather command is an option. However, calling this command for each iteration devastates the performance of fft2 on gpu and the desired speed up cannot be reached.
It might sound stupid, but is there any other way to have access to the output at each iteration and reach to some extent such a high speed up? Is it possible to access the matrix element on the gpu and not back into the cpu?
Any answer is highly appreciated.
Mohammad
  3 comentarios
José-Luis
José-Luis el 10 de Ag. de 2017
If running (and that includes getting back results) your operation takes longer on the GPU then it takes longer on the GPU. It's just the way things are.
Might be that the Mathworks has done a bad job of coding the routine you are interested in and then you could get better improvements (and get rid of overheads) by coding it yourself. Might need to learn CUDA or OpenCL for that.
Having said that. Are you really sure you need to get intermediate data back? Can't you aggregate (or whatever it is you are doing) on the GPU? What is your objective?
Joss Knight
Joss Knight el 10 de Ag. de 2017
Editada: Joss Knight el 10 de Ag. de 2017
Can you explain better what the problem is? You don't have to call gather to manipulate the elements of a gpuArray.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre GPU Computing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by