Speed up 'dlgradient' with parallelism?

4 vues (au cours des 30 derniers jours)
Evan Scope Crafts
Evan Scope Crafts le 11 Avr 2021
Commenté : Luis Hernandez le 14 Nov 2023
Hi all,
I am wondering if there is a way to speed up the 'dlgradient' function evaluation using parallelism or GPUs.

Réponses (1)

Jon Cherrie
Jon Cherrie le 12 Avr 2021
You can use a GPU for the dlgradient computation by using a gpuArray with dlarray.
In this example, the minibtachqueue, puts data on to the GPU and thus the GPU is used for the rest of the computation, both the "forward" pass the "backward" (gradient) pass:
  1 commentaire
Luis Hernandez
Luis Hernandez le 14 Nov 2023
Hello.
I've been trying to use the functions 'dlgradient' and 'dlfeval' with gpuArray inputs so that matlab will use my GPU. Unofrtunately, they only work when I pass dlarray inputs.
What is the workaround for this? what is the minibatch doing that allows you to work with gpuArray?
Thanks!
-L

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by