Torch on Jetson Jetpack 6.2

I obtained Jetson Orin Nano 8GB

want to run LSTM training using PyTorch

After installing Jetpak 6.2 according to
jtop
I have CUDA 12.6.68 library

Installed nvidia PyTorch
$ sudo python3 -m pip install --no-cache https://developer.download.nvidia.com/compute/redist/jp/v60dp/pytorch/torch-2.3.0a0+6ddf5cf85e.nv24.04.14026654-cp310-cp310-linux_aarch64.whl

$ pip3 show torch
Name: torch
Version: 2.3.0a0+6ddf5cf85e.nv24.4

python outputs
import torch
File “/usr/local/lib/python3.10/dist-packages/torch/init.py”, line 237, in
from torch._C import * # noqa: F403
ImportError: libcudnn.so.8: cannot open shared object file: No such file or directory

It seems I have issue opposite to what described here:

I have libcudnn.so.9 from Jetpack 6.2 but need a version of torch supporting it…
Am I right that the 2.3.0 was the latest one?
Where can I get the one which works with libcudnn.so.9

Thanks!

From the conversation in the Jetpack 6.2 announcement thread on 16.Jan I see that PyTorch might not be yet supported by that Jetpack, do you recommend to move to earlier
Jetpack 6.0 or Jetpack 6.1 or will update come soon? Please advise.

Dear @servak11 ,
Could you check installing the package from https://pypi.jetson-ai-lab.dev/jp6/cu126

1 Like

Thanks, @SivaRamaKrishnaNV, now torch can be imported in my system but suddenly I have new error I do not know what to do about…

RuntimeError: cuDNN version incompatibility: PyTorch was compiled against (9, 4, 0) but found runtime version (9, 3, 0). PyTorch already comes bundled with cuDNN. One option to resolving this error is to ensure PyTorch can find the bundled cuDNN.

I looked up the forum for example this thread

leads to cudnn version 8 install
AND also to several 9.x install pages
It seems there was a download instruction for every 9.x version

Finally, google search “cudnn library 9.4 for jetson l4t” led me to page

with install instructions for cudnn 9.4 for cuda-12:

wget https://developer.download.nvidia.com/compute/cudnn/9.4.0/local_installers/cudnn-local-tegra-repo-ubuntu2204-9.4.0_1.0-1_arm64.deb
sudo dpkg -i cudnn-local-tegra-repo-ubuntu2204-9.4.0_1.0-1_arm64.deb
sudo cp /var/cudnn-local-tegra-repo-ubuntu2204-9.4.0/cudnn-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cudnn-cuda-12

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