I have a tesla K20c.
I installed the CUDA driver from here:
<nvcc -V> it is available and installed.
Then, I installed pytorch as:
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
However, torch.cuda.is_available()
returns: False
(base) C:\>nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_May__3_19:00:59_Pacific_Daylight_Time_2022
Cuda compilation tools, release 11.7, V11.7.64
Build cuda_11.7.r11.7/compiler.31294372_0
(base) C:\>conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
Collecting package metadata (current_repodata.json): done
Solving environment: done
# All requested packages already installed.
(base) C:\>ipython
Python 3.8.8 (default, Apr 13 2021, 15:08:03) [MSC v.1916 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.22.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import torch
In [2]: torch.rand(3,5)
Out[2]:
tensor([[0.0115, 0.6534, 0.6884, 0.2533, 0.4802],
[0.6628, 0.7389, 0.1999, 0.4942, 0.4311],
[0.8925, 0.1638, 0.6131, 0.1957, 0.9486]])
In [3]: torch.cuda.is_available()
Out[3]: False