Jetson安装JetBot报error: ‘kNCHW’ is not a member of以及“nvinfer1::IPluginV2::enqueue” has no overrider等解决

46 篇文章 6 订阅
38 篇文章 2 订阅

 TensorRT 8 现已全面上市,并免费向 NVIDIA 开发者计划成员提供。用户还可从 TensorRT GitHub 库中获得最新版本插件、解析器和样本的开放源代码。

开源希望对像我这样的小白就是友好,希望大家都分享自己的问题共同进步

报错的地方忘了保存了方法记录一下英伟达的更新地址

Jetpack 4.5.1及以前的版本4.x里使用的是TensorRT 7.1.3,JetPack 4.6开始则是使用的TensorRT 8,由于我们在模型加速上多是建立在TensorRT的基础上的,而TensorRT 8没有完全保证对TensorRT 7.x的兼容,所以受TensorRT这个版本的变化对封装调用模型的部分代码是有影响的,在Jetpack 4.5 + Deepstream 5开发的程序涉及到AI模型的部分在Jetpack 4.6 + Deepstream 6下很可能编译都会出错,无法跑起来。Documentation Archives :: NVIDIA Deep Learning TensorRT Documentation

一、问题1:“Looser throw specifier for ‘xxxxxxxxxx’”
例子:
looser throw specifier for ‘virtual void Logger::log(nvinfer1::ILogger::Severity, const char*)’

解决:

在函数中加入noexcept
因为,在tensorrt8.0版本中函数的定义是:

void Logger::log(Severity severity, const char* msg) noexcept

所以自己的报错的函数对应也改为:

 virtual void log(Severity severity, const char* msg) noexcept override;

其他报错Looser throw specifier的同样解决方法,增加noexcept

参考连接TensorRT8 使用手记(2)noexcept 关键字的使用 - 简书 (jianshu.com)

二、报错如下:yololayer.h(54): warning: function “nvinfer1::IPluginV2::enqueue(int32_t, const void *const *, void *const *, void *, cudaStream_t)” is hidden by “nvinfer1::YoloLayerPlugin::enqueue” – virtual function override intended?

yololayer.cu(156): error: object of abstract class type “nvinfer1::YoloLayerPlugin” is not allowed:

pure virtual function “nvinfer1::IPluginV2::enqueue” has no overrider

yololayer.cu(299): error: object of abstract class type “nvinfer1::YoloLayerPlugin” is not allowed:
pure virtual function “nvinfer1::IPluginV2::enqueue” has no overrider

yololayer.cu(308): error: object of abstract class type “nvinfer1::YoloLayerPlugin” is not allowed:
pure virtual function “nvinfer1::IPluginV2::enqueue” has no overrider

解决方法:将virtual int enqueue(int batchSize, const voidconst * inputs, void** outputs, void workspace, cudaStream_t stream) override;改成virtual int32_t enqueue(int32_t batchSize, void const* const* inputs, void* const* outputs, void* workspace, cudaStream_t stream) noexcept;

参考连接如下

(4条消息) 如何将基于Jetpack 4.5 + Deepstream 5开发的程序升级到Jetpack 4.6 + Deepstream 6_Arnold-FY-Chen的博客-CSDN博客 (有未读消息)小车--AGX上移植程序,TensorRT版本升级遇到的问题(7.X---8.0.1.6)-pudn.com


 

三、error: ‘kNCHW’ is not a member of ‘nvinfer1::PluginFormat {aka nvinfer1::TensorFormat}’
         return (type == DataType::kFLOAT && format == PluginFormat::kNCHW);
参考连接TensorRT: nvinfer1 Namespace Reference (nvidia.com)

Looser throw specifier for 'virtual void Logger::log' - Deep Learning (Training & Inference) / TensorRT - NVIDIA Developer Forums 参考连接TensorRT8 使用手记(3)维度表示 - 简书 (jianshu.com)

参考连接【经验分享】TensorRT8 vs TensorRT7 接口增删汇总_wx621f3bb1e27ee的技术博客_51CTO博客 

 NVIDIA 发布TensorRT 8,在推理方面取得重大突破 - 知乎 (zhihu.com)

  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

无证驾驶梁嗖嗖

让我们解决Jetson使用问题

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值