Can't find GPU or CUDA version

username: Rickyg
cooked: <p>Environment:</p>
<ul>
<li>cuda11.7</li>
<li>3060ti with driver version 516.59</li>
</ul>
<p>When running the following code</p>
<pre><code class="lang-auto">import torch
print(torch.cuda.is_available())
print(torch.cuda.version)
</code></pre>
<p>it returns false and none. I’ve checked to see if I have cpuonly installed and I do not so that is not the cause. Running nvidia-smi and nvcc --version I get the following outputs respectively,</p>
<blockquote>
<p>Tue Nov 15 14:46:23 2022<br>
±----------------------------------------------------------------------------+<br>
| NVIDIA-SMI 516.59       Driver Version: 516.59       CUDA Version: 11.7     |<br>
|-------------------------------±---------------------±---------------------+<br>
| GPU  Name            TCC/WDDM | 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%   46C    P8    21W / 200W |   1086MiB /  8192MiB |      3%      Default |<br>
|                               |                      |                  N/A |<br>
±------------------------------±---------------------±---------------------+</p>
</blockquote>
<blockquote>
<p>Copyright (c) 2005-2022 NVIDIA Corporation<br>
Built on Tue_May__3_19:00:59_Pacific_Daylight_Time_2022<br>
Cuda compilation tools, release 11.7, V11.7.64<br>
Build cuda_11.7.r11.7/compiler.31294372_0</p>
</blockquote>
<p>I installed using the command given from the start locally page,</p>
<blockquote>
<p>conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia</p>
</blockquote>
<p>I’m not sure if this will help to debug but running</p>
<blockquote>
<p>python -m torch.utils.collect_env</p>
</blockquote>
<p>returns:</p>
<blockquote>
<p>PyTorch version: 1.13.0<br>
Is debug build: False<br>
CUDA used to build PyTorch: 11.7<br>
ROCM used to build PyTorch: N/A</p>
<p>OS: Microsoft Windows 10 Pro<br>
GCC version: Could not collect<br>
Clang version: Could not collect<br>
CMake version: Could not collect<br>
Libc version: N/A</p>
<p>Python version: 3.9.12 (main, Apr  4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)] (64-bit runtime)<br>
Python platform: Windows-10-10.0.19044-SP0<br>
Is CUDA available: True<br>
CUDA runtime version: 11.7.64<br>
CUDA_MODULE_LOADING set to: LAZY<br>
GPU models and configuration: GPU 0: NVIDIA GeForce RTX 3060 Ti<br>
Nvidia driver version: 516.59<br>
cuDNN version: Could not collect<br>
HIP runtime version: N/A<br>
MIOpen runtime version: N/A<br>
Is XNNPACK available: True</p>
<p>Versions of relevant libraries:<br>
[pip3] numpy==1.23.3<br>
[pip3] torch==1.13.0<br>
[pip3] torchaudio==0.13.0<br>
[pip3] torchvision==0.14.0<br>
[conda] blas                      1.0                         mkl<br>
[conda] cudatoolkit               11.3.1               h59b6b97_2<br>
[conda] mkl                       2021.4.0           haa95532_640<br>
[conda] mkl-service               2.4.0            py39h2bbff1b_0<br>
[conda] mkl_fft                   1.3.1            py39h277e83a_0<br>
[conda] mkl_random                1.2.2            py39hf11a4ad_0<br>
[conda] numpy                     1.23.0                   pypi_0    pypi<br>
[conda] numpy-base                1.23.3           py39h4da318b_0<br>
[conda] pytorch                   1.13.0          py3.9_cuda11.7_cudnn8_0    pytorch<br>
[conda] pytorch-cuda              11.7                 h67b0de4_0    pytorch<br>
[conda] pytorch-mutex             1.0                        cuda    pytorch<br>
[conda] torchaudio                0.13.0                   pypi_0    pypi<br>
[conda] torchvision               0.14.0                   pypi_0    pypi</p>
</blockquote>
<p>From this, it directly shows Cuda is available and my GPU so I’m very confused why this isn’t reflected in the program. Any help is appreciated I’m very lost on what the issue might be.</p>