TensorRT
TensorRT copied to clipboard
TensorRT 8.5 deprecated functions
I updated my TensorRT version to 8.5 and got warnings about deprecated functions, opened question on NVIDIA developer forums tensorrt-8-5-depecated-functions.
I used void nvinfer1::IRuntime::destroy() and it Deprecated interface will be removed in TensorRT 10.0.
Is this function not needed and can I remove it from my code?
Code:
IRuntime *runtime = createInferRuntime(gLogger);
ICudaEngine *engine = runtime->deserializeCudaEngine(trtModelStream_.data(), trtModelStream_.size(), nullptr);
runtime->destroy();
Should convert to:
IRuntime *runtime = createInferRuntime(gLogger);
ICudaEngine *engine = runtime->deserializeCudaEngine(trtModelStream_.data(), trtModelStream_.size());
Just remove runtime->destroy();?
use delete runtime or use smart pointer.
Deprecated interface will be removed in TensorRT 10.0.
it means if you compile the code with TRT 10.0, you will get compile error.
closing since no activity for more than 3 weeks, thanks all!