Borrar filtros
Borrar filtros

Why is my GPU device not detected by MATLAB?

148 visualizaciones (últimos 30 días)
MathWorks Support Team
MathWorks Support Team el 2 de Nov. de 2023
Editada: MathWorks Support Team el 24 de Jul. de 2024 a las 9:20
When I execute "gpuDevice" command in MATLAB command prompt on a machine with a supported GPU installed, I get the following error message:
ERROR: >> gpuDeviceError using gpuDevice (line 26)
No supported GPU device was found on this computer. To learn more about supported GPU devices, see
www.mathworks.com/gpudevice.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 24 de Jul. de 2024 a las 0:00
Editada: MathWorks Support Team el 24 de Jul. de 2024 a las 9:20
1.    Check you have a supported GPU card , see NVIDIA website to check compute capability (https://developer.nvidia.com/cuda-gpus for older cards consult https://developer.nvidia.com/cuda-legacy-gpus). 
2.    Update your NVIDIA graphics drivers to their latest version for your card (
).
It is not necessary to download the CUDA toolkit. 
3.    If you still cannot access your CUDA enabled device from within MATLAB check whether the device is correctly identified by your operating system using a program like nvidia-smi. If it is not seek advice from your sysadmin or NVIDIA support.
To run nvidia-smi:
  • Windows: nvidia-smi from a cmd window. Normally installed into C:\Windows\System32
  • Linux: nvidia-smi from terminal window. Normally installed into /usr/bin/
4.    In some environments such as computing clusters access to CUDA capable devices on machines are handled at a system level by techniques like control groups or general resource allocation. Checking for the presence of these systems can explain why GPUs are visible but restricted in access for other programs. This is more likely to exist on controlled HPC clusters.
CUDA_VISIBLE_DEVICES is an environment variable which when set will only allow access to the valid CUDA devices listed in the variable. The environment variable acts as a mask on any underlying CUDA devices.
CUDA_VISIBLE_DEVICES = '0' % Only device 0 is accessible and usable.
CUDA_VISIBLE_DEVICES = '0, 1' % Devices 0 and 1 are accessible and usable.
CUDA_VISIBLE_DEVICES= 'NoDevApps' % (or any invalid input) no CUDA devices are accessible.
If CUDA_VISIBLE_DEVICES is unset then all CUDA devices are unrestricted.
If the steps in this support solution have not helped you resolve the problem, please contact MathWorks support directly:

Más respuestas (0)

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