I am trying to setting up environment on Nvidia Jetson Xavier NX(developer kit), I have successfully make cuda, pytorch working since torch.cuda.is_available() is True. The problem occurs when I am trying to import torchaudio which I have already successfully installed and I think it is with the correct version 0.12.0 for torch 1.12.0
I have flashed my sd card for Nvidia Jetson Xavier NX, and it seems like I am able to collect the results from collect_env file.
Collecting environment information…
PyTorch version: 1.12.0a0+2c916ef.nv22.3
Is debug build: False
CUDA used to build PyTorch: 11.4
ROCM used to build PyTorch: N/A
OS: Ubuntu 20.04.5 LTS (aarch64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: version 3.16.3
Libc version: glibc-2.31
Python version: 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0] (64-bit runtime)
Python platform: Linux-5.10.104-tegra-aarch64-with-glibc2.29
Is CUDA available: True
CUDA runtime version: 11.4.239
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Probably one of the following:
/usr/lib/aarch64-linux-gnu/libcudnn.so.8.4.1
/usr/lib/aarch64-linux-gnu/libcudnn_adv_infer.so.8.4.1
/usr/lib/aarch64-linux-gnu/libcudnn_adv_train.so.8.4.1
/usr/lib/aarch64-linux-gnu/libcudnn_cnn_infer.so.8.4.1
/usr/lib/aarch64-linux-gnu/libcudnn_cnn_train.so.8.4.1
/usr/lib/aarch64-linux-gnu/libcudnn_ops_infer.so.8.4.1
/usr/lib/aarch64-linux-gnu/libcudnn_ops_train.so.8.4.1
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: False
Versions of relevant libraries:
[pip3] numpy==1.17.4
[pip3] torch==1.12.0a0+2c916ef.nv22.3
[pip3] torchaudio==0.12.0
[pip3] torchvision==0.13.0
[conda] Could not collect
import torchaudio
Traceback (most recent call last):
File “”, line 1, in
File “/home/yilinw/astrtd/lib/python3.8/site-packages/torchaudio/init.py”, line 1, in
from torchaudio import ( # noqa: F401
File “/home/yilinw/astrtd/lib/python3.8/site-packages/torchaudio/_extension.py”, line 103, in
_init_extension()
File “/home/yilinw/astrtd/lib/python3.8/site-packages/torchaudio/_extension.py”, line 88, in _init_extension
_load_lib(“libtorchaudio”)
File “/home/yilinw/astrtd/lib/python3.8/site-packages/torchaudio/_extension.py”, line 51, in _load_lib
torch.ops.load_library(path)
File “/home/yilinw/astrtd/lib/python3.8/site-packages/torch/_ops.py”, line 244, in load_library
ctypes.CDLL(path)
File “/usr/lib/python3.8/ctypes/init.py”, line 373, in init
self._handle = _dlopen(self._name, mode)
OSError: /home/yilinw/astrtd/lib/python3.8/site-packages/torchaudio/lib/libtorchaudio.so: undefined symbol: _ZNK5torch8autograd4Node4nameEv
import torchvision
/home/yilinw/astrtd/lib/python3.8/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension:
warn(f"Failed to load image Python extension: {e}")
Please let me know if there is any suggestion. Thank you very much.
Could you please give our nv22.09 PyTorch package a try?
We got some similar issues before but upgrading to the latest nv22.09 seems to solve the issue.
(astrtd) yilinw@ubuntu:~/Downloads$ pip3 list | grep torch
torch 1.13.0a0+d0d6b1f2.nv22.9
torchaudio 0.12.1
torchvision 0.13.0
(astrtd) yilinw@ubuntu:~/Downloads$ python3
Python 3.8.10 (default, Jun 22 2022, 20:18:18)
[GCC 9.4.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.
import torch
import torchvision
/home/yilinw/astrtd/lib/python3.8/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension:
warn(f"Failed to load image Python extension: {e}")
import torchaudio
Traceback (most recent call last):
File “”, line 1, in
File “/home/yilinw/astrtd/lib/python3.8/site-packages/torchaudio/init.py”, line 1, in
from torchaudio import ( # noqa: F401
File “/home/yilinw/astrtd/lib/python3.8/site-packages/torchaudio/_extension.py”, line 103, in
_init_extension()
File “/home/yilinw/astrtd/lib/python3.8/site-packages/torchaudio/_extension.py”, line 88, in _init_extension
_load_lib(“libtorchaudio”)
File “/home/yilinw/astrtd/lib/python3.8/site-packages/torchaudio/_extension.py”, line 51, in _load_lib
torch.ops.load_library(path)
File “/home/yilinw/astrtd/lib/python3.8/site-packages/torch/_ops.py”, line 293, in load_library
ctypes.CDLL(path)
File “/usr/lib/python3.8/ctypes/init.py”, line 373, in init
self._handle = _dlopen(self._name, mode)
OSError: /home/yilinw/astrtd/lib/python3.8/site-packages/torchaudio/lib/libtorchaudio.so: undefined symbol: _ZNK5torch8autograd4Node4nameEv
Hi @rroldan@yilinw, can you try using the l4t-pytorch container and let me know if you encounter the same issue? Those have PyTorch + torchvision + torchaudio pre-installed in them.
Hi. Finally, I could install it natively building from source. This method installs torchvision 0.15.0a0+6e203b4 and it works perfectly with torch 1.12.0a0+2c916ef.nv22.3 on a virtualenv or Conda environment with Python 3.8.