How to run program on GPU

6 vues (au cours des 30 derniers jours)
Sania Gul
Sania Gul le 2 Déc 2019
Commenté : Andrea Picciau le 9 Déc 2019
My program of Semantic segmentation is in Matlab and I want to run it on GPU. Kindly send me the step wise procedure to run my code on GPU

Réponse acceptée

Andrea Picciau
Andrea Picciau le 2 Déc 2019
Hi Sania,
  • If you're training your network, you need to set 'ExecutionEnvironment' to 'gpu' or 'multi-gpu' in trainingOptions. The doc for trainingOptions is here.
  • If you have already trained your network and you want to use it, you can either set the option 'Acceleration' to 'MEX' in the function predict or you can use GPU coder as shown in this other doc page.
Note that (as of today) you can't use GPU coder to train your network.
-- Andrea
  2 commentaires
Sania Gul
Sania Gul le 9 Déc 2019
Thanks you so much.
Andrea Picciau
Andrea Picciau le 9 Déc 2019
Happy to help!

Connectez-vous pour commenter.

Plus de réponses (1)

Nicolas B.
Nicolas B. le 2 Déc 2019
So the first step is to check whether you have the "Parallel Computing Toolbox" with:
if the toolbox isn't in the list, than you need to buy it.
Then, take a look at the documentation from mathwork about computing on GPU.
Hope it help you.
  1 commentaire
Sania Gul
Sania Gul le 2 Déc 2019
Yes, we have parallel computing toolbox in our MATLAB 2019. And have configyred (cuDNN) library 123.pngbut still GPU button is in active. Kindly help me to solve this problem.

Connectez-vous pour commenter.


En savoir plus sur Get Started with GPU Coder dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by