Enviroments:
Jetson: JetPack 4.5
Devide: Xavier
The same codes word quite well on x86 system.
Error information:
This code can be refered to this link:
I think it might be some encoding problem of files.
NVES
June 28, 2021, 9:08am
2
Hi,
This looks like a Jetson issue. We recommend you to raise it to the respective platform from the below link
Discussions relating to the Jetson DevKits and other Embedded computing devices
Thanks!
Hi @290844930 ,
This looks like registering custom plugin issue. Hope following may help you.
opened 05:05PM - 26 Jul 20 UTC
closed 01:26PM - 12 Mar 21 UTC
wontfix
I'm trying to run the serialized yolov4 engine with trtexec, which comes include… d in the TensorRT NGC docker containers. But anyway: it basically loads the serialized engine and runs inference - not much different from what yolov4.cpp does.
`docker run --gpus all -it --rm -v $(pwd)/tensorrtx:/tensorrtx nvcr.io/nvidia/tensorrt:19.10-py3`
`cd /workspace/tensorrt/bin`
`./trtexec --loadEngine=/tensorrtx/yolov4/build/yolov4.engine --verbose`
```bash
...
[06/26/2020-16:59:06] [E] [TRT] INVALID_ARGUMENT: getPluginCreator could not find plugin Mish_TRT version 1
[06/26/2020-16:59:06] [E] [TRT] safeDeserializationUtils.cpp (259) - Serialization Error in load: 0 (Cannot deserialize plugin since corresponding IPluginCreator not found in Plugin Registry)
[06/26/2020-16:59:06] [E] [TRT] INVALID_STATE: std::exception
[06/26/2020-16:59:06] [E] [TRT] INVALID_CONFIG: Deserialize the cuda engine failed.
[06/26/2020-16:59:06] [E] Engine could not be created
&&&& FAILED TensorRT.trtexec # ./trtexec --loadEngine=/tensorrtx/yolov4/build/yolov4.engine --verbose
```
This obviously fails because TensorRT does not load the plugin containing Mish Activation and Yolo Layer. So next I tried:
`./trtexec --loadEngine=/tensorrtx/yolov4/build/yolov4.engine --plugins=/tensorrtx/yolov4/build/libmyplugins.so --verbose`
```bash
...
[06/26/2020-17:02:26] [I] Loading supplied plugin library: /tensorrtx/yolov4/build/libmyplugins.so
[06/26/2020-17:02:27] [E] [TRT] INVALID_ARGUMENT: getPluginCreator could not find plugin Mish_TRT version 1
[06/26/2020-17:02:27] [E] [TRT] safeDeserializationUtils.cpp (259) - Serialization Error in load: 0 (Cannot deserialize plugin since corresponding IPluginCreator not found in Plugin Registry)
[06/26/2020-17:02:27] [E] [TRT] INVALID_STATE: std::exception
[06/26/2020-17:02:27] [E] [TRT] INVALID_CONFIG: Deserialize the cuda engine failed.
[06/26/2020-17:02:27] [E] Engine could not be created
&&&& FAILED TensorRT.trtexec # ./trtexec --loadEngine=/tensorrtx/yolov4/build/yolov4.engine --plugins=/tensorrtx/yolov4/build/libmyplugins.so --verbose
```
So it loads the library containing the plugin but it does not seem to register the plugin correctly. I checked the same approach with a different tensorrt engine using custom layers and it worked. Is there any trick to loading your custom plugins @wang-xinyu ? Is selecting the correct `arch=compute_30;code=sm_30` in the CMakeList.txt important? Is it possible to run the engine in a "standardized" way outside of your custom loading code in yolov4.cpp?
Any hint greatly appreciated! :)
Edit: I tried with different TensorRT versions, including the most recent 20.06 container which comes with 7.1.2
Thank you.
Hello, spolisetty, many thanks for your kindly reply.
My problem is different from this above mentioned issue. It should be able to find this plugin. At the very beginning when convert wts weights file to trt engine file, it works anyway on jetson platform. However, when I load this serialized engine again, the plugin name was somehow changed, please take a look at the screenshot above, some strange characters was append to the plugin name. That should be the root reason why plugin could not be found.
So when I followed the solution in this issue, it did not work.
@290844930 ,
Could you please share issue reproducible minimal script, steps and model to try from our end for better assistance.
Hey, thank you spolisetty. I have figured out thats the encoding problem of my code files. So its resovled now.