本文主要是介绍【tensorrt】——tensorrt7.2.2.3插件书写问题,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
tensorrt
1. 问题1
/home/darknet/CM/profile/TensorRT-7.2.2.3/include/NvInferRuntime.h:665:12: error: overriding final function ‘virtual size_t nvinfer1::IPluginV2DynamicExt::getWorkspaceSize(int32_t) const’
size_t getWorkspaceSize(int32_t /maxBatchSize/) const _TENSORRT_FINAL TRTNOEXCEPT
解决方案
注释掉函数的实现
2. 问题2
error: overriding final function ‘virtual size_t nvinfer1::IPluginV2DynamicExt::getWorkspaceSize(int32_t) const’
size_t getWorkspaceSize(int32_t /maxBatchSize/) const _TENSORRT_FINAL TRTNOEXCEPT
解决方案
tensorrt7.2.2.3 IPluginV2DynamicExt,API改变了。
新的api改为了:
size_t getWorkspaceSize(const nvinfer1::PluginTensorDesc *inputs,int nbInputs,const nvinfer1::PluginTensorDesc *outputs,int nbOutputs) const {return 0;}
3. 问题3
error: overriding final function ‘virtual int32_t nvinfer1::IPluginV2DynamicExt::enqueue(int32_t, const void* const*, void**, void*, cudaStream_t)’
int32_t enqueue(int32_t /batchSize/, const void* const* /inputs/, void** /outputs/, void* /workspace/,
这篇关于【tensorrt】——tensorrt7.2.2.3插件书写问题的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!