mmdeploy icon indicating copy to clipboard operation
mmdeploy copied to clipboard

[Bug] Plugin load error in board infer

Open Mandylove1993 opened this issue 1 year ago • 3 comments

Checklist

  • [X] I have searched related issues but cannot get the expected help.
  • [x] 2. I have read the FAQ documentation but cannot get the expected help.
  • [x] 3. The bug has not been fixed in the latest version.

Describe the bug

I use mmdeploy exported XXX.trt, but when I use the XXX.trt, it output the error: image

Reproduction

I what use mmdeploy's plugin so to my deployment code,how can I link it? I want to run my model in OrinX

Environment

TensorRT:8.6
cuda 11.3
torch 1.10.1

Error traceback

No response

Mandylove1993 avatar Jul 18 '24 07:07 Mandylove1993

Assuming plain TensorRT library inference using C++ based on the screenshot. My understanding is we need to load the plugins by (1) loading the libmmdeploy_tensorrt_ops.so library, (2) calling initLibNvInferPlugins in the C++ code before using the model.

For some reason compiling my code with the ops library using target_link_libraries in CMake was not fixing it, and I don't see the library linked with ldd on my exe either. But loading at runtime using dlopen is removing the plugin not found error. Curious if anyone has an idea what I am doing wrong with the former approach.

matthost avatar Aug 05 '24 21:08 matthost

Assuming plain TensorRT library inference using C++ based on the screenshot. My understanding is we need to load the plugins by (1) loading the libmmdeploy_tensorrt_ops.so library, (2) calling initLibNvInferPlugins in the C++ code before using the model.

For some reason compiling my code with the ops library using target_link_libraries in CMake was not fixing it, and I don't see the library linked with ldd on my exe either. But loading at runtime using dlopen is removing the plugin not found error. Curious if anyone has an idea what I am doing wrong with the former approach.

Me too!

Mandylove1993 avatar Aug 06 '24 08:08 Mandylove1993

I also don't see initLibNvInferPlugins here in the mmdeploy repo. Not sure how they are doing it so far

matthost avatar Aug 07 '24 23:08 matthost