1

我已经安装了 tensorrt 我已经检查了 python -c "import tensorrt"

但是当我编译 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

4

1 回答 1

1

我解决了这个问题

可能是你的编译器没有找到 NvOnnxParserTypedefs.h 文件试试

sudo find / -name NvOnnxParserTypedefs.h 

并执行以下脚本

sudo cp /your/path/to/NvOnnxParserTypedefs.h /your_tensorrt_path/include/

它可能会起作用

于 2019-10-15T11:33:42.920 回答