FeiYull / TensorRT-Alpha

🔥🔥🔥TensorRT for YOLOv8、YOLOv8-Pose、YOLOv8-Seg、YOLOv8-Cls、YOLOv7、YOLOv6、YOLOv5、YOLONAS......🚀🚀🚀CUDA IS ALL YOU NEED.🍎🍎🍎
GNU General Public License v2.0
1.25k stars 195 forks source link

warning:[E] [TRT] 3: [runtime.cpp::~Runtime::346] Error Code 3: API Usage Error (Parameter check failed at: runtime/rt/runtime.cpp::~Runtime::346, condition: mEngineCounter.use_count() == 1. Destroying a runtime before destroying deserialized engines created by the runtime leads to undefined behavior. #90

Open FeiYull opened 4 months ago

FeiYull commented 4 months ago

warning:[E] [TRT] 3: [runtime.cpp::~Runtime::346] Error Code 3: API Usage Error (Parameter check failed at: runtime/rt/runtime.cpp::~Runtime::346, condition: mEngineCounter.use_count() == 1. Destroying a runtime before destroying deserialized engines created by the runtime leads to undefined behavior.

38D1385F1608CCB649091E16D74CE69E

[solution]:eg: 更换声明下面runtime变量到新的位置

runtime原始声明位置: https://github.com/FeiYull/TensorRT-Alpha/blob/87fdb72056682835ab06e417f7d51f483e197ebf/yolov8/yolov8.cpp#L19

runtime新的原始声明位置: https://github.com/FeiYull/TensorRT-Alpha/blob/87fdb72056682835ab06e417f7d51f483e197ebf/utils/yolo.h#L26

FeiYull commented 4 months ago

reference: https://github.com/FeiYull/TensorRT-Alpha/issues/91#issuecomment-1970319941

FeiYull @.***

------------------ Original ------------------ From: Myreaeee @.> Date: Thu,Mar 7,2024 5:21 PM To: FeiYull/TensorRT-Alpha @.> Cc: FeiYull @.>, Author @.> Subject: Re: [FeiYull/TensorRT-Alpha] warning:[E] [TRT] 3:[runtime.cpp::~Runtime::346] Error Code 3: API Usage Error (Parameter checkfailed at: runtime/rt/runtime.cpp::~Runtime::346, condition:mEngineCounter.use_count() == 1. Destroying a runtime before destroyingdeserialized engines created by the runtime leads to undefined behavior.(Issue #90)

i have added codes in yolo.h, why it still didnot work protected: std::unique_ptrnvinfer1::IRuntime runtime; std::shared_ptrnvinfer1::ICudaEngine m_engine; std::unique_ptrnvinfer1::IExecutionContext m_context; protected:
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>