Installing pytorch on jetson nano

I recently installed pytorch onto my jetson nano following this guide Running PyTorch Models on Jetson Nano | PyTorch

However when i was running my code i realised that it wasnt installed with CUDA. So if I look for the torch version, I see version 1.12.0 installed.

However, if i try to run this command, print(torch.cuda.is_available()) it returns false. Have I installed it wrongly ? If so, can anyone point me to the right way of installing pytorch on the nano?



We are moving this post to the Jetson Nano forum to get better help.

Thank you.

Hi @archieprad, I don’t believe that we have a PyTorch+CUDA arm64 wheel built for Nano/JetPack 4.x and PyTorch 1.12, so my guess is the one that you installed was built without CUDA enabled.

Can you try installing one of the wheels from this thread that are compatible with JetPack 4.x, or using the l4t-pytorch container?

The latest one for Nano is PyTorch 1.10:

JetPack 4.4 (L4T R32.4.3) / JetPack 4.4.1 (L4T R32.4.4) / JetPack 4.5 (L4T R32.5.0) / JetPack 4.5.1 (L4T R32.5.1) / JetPack 4.6 (L4T R32.6.1)

Hi @dusty_nv thanks for the suggestion! I tried it but I got this error
ERROR: torch-1.10.0-cp36-cp36m-linux_aarch64.whil is not a supported wheel on this platform. I actually get this error for all the versions that i tried from the link

Which version of JetPack-L4T are you running? (you can check this with cat /etc/nv_tegra_release)

Are you sure you are installing it with pip3 as opposed to pip?

Hi I have L4T R32.7.2. And yes I am following the instructions mentioned on that link. I am also running python 3.7.2

We only provide pre-built PyTorch pip wheels for the default version of Python that comes with Ubuntu - on JetPack 4.x, that’s Ubuntu 18.04 and Python 3.6. However, you can find the instructions for building PyTorch from source in that PyTorch topic.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.