ERROR: ../tSafe/coreReadArchive.cpp (38) - Serialization Error in verifyHeader: 0 (Version tag does

部署运行你感兴趣的模型镜像

Tenserrt trt使用engine infer时候报错

问题

构建YOLOV5s模型,并试图使用trt推理服务上,出现错误

[TensorRT] ERROR: ../rtSafe/coreReadArchive.cpp (38) - Serialization Error in verifyHeader: 0 (Version tag does not match)
[TensorRT] ERROR: INVALID_STATE: std::exception
[TensorRT] ERROR: INVALID_CONFIG: Deserialize the cuda engine failed.

报错原因:

编译engine时候的使用的tensorrt版本与使用trt推理时候的tensorrt版本不一致,需要一致才行
在这里插入图片描述

解决办法

  • 确认每个环节的tensorrt版本,确保一致性;
  • 进入项目下的build文件夹,看看yolov5编译文件的动态链接库
    • ldd yolov5
      在这里插入图片描述
      可以看到build的时候用的是tensorrt 6.0版本,而python安装的tensorrt是7.0版本,版本不匹配导致这个问题

基于此,去/usr/local/cuda/lib64文件夹下,将与tensorrt6.0相关的文件删除,解决上述问题

修改完后正常运行,速度变得很快
在这里插入图片描述

在这里插入图片描述

参考

您可能感兴趣的与本文相关的镜像

Yolo-v8.3

Yolo-v8.3

Yolo

YOLO(You Only Look Once)是一种流行的物体检测和图像分割模型,由华盛顿大学的Joseph Redmon 和Ali Farhadi 开发。 YOLO 于2015 年推出,因其高速和高精度而广受欢迎

Sources operating in SPR mode Shallimplement over current protection to prevent damage from output current that exceeds the current handling capability of the Source. The definition of current handling capability is left to the discretion of the Source implementation and Shalltake into consideration the current handling capability of the connector contacts. If the over current protection implementation does not use a Hard Reset or Error Recovery, it Shall Notinterfere with the negotiated VBUScurrent level.After three consecutive over current events Source Shallgo to ErrorRecovery.Sources Shouldattempt to send Hard Resetsignalingwhen over current protection engages followed by an AlertMessage indicating an OCP event once an Explicit Contract has been established. The over current protection response Mayengage at either the port or system level. Systems or ports that have engaged over current protection Shouldattempt to resume USB Default Operation after determining that the cause of over current is no longer present and Maylatch off to protect the port or system. The definition of how to detect if the cause of over current is still present is left to the discretion of the Source implementation.The Source Shallrenegotiate with the Sink (or Sinks) after choosing to resume USB Default Operation . The decision of how to renegotiate after an over current event is left to the discretion of the Source implementation.The Source Shallprevent continual system or port cycling if over current protection continues to engage after initially resuming either USB Default Operation or renegotiation. Latching off the port or system is an acceptable response to recurring over current.During the over current response and subsequent system or port shutdown, all affected Source ports operating with VBUSgreater than vSafe5VShalldischarge VBUSto vSafe5Vby the time tSafe5Vand vSafe0Vby the time tSafe0V. 翻译上面的话
07-18
评论 7
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

uncle_ll

你的鼓励将是我创作的最大动力

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

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

打赏作者

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

抵扣说明:

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

余额充值