Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wts转换engine报错 #1403

Closed
wanglianglll opened this issue Nov 11, 2023 · 4 comments
Closed

wts转换engine报错 #1403

wanglianglll opened this issue Nov 11, 2023 · 4 comments
Labels
wontfix This will not be worked on

Comments

@wanglianglll
Copy link

Env

  • GPU, RTX3070Ti,Laptop
  • OS, Ubuntu20.04
  • Cuda version 11.4
  • TensorRT version 8.5.2.2

About this repo

  • which branch/tag/commit are you using?yolov5-v6.2
  • which model? :yolov5

Your problem

在模型转换的时候,输出如下:
Build engine successfully!
[11/11/2023-10:22:11] [E] [TRT] 3: [builder.cpp::~Builder::307] Error Code 3: API Usage Error (Parameter check failed at: optimizer/api/builder.cpp::~Builder::307, condition: mObjectCounter.use_count() == 1. Destroying a builder object before destroying objects it created leads to undefined behavior.
经debug找到上面报错的语句来自APItoModel函数中的 builder->destroy();这一句,这是为什么啊佬?

@wang-xinyu
Copy link
Owner

试试最新的yolov5-v7.0?

@Mr-MoNET
Copy link

Mr-MoNET commented Nov 13, 2023

朋友,我也遇到了跟你同样的情况,但是我是在生成engine后才报这个错误,engine也可以正常使用,没有受到影响。虽然能用,但是还是想学习学习,这具体是哪部分的原因造成的?
1699880749534

@wanglianglll
Copy link
Author

将APItoModel中的builder->destroy();和config->destroy();以及主函数中的modelStream->destroy();注释就好了,应该是因为版本更新后这个功能已经不在使用了,我们的用法导致二次释放

Copy link

stale bot commented Jan 13, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jan 13, 2024
@stale stale bot closed this as completed Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants