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

虽然最终得到了engine模型,但是报了这个错误,我是否应该忽视 #1536

Open
22ling opened this issue Jun 4, 2024 · 1 comment

Comments

@22ling
Copy link

22ling commented Jun 4, 2024

Env

  • GPU3090ti
  • Win11
  • Cuda version:11.8
  • TensorRT version:8.6.1.6

About this repo

  • tag: yolov5s v6.0
  • yolov5

My problem

  • my command:
    yolov5.exe -s yolo5_wc_10_5x5.wts yolov5_4x5_bt256.engine s

  • what's your output?
    [06/04/2024-10:20:35] [W] [TRT] The implicit batch dimension mode has been deprecated. Please create the network with NetworkDefinitionCreationFlag::kEXPLICIT_BATCH flag whenever possible.
    Loading weights: yolo5_wc_10_5x5.wts
    Building engine, please wait for a while...
    [06/04/2024-10:27:06] [W] [TRT] TensorRT encountered issues when converting weights between types and that could affect accuracy.
    [06/04/2024-10:27:06] [W] [TRT] If this is not the desired behavior, please modify the weights or retrain with regularization to adjust the magnitude of the weights.
    [06/04/2024-10:27:06] [W] [TRT] Check verbose logs for the list of affected weights.
    [06/04/2024-10:27:06] [W] [TRT] - 50 weights are affected by this issue: Detected subnormal FP16 values.
    [06/04/2024-10:27:06] [W] [TRT] - 2 weights are affected by this issue: Detected values less than smallest positive FP16 subnormal value and converted them to the FP16 minimum subnormalized value.
    Build engine successfully!
    [06/04/2024-10:27:06] [E] [TRT] 3: [builder.cpp::nvinfer1::builder::Builder::~Builder::341] Error Code 3: API Usage Error (Parameter check failed at: builder.cpp::nvinfer1::builder::Builder::~Builder::341, condition: mObjectCounter.use_count() == 1. Destroying a builder object before destroying objects it created leads to undefined behavior.
    )

  • what output do you expect?
    why appear"[06/04/2024-10:27:06] [E] [TRT] 3: [builder.cpp::nvinfer1::builder::Builder::~Builder::341] Error Code 3: API Usage Error (Parameter check failed at: builder.cpp::nvinfer1::builder::Builder::~Builder::341, condition: mObjectCounter.use_count() == 1. Destroying a builder object before destroying objects it created leads to undefined behavior.
    )",shouild i ignore or take some meatures?

@22ling 22ling changed the title --GPU 3090ti 虽然最终得到了engine模型,但是报了这个错误,我是否应该忽视 Jun 4, 2024
@arkerman
Copy link

arkerman commented Jun 4, 2024

@22ling

trt版本更新到8.5之后的问题。

主要是CUDA释放内存顺序不对,需要看一下在定义builder、engine、runtime指针时的顺序,在释放内存时,需要倒序释放,还要看看你有没有定义二级指针,destroy的时候也要注意释放的顺序

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants