Disable the gpu.
57 vues (au cours des 30 derniers jours)
I have matlab version 2022b and I would like to disable the system GPU from the matlab application so that it does not recognise it and runs the programs only using the cpu. Could you tell me if it is possible to do it and how to do it? I would like to do it from the application itself, as disabling the gpu from the system is more laborious and I just want matlab to not recognise it.
Joss Knight le 15 Jan 2023
As soon as you start MATLAB type
setenv CUDA_VISIBLE_DEVICES -1
MATLAB will no longer recognise any GPU for computation.
Matt J le 13 Jan 2023
Modifié(e) : Matt J le 13 Jan 2023
Matlab will use the CPU by default unless you have in some way told it to use the GPU for a specific computation.
An exception might be the trainNetwork and predict commands, if you are doing DNN training or inference. Those commands have an option, however, called ExecutionEnvironment that you can use to specify CPU-only computation.