Error using parallel.g​pu.CUDADev​ice.hBuild An unexpected error occurred trying to retrieve CUDA device properties. The CUDA error was: CUDA_ERROR_UNKNOWN

조회 수: 3 (최근 30일)
Hello I am getting error while running nueral network programs the error is "Error using parallel.gpu.CUDADevice.hBuild An unexpected error occurred trying to retrieve CUDA device properties. The CUDA error was: CUDA_ERROR_UNKNOWN" few days back it used to run properly from 2 days it is displaying this error. even i tried updating drivers no use. please help me .
  댓글 수: 2
Joss Knight
Joss Knight 2018년 2월 18일
Please give MATLAB version, device, system information, and output of nvidia-smi.
mohammed
mohammed 2019년 3월 13일
Error
Training throws the error 'CUDA_ERROR_UNKNOWN'
Description
Sometimes, the GPU throws this error when it is being used for both compute and display requests from the OS.
Possible Solution
Try reducing the mini-batch size using the 'MiniBatchSize' option of trainingOptions. If reducing the mini-batch size does not work, then in Windows®, try adjusting the Timeout Detection and Recovery (TDR) settings. For example, change the TdrDelay from 2 seconds (default) to 4 seconds (requires registry edit).

댓글을 달려면 로그인하십시오.

채택된 답변

pradeep pc
pradeep pc 2019년 3월 16일
2019-03-16 (2).png
select high performance option for MATLAB on NVIDIA control panel to solve. It works :)
  댓글 수: 4

댓글을 달려면 로그인하십시오.

추가 답변 (4개)

Pramod Rao
Pramod Rao 2018년 2월 19일
Matlab version 2017a , Lenovo Laptop Windows 10 ,4gb ram,1gb Graphic card , nvidia GEFORCE GT610 The error is
  댓글 수: 5
Joss Knight
Joss Knight 2018년 3월 17일
These mobile graphics chips are very flaky for CUDA execution because of their power requirements. Try rebooting; also, go to the NVIDIA Control Panel, Manage 3D Settings, then ensure that in Program Settings, when MATLAB is selected, the High-performance NVIDIA processor is the preferred graphics processor.
mohammed
mohammed 2019년 3월 13일
Error
Training throws the error 'CUDA_ERROR_UNKNOWN'
Description
Sometimes, the GPU throws this error when it is being used for both compute and display requests from the OS.
Possible Solution
Try reducing the mini-batch size using the 'MiniBatchSize' option of trainingOptions. If reducing the mini-batch size does not work, then in Windows®, try adjusting the Timeout Detection and Recovery (TDR) settings. For example, change the TdrDelay from 2 seconds (default) to 4 seconds (requires registry edit).

댓글을 달려면 로그인하십시오.


M. Mubashir Hussain
M. Mubashir Hussain 2019년 3월 4일
I am getting the following error when I try to train my network : Error using parallel.gpu.CUDADevice.hBuild
An unexpected error occurred trying to retrieve CUDA device properties. The CUDA error was:
CUDA_ERROR_UNKNOWN
I an using Nvidia Geforce GTX 1050 TI GPU on my Windows 10 Laptop. When I restart Matlab, error goes away but reappears when I train network again. I have the latest Nvidia driver. I feel that I hve started getting this error after I installed Cuda toolkit 9 and CuDNN libraries to make tensorflow for GPU work?
Interestingly my GPU is dectable using the various MATLAB commands.
  댓글 수: 1
mohammed
mohammed 2019년 3월 13일
Error
Training throws the error 'CUDA_ERROR_UNKNOWN'
Description
Sometimes, the GPU throws this error when it is being used for both compute and display requests from the OS.
Possible Solution
Try reducing the mini-batch size using the 'MiniBatchSize' option of trainingOptions. If reducing the mini-batch size does not work, then in Windows®, try adjusting the Timeout Detection and Recovery (TDR) settings. For example, change the TdrDelay from 2 seconds (default) to 4 seconds (requires registry edit).

댓글을 달려면 로그인하십시오.


M. Mubashir Hussain
M. Mubashir Hussain 2019년 3월 11일
Any replies please? The only solution is to restart MATLAB everytime this error occur? Any other solution please?
  댓글 수: 1
mohammed
mohammed 2019년 3월 13일
Error
Training throws the error 'CUDA_ERROR_UNKNOWN'
Description
Sometimes, the GPU throws this error when it is being used for both compute and display requests from the OS.
Possible Solution
Try reducing the mini-batch size using the 'MiniBatchSize' option of trainingOptions. If reducing the mini-batch size does not work, then in Windows®, try adjusting the Timeout Detection and Recovery (TDR) settings. For example, change the TdrDelay from 2 seconds (default) to 4 seconds (requires registry edit).

댓글을 달려면 로그인하십시오.


M. Mubashir Hussain
M. Mubashir Hussain 2019년 3월 11일
I am now getting this error:
Error using gpuDevice
An unexpected error occurred trying to retrieve CUDA device properties. The CUDA error was:
CUDA_ERROR_UNKNOWN
  댓글 수: 3
mohammed
mohammed 2019년 3월 13일
Error
Training throws the error 'CUDA_ERROR_UNKNOWN'
Description
Sometimes, the GPU throws this error when it is being used for both compute and display requests from the OS.
Possible Solution
Try reducing the mini-batch size using the 'MiniBatchSize' option of trainingOptions. If reducing the mini-batch size does not work, then in Windows®, try adjusting the Timeout Detection and Recovery (TDR) settings. For example, change the TdrDelay from 2 seconds (default) to 4 seconds (requires registry edit).
Oscar
Oscar 2019년 6월 27일
I have the same error, what works for me is using the command: gpuDevice(1)
I was hoping to find a better alternative to my solution, but maybe there's none other.

댓글을 달려면 로그인하십시오.

카테고리

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