Plugin-related error when executing dwDNN_initializeTensorRTFromFile()

Please provide the following info (tick the boxes after creating this topic):
Software Version
DRIVE OS 6.0.8.1
DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other

Target Operating System
Linux
QNX
other

Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-300)
DRIVE AGX Orin Developer Kit (940-63710-0010-200)
DRIVE AGX Orin Developer Kit (940-63710-0010-100)
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
DRIVE AGX Orin Developer Kit (not sure its number)
other

SDK Manager Version
1.9.3.10904
other

Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other

■ Purpose
Load the TensorRT engine by calling dwDNN_initializeTensorRTFromFile()

■ status
The conversion from the ONNX model to the TensorRT model has been completed using trtexec. However, when executing dwDNN_initializeTensorRTFromFile(), the following error is output:

[27-05-2024 15:59:35] 1: [pluginV2Runner.cpp::load::299] Error Code 1: Serialization (Serialization assertion creator failed. Cannot deserialize plugin since corresponding IPluginCreator not found in Plugin Registry) [27-05-2024 15:59:35] 4: [runtime.cpp::deserializeCudaEngine::65] Error Code 4: Internal Error (Engine deserialization failed.) [27-05-2024 15:59:35] Driveworks exception thrown: DW_DNN_INVALID_MODEL: DNN:

■ What I want to know
Cause of this error and how to resolve it.

■Reference
Here is the log when converting the model:
trtexec_log.txt (133.8 KB)

Dear @HIENG_NS,
You need to use DriveWorks SDK Reference: TensorRT Optimizer Tool to generate compatible with DW DNN framework

@SivaRamaKrishnaNV
I converted it using TensorRT Optimizer Tool, but the result did not change.

@SivaRamaKrishnaNV
Reviewing the logs, it appears that there are layers using plugins. Is this related to the cause?
[05/28/2024-10:43:15] [I] [TRT] [GpuLayer] PLUGIN_V2: /stem_2/stem_2.0/IN/InstanceNormalization

Dear @HIENG_NS,
From error it looks related to plugin layer. Can you share your model?

Dear @SivaRamaKrishnaNV
Here are the ONNX model and the converted TRT model files.
trt.zip (50.7 MB)
onnx.zip (44.4 MB)

Dear @SivaRamaKrishnaNV

Any update on this?

Dear @SivaRamaKrishnaNV
The model has been successfully loaded.
The following is the solution

・Upgrade DRIVE OS to 6.0.8.1
・Add the following to the source code
include “NvInferPlugin.h”
bool didInitPlugins = initLibNvInferPlugins(nullptr, “”);

1 Like

Yes. trtrexec sample calls initLibNvInferPlugins() to load the prebuilt plugins.