问题描述:
在 Ubuntu22.04 + Orin Arm 中构建 tensorrt_common 时,出现未找到 TENSORRT_NVPARSERS_LIBRARY 变量错误。
环境:
- 主板:Jetson AGX Orin 32G 开发套件
- 操作系统:Ubuntu 22.04
- CUDA:12.6
- CuDNN:9.3.0.75-1+cuda12.6
- TensorRT:10.3.0.30-1+cuda12.5
- autoware:last commit
复现方法:
Summary: 333 packages finished
1 package failed: autoware_tensorrt_common
13 packages not processed
$ colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-select=autoware_tensorrt_common
Starting >>> autoware_tensorrt_common
--- stderr: autoware_tensorrt_common
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
TENSORRT_NVPARSERS_LIBRARY
linked by target "autoware_tensorrt_common" in directory /home/work/autoware/src/universe/autoware.universe/perception/autoware_tensorrt_common
CMake Generate step failed. Build files cannot be regenerated correctly.
---
Failed <<< autoware_tensorrt_common [0.97s, exited with code 1]
Summary: 0 packages finished [3.82s]
1 package failed: autoware_tensorrt_common
1 package had stderr output: autoware_tensorrt_common
可能原因:
- autoware 需要 libnvparsers,但是 TensorRT 9.x + 版本之后 libnvparsers 库被删除https://docs.nvidia.com/deeplearning/tensorrt/archives/tensorrt-901/release-notes/index.html
- TensorRT 6.8.1 仅支持 x86 ubuntu22,不支持 ARM ubuntu22(支持 arm ubuntu20)。https ://developer.nvidia.com/nvidia-tensorrt-8x-download
$ dpkg -l | grep -i libnvinfer-dev
ii libnvinfer-dev 10.3.0.30-1+cuda12.5 arm64 TensorRT development libraries
ii python3-libnvinfer-dev 10.3.0.30-1+cuda12.5 arm64 Python 3 development package for TensorRT standard runtime
$ dpkg -l | grep -i libnvparsers-dev
$ sudo apt install libnvparsers-dev
E: Unable to locate package libnvparsers-dev
Check Nvidia docs:
libnvparsers is removed when 9.0.1, last version of has libnvparsers is 8.6.1
# tensorrt 9.0.1
# https://docs.nvidia.com/deeplearning/tensorrt/archives/tensorrt-901/release-notes/index.html
With removal of ICaffeParser and IUffParsers,
the libnvparsers library is removed.
# tensorrt 8.6.1
# https://docs.nvidia.com/deeplearning/tensorrt/archives/tensorrt-861/install-guide/index.html#installing-debian
sudo apt install libnvparsers-dev
# tensorrt 8.6.1 not support arm ubuntu22, only support x86 ubuntu20
# https://developer.nvidia.com/nvidia-tensorrt-8x-download
解决方法:
使用JetPack 6.0刷写Orin。
- JetPack 6.0基于Ubuntu 22.04、CUDA 12.2、CuDNN 8.9、Tensorrt 8.6,满足Autoware的工作条件。
- JetPack 6.1基于Ubuntu 22.04、CUDA 12.6、CuDNN 9.3、Tensorrt 10.3,Autoware目前暂不支持,相关支持工作正在开发中,需要些时间。