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

johnjon: <p>Hi. i’m running on this error to solve it from train code, but haven’t yet.<br>
I’d really appreciate if someone could help me figure this out.</p>
<blockquote>
<p>from nvidia-smi below &gt;&gt;&gt;&gt;<br>
±----------------------------------------------------------------------------+<br>
| NVIDIA-SMI 450.51.05    Driver Version: 450.51.05    CUDA Version: 11.0     |<br>
|-------------------------------±---------------------±---------------------+<br>
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |<br>
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |<br>
|                               |                      |               MIG M. |<br>
|===============================+======================+======================|<br>
|   0  GeForce RTX 208…  On   | 00000000:01:00.0  On |                  N/A |<br>
|  0%   42C    P8    19W / 300W |    413MiB / 11018MiB |      1%      Default |<br>
|                               |                      |                  N/A |<br>
±------------------------------±---------------------±---------------------+<br>
| Processes:                                                                  |<br>
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |<br>
|        ID   ID                                                   Usage      |<br>
|=============================================================================|<br>
|    0   N/A  N/A      1282      G   /usr/lib/xorg/Xorg                 18MiB |<br>
|    0   N/A  N/A      1418      G   /usr/bin/gnome-shell               57MiB |<br>
|    0   N/A  N/A      1637      G   /usr/lib/xorg/Xorg                181MiB |<br>
|    0   N/A  N/A      1752      G   /usr/bin/gnome-shell              143MiB |<br>
|    0   N/A  N/A      3014      G   …ommunity/202/jbr/bin/java        8MiB |<br>
±----------------------------------------------------------------------------+</p>
</blockquote>
<p>CUDA 11.0 was installed with NVIDIA-driver(450.51.05) automatically.<br>
so i installed CUDA 10.0 and changed instead of CUDA 11.0<br>
but i don’t know why nvidia-smi shows CUDA 11.0<br>
(~/.profile)<br>
export PATH=/usr/local/cuda-10.0/bin:$PATH<br>
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64:$LD_LIBRARY_PATH</p>
<blockquote>
<p>Environments&gt;&gt;&gt;<br>
GeForce RTX 2080Ti<br>
CUDA Version 10.0.130<br>
<span class="hashtag-raw">#define</span> CUDNN_MAJOR 7<br>
<span class="hashtag-raw">#define</span> CUDNN_MINOR 6<br>
<span class="hashtag-raw">#define</span> CUDNN_PATCHLEVEL 2<br>
Anaconda3 / Python3.6 /<br>
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch</p>
</blockquote>
<blockquote>
<p>Here is the error log &gt;&gt;&gt;&gt;</p>
</blockquote>
<p>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<br>
Traceback (most recent call last):<br>
File “train_pose.py”, line 256, in <br>
model = construct_model(args)<br>
File “train_pose.py”, line 48, in construct_model<br>
model = torch.nn.DataParallel(model, device_ids=args.gpu).cuda()<br>
File “/home/jj/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 307, in cuda<br>
return self._apply(lambda t: t.cuda(device))<br>
File “/home/jj/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 203, in _apply<br>
module._apply(fn)<br>
File “/home/jj/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 203, in _apply<br>
module._apply(fn)<br>
File “/home/jj/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 203, in _apply<br>
module._apply(fn)<br>
File “/home/jj/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 225, in _apply<br>
param_applied = fn(param)<br>
File “/home/jj/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py”, line 307, in <br>
return self._apply(lambda t: t.cuda(device))<br>
File “/home/jj/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/cuda/<strong>init</strong>.py”, line 154, in _lazy_init<br>
torch._C._cuda_init()<br>
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</p>
<blockquote>
<p>thanks.</p>
</blockquote>

johnjon: <p>Hi. i resolved the problem through reinstalling Pytorch version(1.5.1 &gt; 1.0.0).<br>
thanks.</p>