Description
I am following the article https://developer.nvidia.com/blog/speeding-up-deep-learning-inference-using-tensorrt/
And I ran into these errors after I performed to make in code-samples/posts/TensorRT-introduction:
g++ -std=c++11 -DONNX_ML=1 -Wall -I/usr/local/cuda/include -c -o simpleOnnx_1.o simpleOnnx_1.cpp
In file included from simpleOnnx_1.cpp:29:0:
ioHelper.h:42:18: error: looser throw specifier for ‘virtual void nvinfer1::Logger::log(nvinfer1::ILogger::Severity, const char*)’
virtual void log(Severity severity, const char* msg) override
^~~
In file included from /usr/include/aarch64-linux-gnu/NvInferLegacyDims.h:53:0,
from /usr/include/aarch64-linux-gnu/NvInfer.h:53,
from simpleOnnx_1.cpp:27:
/usr/include/aarch64-linux-gnu/NvInferRuntimeCommon.h:1222:18: error: overriding ‘virtual void nvinfer1::ILogger::log(nvinfer1::ILogger::Severity, const AsciiChar*) noexcept’
virtual void log(Severity severity, AsciiChar const* msg) noexcept = 0;
^~~
simpleOnnx_1.cpp: In function ‘nvinfer1::ICudaEngine* createCudaEngine(const string&, int)’:
simpleOnnx_1.cpp:75:60: warning: ‘nvinfer1::ICudaEngine* nvinfer1::IBuilder::buildEngineWithConfig(nvinfer1::INetworkDefinition&, nvinfer1::IBuilderConfig&)’ is deprecated [-Wdeprecated-declarations]
return builder->buildEngineWithConfig(network, config);
^
In file included from simpleOnnx_1.cpp:27:0:
/usr/include/aarch64-linux-gnu/NvInfer.h:7990:43: note: declared here
TRT_DEPRECATED nvinfer1::ICudaEngine buildEngineWithConfig(
^~~~~~~~~~~~~~~~~~~~~
simpleOnnx_1.cpp: In function ‘void verifyOutput(const std::vector&, const std::vector&, int)’:
simpleOnnx_1.cpp:94:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (size_t i = 0; i < size; ++i)
~~^~~~~~
In file included from simpleOnnx_1.cpp:29:0:
ioHelper.h: In instantiation of ‘void nvinfer1::Destroy::operator()(T) const [with T = nvinfer1::IBuilder]’:
/usr/include/c++/7/bits/unique_ptr.h:263:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = nvinfer1::IBuilder; _Dp = nvinfer1::Destroynvinfer1::IBuilder]’
simpleOnnx_1.cpp:55:110: required from here
ioHelper.h:53:9: warning: ‘void nvinfer1::IBuilder::destroy()’ is deprecated [-Wdeprecated-declarations]
t->destroy();
^
In file included from simpleOnnx_1.cpp:27:0:
/usr/include/aarch64-linux-gnu/NvInfer.h:7929:25: note: declared here
TRT_DEPRECATED void destroy() noexcept
^~~~~~~
In file included from simpleOnnx_1.cpp:29:0:
ioHelper.h: In instantiation of ‘void nvinfer1::Destroy::operator()(T*) const [with T = nvinfer1::INetworkDefinition]’:
/usr/include/c++/7/bits/unique_ptr.h:263:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = nvinfer1::INetworkDefinition; _Dp = nvinfer1::Destroynvinfer1::INetworkDefinition]’
simpleOnnx_1.cpp:56:132: required from here
ioHelper.h:53:9: warning: ‘void nvinfer1::INetworkDefinition::destroy()’ is deprecated [-Wdeprecated-declarations]
t->destroy();
^
In file included from simpleOnnx_1.cpp:27:0:
/usr/include/aarch64-linux-gnu/NvInfer.h:5856:25: note: declared here
TRT_DEPRECATED void destroy() noexcept
^~~~~~~
In file included from simpleOnnx_1.cpp:29:0:
ioHelper.h: In instantiation of ‘void nvinfer1::Destroy::operator()(T*) const [with T = nvonnxparser::IParser]’:
/usr/include/c++/7/bits/unique_ptr.h:263:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = nvonnxparser::IParser; _Dp = nvinfer1::Destroynvonnxparser::IParser]’
simpleOnnx_1.cpp:57:123: required from here
ioHelper.h:53:9: warning: ‘virtual void nvonnxparser::IParser::destroy()’ is deprecated [-Wdeprecated-declarations]
t->destroy();
^
In file included from simpleOnnx_1.cpp:30:0:
/usr/include/aarch64-linux-gnu/NvOnnxParser.h:197:33: note: declared here
TRT_DEPRECATED virtual void destroy() = 0;
^~~~~~~
In file included from simpleOnnx_1.cpp:29:0:
ioHelper.h: In instantiation of ‘void nvinfer1::Destroy::operator()(T*) const [with T = nvinfer1::IBuilderConfig]’:
/usr/include/c++/7/bits/unique_ptr.h:263:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = nvinfer1::IBuilderConfig; _Dp = nvinfer1::Destroynvinfer1::IBuilderConfig]’
simpleOnnx_1.cpp:58:113: required from here
ioHelper.h:53:9: warning: ‘void nvinfer1::IBuilderConfig::destroy()’ is deprecated [-Wdeprecated-declarations]
t->destroy();
^
In file included from simpleOnnx_1.cpp:27:0:
/usr/include/aarch64-linux-gnu/NvInfer.h:7535:25: note: declared here
TRT_DEPRECATED void destroy() noexcept
^~~~~~~
In file included from simpleOnnx_1.cpp:29:0:
ioHelper.h: In instantiation of ‘void nvinfer1::Destroy::operator()(T*) const [with T = nvinfer1::ICudaEngine]’:
/usr/include/c++/7/bits/unique_ptr.h:263:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = nvinfer1::ICudaEngine; _Dp = nvinfer1::Destroynvinfer1::ICudaEngine]’
simpleOnnx_1.cpp:135:65: required from here
ioHelper.h:53:9: warning: ‘void nvinfer1::ICudaEngine::destroy()’ is deprecated [-Wdeprecated-declarations]
t->destroy();
^
In file included from /usr/include/aarch64-linux-gnu/NvInfer.h:54:0,
from simpleOnnx_1.cpp:27:
/usr/include/aarch64-linux-gnu/NvInferRuntime.h:1434:25: note: declared here
TRT_DEPRECATED void destroy() noexcept
^~~~~~~
In file included from simpleOnnx_1.cpp:29:0:
ioHelper.h: In instantiation of ‘void nvinfer1::Destroy::operator()(T*) const [with T = nvinfer1::IExecutionContext]’:
/usr/include/c++/7/bits/unique_ptr.h:263:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = nvinfer1::IExecutionContext; _Dp = nvinfer1::Destroynvinfer1::IExecutionContext]’
simpleOnnx_1.cpp:137:78: required from here
ioHelper.h:53:9: warning: ‘void nvinfer1::IExecutionContext::destroy()’ is deprecated [-Wdeprecated-declarations]
t->destroy();
^
In file included from /usr/include/aarch64-linux-gnu/NvInfer.h:54:0,
from simpleOnnx_1.cpp:27:
/usr/include/aarch64-linux-gnu/NvInferRuntime.h:1888:25: note: declared here
TRT_DEPRECATED void destroy() noexcept
^~~~~~~
: recipe for target 'simpleOnnx_1.o' failed
make: *** [simpleOnnx_1.o] Error 1
How can solve this??