RuntimeError: cuda runtime error (100) : no CUDA-capable device is detected at /opt/conda/conda-bld/pytorch_1591914742272/work/aten/src/THC/THCGeneral.cpp:47

Hi. i’m running on this error to solve it from train code, but haven’t yet.
I’d really appreciate if someone could help me figure this out.

from nvidia-smi below >>>>
±----------------------------------------------------------------------------+
| NVIDIA-SMI 450.51.05 Driver Version: 450.51.05 CUDA Version: 11.0 |
|-------------------------------±---------------------±---------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce RTX 208… On | 00000000:01:00.0 On | N/A |
| 0% 42C P8 19W / 300W | 413MiB / 11018MiB | 1% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1282 G /usr/lib/xorg/Xorg 18MiB |
| 0 N/A N/A 1418 G /usr/bin/gnome-shell 57MiB |
| 0 N/A N/A 1637 G /usr/lib/xorg/Xorg 181MiB |
| 0 N/A N/A 1752 G /usr/bin/gnome-shell 143MiB |
| 0 N/A N/A 3014 G …ommunity/202/jbr/bin/java 8MiB |
±----------------------------------------------------------------------------+

CUDA 11.0 was installed with NVIDIA-driver(450.51.05) automatically.
so i installed CUDA 10.0 and changed instead of CUDA 11.0
but i don’t know why nvidia-smi shows CUDA 11.0
(~/.profile)
export PATH=/usr/local/cuda-10.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64:$LD_LIBRARY_PATH

Environments>>>
GeForce RTX 2080Ti
CUDA Version 10.0.130
#define CUDNN_MAJOR 7
#define CUDNN_MINOR 6
#define CUDNN_PATCHLEVEL 2
Anaconda3 / Python3.6 /
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch

Here is the error log >>>>

THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1591914742272/work/aten/src/THC/THCGeneral.cpp line=47 error=100 : no CUDA-capable device is detected
Traceback (most recent call last):
File “train_pose.py”, line 256, in
model = construct_model(args)
File “train_pose.py”, line 48, in construct_model
model = torch.nn.DataParallel(model, device_ids=args.gpu).cuda()
File “/home/jj/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 307, in cuda
return self._apply(lambda t: t.cuda(device))
File “/home/jj/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 203, in _apply
module._apply(fn)
File “/home/jj/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 203, in _apply
module._apply(fn)
File “/home/jj/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 203, in _apply
module._apply(fn)
File “/home/jj/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 225, in _apply
param_applied = fn(param)
File “/home/jj/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 307, in
return self._apply(lambda t: t.cuda(device))
File “/home/jj/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/cuda/init.py”, line 154, in _lazy_init
torch._C._cuda_init()
RuntimeError: cuda runtime error (100) : no CUDA-capable device is detected at /opt/conda/conda-bld/pytorch_1591914742272/work/aten/src/THC/THCGeneral.cpp:47

thanks.

1 Like

Hi. i resolved the problem through reinstalling Pytorch version(1.5.1 > 1.0.0).
thanks.

1 Like