Cuda runtime error (100) : no CUDA-capable device is detected at /pytorch/aten/src/THC/THCGeneral.cpp:47

username: Jun_Kim
cooked: <p>Hello! I am a beginner in pytorch and I hope to use the gpu as in my visual studio 19.<br>
My computer is windows 10. I use conda virtual envs for python works. On my virtual env, the list is the following. In the visual studio, I can run cuda with cpp… but for pytorch, I downloaded a sample code that I know works well in my gpu but I get the error above. What is wrong with my approach? Thank you!!</p>
<h1></h1>
<h1>Name                    Version                   Build  Channel</h1>
<p>blas                            1.0                         mkl<br>
ca-certificates           2020.7.22                     0<br>
certifi                   2020.6.20                py38_0<br>
cudatoolkit               10.2.89              h74a9793_1<br>
freetype                  2.10.2               hd328e21_0<br>
future                    0.18.2                   pypi_0    pypi<br>
intel-openmp              2020.2                      254<br>
jpeg                      9b                   hb83a4c4_2<br>
libpng                    1.6.37               h2a8f88b_0<br>
libtiff                   4.1.0                h56a325e_1<br>
lz4-c                     1.9.2                h62dcd97_1<br>
mkl                       2020.2                      256<br>
mkl-service               2.3.0            py38hb782905_0<br>
mkl_fft                   1.1.0            py38h45dec08_0<br>
mkl_random                1.1.1            py38h47e9c7a_0<br>
ninja                     1.10.0           py38h7ef1ec2_0<br>
numpy                     1.19.1           py38h5510c5b_0<br>
numpy-base                1.19.1           py38ha3acd2a_0<br>
olefile                   0.46                       py_0<br>
openssl                   1.1.1g               he774522_1<br>
pillow                    7.2.0            py38hcc1f983_0<br>
pip                       20.2.2                   py38_0<br>
python                    3.8.5                he1778fa_0<br>
pytorch                   1.6.0           py3.8_cuda102_cudnn7_0    <br>
setuptools                49.6.0                   py38_0<br>
six                       1.15.0                     py_0<br>
sqlite                    3.33.0               h2a8f88b_0<br>
tk                        8.6.10               he774522_0<br>
torchvision               0.7.0                py38_cu102    pytorch<br>
vc                        14.1                 h0510ff6_4<br>
vs2015_runtime            14.16.27012          hf0eaf9b_3<br>
wheel                     0.35.1                     py_0<br>
wincertstore              0.2                      py38_0<br>
xz                        5.2.5                h62dcd97_0<br>
zlib                      1.2.11               h62dcd97_4<br>
zstd                      1.4.5                h04227a9_0</p>
<p>I think i  get the above error since I designated my gpu0 to be used for the code via<br>
torch.cuda.set_device(0)<br>
If I run the code on CPU it works fine.</p>
<p>torch.cuda.is_available() is false</p>
<p>print(torch.<strong>version</strong>) is 1.5.0.</p>
<p>Please let me know anything!</p>

username: Jun_Kim
cooked: <p>Sorry. This issue has been solved by re-installing my torch from pytorch.</p>