I updated my TensorRT version to 8.5 and got warnings about deprecated functions.
I found solutions for some of it and would like to ask if the fixes I made are correct and what the solutions for the others.
-
nvinfer1::ICudaEngine* nvinfer1::IBuilder::buildEngineWithConfig(nvinfer1::INetworkDefinition&, nvinfer1::IBuilderConfig&):
“Deprecated in TensorRT 8.0. Superseded by IBuilder::buildSerializedNetwork().”
buildEngineWithConfigreturnsICudaEngine,buildSerializedNetworkreturnsIHostMemory, ifbuildEngineWithConfigis deprecated, how can I createICudaEngine? -
nvinfer1::ICudaEngine* nvinfer1::IRuntime::deserializeCudaEngine(const void*, std::size_t, nvinfer1::IPluginFactory*):
“Deprecated in TensorRT 8.0.”
Found updated version:
ICudaEngine * nvinfer1::IRuntime::deserializeCudaEngine(void const * blob, std::size_t size)
Is this a valid replacement? -
void nvinfer1::IRuntime::destroy()
“Deprecated interface will be removed in TensorRT 10.0.”
Is this function not needed and I can remove it from my code? -
void nvinfer1::IHostMemory::destroy()
" Deprecated in TRT 8.0. Superseded bydelete."
What isdelete? -
void nvinfer1::IBuilderConfig::setMaxWorkspaceSize(std::size_t):
" Deprecated in TensorRT 8.3. Superseded by IBuilderConfig::setMemoryPoolLimit() with MemoryPoolType::kWORKSPACE."
So I should usevoid nvinfer1::IBuilderConfig::setMemoryPoolLimit(MemoryPoolType pool, std::size_t poolSize)withpool = nvinfer1::MemoryPoolType::kWORKSPACE? -
void nvinfer1::IBuilder::setMaxBatchSize(int32_t):
“Deprecated in TensorRT 8.4.”
Does this functionality deprecate? -
bool nvinfer1::IExecutionContext::enqueueV2(void* const*, cudaStream_t, CUevent_st**):
“Superseded by enqueueV3(). Deprecated in TensorRT 8.5”
enqueueV3()receives onlystreamas an argument, in the current implementation withenqueueV()I passbindingsas well, does it no longer needed? -
int32_t nvinfer1::ICudaEngine::getBindingIndex(const char*) const
nvinfer1::Dims nvinfer1::ICudaEngine::getBindingDimensions(int32_t) const:
“Deprecated in TensorRT 8.5. Superseded by name-based methods. Use them instead of binding-index based methods.”
“Deprecated in TensorRT 8.5. Superseded by getTensorShape().”So instead of:
int32_t index getBindingIndex("name");
Dims dims getBindingDimensions(index);
Should I write:
Dims dims getTensorShape("name");?