Unable to find available GPU device on matlab

83 次查看(过去 30 天)
Hi everyone,
I am trying to use GPU on my matlab, when I type gpuDevice, an error persistently occurs as:
Encountered unexpected error during CUDA execution. The CUDA error was:
CUDA-capable device(s) is/are busy or unavailable. I can find information when I type gpuDeviceTable, as shown in the attached figure.
I am using Matlab R2023b on Windows 11, NVIDIA RTX 6000 Ada and I have installed the correponding driver and CUDA version, their information can be found in the attached figure.
Such a GPU with compute capability of 8.9 should be supported by matlab.
Can everyone tell me some advice to fix this?
Thank you very much.
Best,
Jinghua

回答(1 个)

T.Nikhil kumar
T.Nikhil kumar 2023-11-28
Hello Jinghua,
I understand that you are facing an error on using the ‘gpuDevice’ function. You could follow the below suggestions which may help resolve the error:
  1. Ensure that no other process is using the GPU. Close any other applications that might be using the GPU resources.
  2. If you have a display GPU then you could try making the display GPU invisible using the following command:
setenv('CUDA_VISIBLE_DEVICES','0')
3. Try using the ‘reset’ function to reset the GPU device and clear its memory and then use the ‘gpuDevice’ function.
4. Virtual Machine support for MATLAB is not explicitly present. If you are using a virtual machine, you could face this error. NVIDIA provides the vGPU software which provides virtual machines the access to NVIDIA GPUs. Check out Virtual GPU Software documentation from NVIDIA to resolve the error.
5. Use the ‘coder.checkGpuInstall’ command to verify GPU environment. This can direct you to the root cause of the error by giving ‘FAILED’ status to that check. Try the suggestions that follow for each ‘FAILED’ check.
For more information on ‘coder.checkGpuInstall’ and the ‘reset’ methods, refer to the following MathWorks documentations:
Hope this helps!
  1 个评论
景华
景华 2023-11-28
Dear Kumar,
Thank you so much for your helpful answer. I tried solutions 1-3 (4 does not apply as I am not using a VM) and the error persists. When I tried solution 5, I got some information as below:
coder.checkGpuInstall
Compatible GPU : FAILED (There is a problem with the graphics driver or with this GPU device. Be sure that you have a supported GPU and latest driver. Code execution will not be available.)
CUDA Environment : PASSED
Runtime : PASSED
cuFFT : PASSED
cuSOLVER : PASSED
cuBLAS : PASSED
cuDNN Environment : PASSED (Warning: Deep learning code generation has been tested with cuDNN v8.7. The provided cuDNN library v8.9 may not be fully compatible.)
Host Compiler : PASSED
gpu: 0
cuda: 1
cudnn: 1
tensorrt: 0
hostcompiler: 1
basiccodegen: 1
basiccodeexec: 0
deepcodegen: 0
deepcodeexec: 0
tensorrtdatatype: 0
profiling: 0
However, I have installed the latest driver of the version 537.70 from NVIDIA. I am confused and hope you can provide more potential solutions.
Best,
Jinghua

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 GPU Computing 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by