Parallelizing MATLAB code using many GPU cores

7 visualizaciones (últimos 30 días)
Omri Lesser
Omri Lesser el 29 de Ag. de 2018
Comentada: Y.Yang el 25 de Abr. de 2020
I have a MATLAB script that runs many independent iterations (for loop), of the form
for idx=1:N
result(idx) = some_procedure(data(idx));
end
I have a NVIDIA graphics card with over 3000 CUDA cores. Is it possible to parallelize the code, such that e.g. each GPU core handles one iteration? I understood that parfor is not the answer here but is there some equivalent?

Respuesta aceptada

Joss Knight
Joss Knight el 31 de Ag. de 2018
GPU cores do not work like CPU cores. They cannot run independent tasks.
To use the GPU with MATLAB, start with the documentation.
  10 comentarios
Joss Knight
Joss Knight el 25 de Abr. de 2020
You should look elsewhere for further performance improvements. MATLAB has no half datatype, and sparse only supports 2-D matrices so cannot be used for batch operations, not that it would be useful anyway since sparse only makes sense for large matrices.
Y.Yang
Y.Yang el 25 de Abr. de 2020
thanks

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by