Does the code run on the GPU after transferring data to the GPU using the gpuArray function?

3 visualizaciones (últimos 30 días)
I am a novice, I used the gpuArray function for transferring data to GPU , but the code run on the CPU. How can I get code to run on the GPU

Respuestas (1)

Matt J
Matt J el 29 de Nov. de 2021
Editada: Matt J el 29 de Nov. de 2021
Any operations you do on a gpuArray object will be done on the GPU. Operations you do on other objects (not gpuArrays) will be executed on the CPU.
  2 comentarios
lu zhang
lu zhang el 30 de Nov. de 2021
Thank you for your answer. I see what you mean. I have transfered the data to GPU and run the code. But my task manager showed that the CPU was working, and the utilization of GPU was 0. I'm very confused now.

Iniciar sesión para comentar.

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