Torch.cuda.is_available() : False

Please Help, I am trying to use YOLOv8 in my jetson nano.

torch.cuda.is_available() : False
print(torch.version.cuda) : None

python3 --version = 3.6.9
nvcc --version :
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Sun_Feb_28_22:34:44_PST_2021
Cuda compilation tools, release 10.2, V10.2.300
Build cuda_10.2_r440.TC440_70.29663091_0

pip3 install torch: Successfully installed torch-1.10.2
pip3 install torchvision: Successfully installed torchvision-0.11.3

pip3 install torch==1.10.0+cu102 torchvision==0.11.0+cu102 torchaudio==0.10.0 -f https://download.pytorch.org/whl/torch_stable.html

I uninstalled both torch, torchvision and tried the command above, still failed. Why

Hi,

Can you try to install cuda-toolkit 10.2 from conda:

conda install conda-forge::cudatoolkit-dev=10.2

And then reinstall pytorchn since you have a only-cpu version of pytorch (print(torch.version.cuda) : None)

The binaries hosted on PyTorch.org don’t support Jetson devices so you would need to download them from here or here.

1 Like