No torchaudio package that works with torch for Cuda

I’m running Jetpack 6.0 on my Jetson Orin Nano. Ubuntu 22.04.4LTS. I used the cross platform installer from an Ubuntu host pc. This installed Cuda 12.2. I want to install torch and torchaudio using pip that is compatible with my device, Jetpack version, Cuda version and has Cuda support. I simply can’t find it.

nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Tue_Aug_15_22:08:11_PDT_2023
Cuda compilation tools, release 12.2, V12.2.140
Build cuda_12.2.r12.2/compiler.33191640_0

When I want to install pytorch with Cuda support, I can not get a torchaudio that works with the same torch version. I always get errors like such:

OSError: /home/tars/.local/lib/python3.10/site-packages/torchaudio/lib/libtorchaudio.so: undefined symbol: _ZN3c104cuda14ExchangeDeviceE

When I find a version that works together (2.3.0), it doesn’t have CUDA support.

import torch
torch.cuda.is_available()

returns False

I installed torch using the following command, which does offer CUDA support, but there’s no suitable torchaudio package. I always get the error above

wget https://developer.download.nvidia.com/compute/redist/jp/v60/pytorch/torch-2.4.0a0+07cecf4168.nv24.05.14710581-cp310-cp310-linux_aarch64.whl -O torch-2.4.0a0+07cecf4168.nv24.05.14710581-cp310-cp310-linux_aarch64.whl
pip3 install torch-2.4.0a0+07cecf4168.nv24.05.14710581-cp310-cp310-linux_aarch64.whl

Is there a way to find the necessary files for this? I’d love to have some support

Hi,

Please find the compatible PyTorch, TorchAudio, and TorchVision in the below link:

Thanks.

1 Like

Hi,

Thank you for your response. I installed the packages and now receive a different error when running my script.

ImportError: libcudnn.so.9: cannot open shared object file: No such file or directory

I checked the lib64 folder for CUDA (/usr/local/cuda-12.2/lib64) and the file isn’t there. Do you know the next step from here?

Thanks

@AastaLLL

I fixed it by installing cudnn with the steps from cuDNN 9.2.1 Downloads | NVIDIA Developer and creating a symlink to /usr/local/cuda-12.2/lib64

How did you create the symlink?
@jeroenvanhattem @AastaLLL

Hi,

The link shared by jeroenvanhattem is the cuDNN 9.2.1 package for Jetson rather than a soft link.
If you still meet issues after the installation, could you file a new topic specified for your problem?

Thanks.

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