安装ONNX_tensorrt


1 TensotRT7 安装  ONNX_tensorrt教程

 

1 git clone --recursive -b 7.0 https://github.com/onnx/onnx-tensorrt.git

2 cd onnx-tensorrt

3 mkdir build

4 cd build

5 cmake .. -DTENSORRT_ROOT=<tensorrt_install_dir> -DGPU_ARCHS="61"

这一步可能报错:

Could NOT find Protobuf (missing: Protobuf_INCLUDE_DIR)

解决办法:sudo apt-get install libprotobuf-dev protobuf-compiler

 

6 make -j 12

make -j 12
这一步如果报错
numeric_limits’ is not a member of ‘std’

表示出错的onnx_utils.hpp头文件没有包含

#include <stdexcept> #include <limits>

 7 sudo make install 

 

 

2 TensotRT4 安装  ONNX_tensorrt5.1教程

1 git clone --recursive -b v5.0 https://github.com/onnx/onnx-tensorrt.git 

2 cd onnx-tensorrt

3 mkdir build

4 cd build

5 cmake .. -DTENSORRT_ROOT=<tensorrt_install_dir> -DGPU_ARCHS="61"

可能报错:

onnx-tensorrt:builtin_op_importers.cpp:628:5: error: ‘IIdentityLayer’ is not a member of ‘nvinfer1’

解决方法:

如果在TensorRT 4.0上编译,就有这个错误;5.0就没有(集成了)。

因此注释报错代码所在的整个函数,重新编译即可。

6 make -j8

 7 sudo make install 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM