我已经安装了tensorrt 我已经检查了python -c“ import tensorrt”
但是当我编译张量样本时
make
它抛出
../../ include / NvOnnxParser.h:27:10:严重错误:NvOnnxParserTypedefs.h:没有此类文件或目录 #include“ NvOnnxParserTypedefs.h”
我在字典中找到包含文件
ls ../../include
结果是
NvCaffeParser.h NvInferPlugin.h NvOnnxParser.h NvUffParser.h
NvInfer.h NvOnnxConfig.h NvOnnxParserRuntime.h NvUtils.h
谁能帮助我?
也许有一些有用的资源
https://github.com/NVIDIA/TensorRT/blob/release/6.0/samples/opensource/sampleMNIST/README.md
https://docs.nvidia.com/deeplearning/sdk/tensorrt-sample-support-guide/index.html#mnist_sample
https://docs.nvidia.com/deeplearning/sdk/tensorrt-install-guide/index.html#installing-tar
https://github.com/NVIDIA/TensorRT/tree/release/5.1
https://github.com/onnx/onnx-tensorrt/tree/5.1
https://github.com/NVIDIA/TensorRT/blob/release/6.0/samples/opensource/sampleMNIST/README.md
答案 0 :(得分:0)
我解决了这个问题
可能是您的编译器找不到NvOnnxParserTypedefs.h文件 尝试
sudo find / -name NvOnnxParserTypedefs.h
并执行以下脚本
sudo cp /your/path/to/NvOnnxParserTypedefs.h /your_tensorrt_path/include/
它可能会起作用