Torch.cuda.is_available() returns False on Ubuntu

Hi,
Facing issue with cuda. Below are the details:

torch.version
‘1.13.1+cu117’
torchvision.version
‘0.14.1+cu117’

Python 3.8.0

±----------------------------------------------------------------------------+
| NVIDIA-SMI 525.125.06 Driver Version: 525.125.06 CUDA Version: 12.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 Quadro P2000 Off | 00000000:2D:00.0 Off | N/A |
| 49% 40C P8 4W / 75W | 17MiB / 5120MiB | 0% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+
| 1 NVIDIA RTX A2000 Off | 00000000:8D:00.0 Off | Off |
| 30% 37C P8 5W / 70W | 6MiB / 6138MiB | 0% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+
| 2 NVIDIA GeForce … Off | 00000000:99:00.0 Off | N/A |
| 0% 40C P8 2W / 215W | 6MiB / 8192MiB | 0% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+

±----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 3279 G /usr/lib/xorg/Xorg 9MiB |
| 0 N/A N/A 3447 G /usr/bin/gnome-shell 4MiB |
| 1 N/A N/A 3279 G /usr/lib/xorg/Xorg 4MiB |
| 2 N/A N/A 3279 G /usr/lib/xorg/Xorg 4MiB |

| 0 Quadro P2000 Off | 00000000:2D:00.0 Off | N/A |

One of your GPUs seems to be disabled so make sure the right one is used e.g. via exporting CUDA_VISIBLE_DEVICES.