[X] I've searched other issues and no duplicate issues were found.
[X] I've agreed with the maintainers that I can plan this task.
Description
--- stderr: tensorrt_yolo
/home/kenji/autoware/src/universe/autoware.universe/perception/tensorrt_yolo/lib/src/trt_yolo.cpp: In member function ‘void yolo::Net::load(const string&)’:
/home/kenji/autoware/src/universe/autoware.universe/perception/tensorrt_yolo/lib/src/trt_yolo.cpp:69:72: error: ‘nvinfer1::ICudaEngine* nvinfer1::IRuntime::deserializeCudaEngine(const void*, std::size_t, nvinfer1::IPluginFactory*)’ is deprecated [-Werror=deprecated-declarations]
69 | unique_ptr<nvinfer1::ICudaEngine>(runtime_->deserializeCudaEngine(buffer, size, nullptr));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/NvInfer.h:54,
from /home/kenji/autoware/src/universe/autoware.universe/perception/tensorrt_yolo/lib/include/calibrator.hpp:45,
from /home/kenji/autoware/src/universe/autoware.universe/perception/tensorrt_yolo/lib/src/trt_yolo.cpp:37:
/usr/include/x86_64-linux-gnu/NvInferRuntime.h:672:43: note: declared here
672 | TRT_DEPRECATED nvinfer1::ICudaEngine* deserializeCudaEngine(
| ^~~~~~~~~~~~~~~~~~~~~
/home/kenji/autoware/src/universe/autoware.universe/perception/tensorrt_yolo/lib/src/trt_yolo.cpp: In constructor ‘yolo::Net::Net(const string&, const string&, int, const yolo::Config&, const std::vector<std::__cxx11::basic_string<char> >&, const string&, bool, size_t)’:
/home/kenji/autoware/src/universe/autoware.universe/perception/tensorrt_yolo/lib/src/trt_yolo.cpp:256:77: error: ‘nvinfer1::ICudaEngine* nvinfer1::IBuilder::buildEngineWithConfig(nvinfer1::INetworkDefinition&, nvinfer1::IBuilderConfig&)’ is deprecated [-Werror=deprecated-declarations]
256 | engine_ = unique_ptr<nvinfer1::ICudaEngine>(builder->buildEngineWithConfig(*network, *config));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
In file included from /home/kenji/autoware/src/universe/autoware.universe/perception/tensorrt_yolo/lib/include/calibrator.hpp:45,
from /home/kenji/autoware/src/universe/autoware.universe/perception/tensorrt_yolo/lib/src/trt_yolo.cpp:37:
/usr/include/x86_64-linux-gnu/NvInfer.h:8640:43: note: declared here
8640 | TRT_DEPRECATED nvinfer1::ICudaEngine* buildEngineWithConfig(
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/kenji/autoware/src/universe/autoware.universe/perception/tensorrt_yolo/lib/src/trt_yolo.cpp:41:
/home/kenji/autoware/src/universe/autoware.universe/perception/tensorrt_yolo/lib/include/trt_yolo.hpp: In instantiation of ‘void yolo::Deleter::operator()(T*) const [with T = nvinfer1::IRuntime]’:
/usr/include/c++/11/bits/unique_ptr.h:361:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = nvinfer1::IRuntime; _Dp = yolo::Deleter]’
/home/kenji/autoware/src/universe/autoware.universe/perception/tensorrt_yolo/lib/include/trt_yolo.hpp:132:45: required from here
/home/kenji/autoware/src/universe/autoware.universe/perception/tensorrt_yolo/lib/include/trt_yolo.hpp:62:19: error: ‘void nvinfer1::IRuntime::destroy()’ is deprecated [-Werror=deprecated-declarations]
62 | obj->destroy();
| ~~~~~~~~~~~~^~
In file included from /usr/include/x86_64-linux-gnu/NvInfer.h:54,
from /home/kenji/autoware/src/universe/autoware.universe/perception/tensorrt_yolo/lib/include/calibrator.hpp:45,
from /home/kenji/autoware/src/universe/autoware.universe/perception/tensorrt_yolo/lib/src/trt_yolo.cpp:37:
/usr/include/x86_64-linux-gnu/NvInferRuntime.h:716:25: note: declared here
716 | TRT_DEPRECATED void destroy() noexcept
| ^~~~~~~
In file included from /home/kenji/autoware/src/universe/autoware.universe/perception/tensorrt_yolo/lib/src/trt_yolo.cpp:41:
/home/kenji/autoware/src/universe/autoware.universe/perception/tensorrt_yolo/lib/include/trt_yolo.hpp: In instantiation of ‘void yolo::Deleter::operator()(T*) const [with T = nvinfer1::ICudaEngine]’:
/usr/include/c++/11/bits/unique_ptr.h:361:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = nvinfer1::ICudaEngine; _Dp = yolo::Deleter]’
/home/kenji/autoware/src/universe/autoware.universe/perception/tensorrt_yolo/lib/include/trt_yolo.hpp:133:47: required from here
/home/kenji/autoware/src/universe/autoware.universe/perception/tensorrt_yolo/lib/include/trt_yolo.hpp:62:19: error: ‘void nvinfer1::ICudaEngine::destroy()’ is deprecated [-Werror=deprecated-declarations]
62 | obj->destroy();
| ~~~~~~~~~~~~^~
Purpose
To resolve warnings.
Possible approaches
Use new APIs.
Definition of done
No error after -Wno-deprecated-declarations is removed.
Checklist
Description
Purpose
To resolve warnings.
Possible approaches
Use new APIs.
Definition of done
No error after
-Wno-deprecated-declarations
is removed.