How to use TensorRT's official op modulatedDeformConvPlugin to replace customized MMCVmodulatedDeformConvPlugin for a ONNX model

Description

I have a onnx model contained a customed MMCVModulatedDeformConv2d which was modulated deformable convolution and implemented by MMCV, now I find it is implemented in TensorRT-V10.0.6 officially(below v8.2.x, it was not available, the user who needed it must resorted to a custom plugin ). so I want to use officicail ops to replace the customized one, and then thus I can use
TensorRT-V10.0.6’s trtexec to convert my onnx model to tensorrt model

Environment

TensorRT Version: v10.0.0.6
GPU Type: 3060
Nvidia Driver Version: 525.147.05
CUDA Version: 11.3
CUDNN Version:
Operating System + Version: Ubuntu20.04
Python Version (if applicable):
TensorFlow Version (if applicable):
PyTorch Version (if applicable): 1.12
Baremetal or Container (if container which image + tag):

I modified MMCVModulatedDeformConv2d to
ModulatedDeformConv2d in my onnx model , try to let TensorRT-V10.0.6 regonize ModulatedDeformConv2d, it failed


import onnx
from onnx import numpy_helper

def modify_op_names(onnx_model_path, modified_model_path, name_old, name_new):
    # Load the ONNX model
    model = onnx.load(onnx_model_path)

    # Traverse the graph
    for node in model.graph.node:
        # Check if the current node's name matches the old name
        if node.name == name_old:
            # Modify the name of the node
            node.name = name_new
            print('name modified!')

    # Save the modified model
    onnx.save(model, modified_model_path)

def modify_op_type(onnx_model_path, modified_model_path, type_old, type_new):
    # Load the ONNX model
    model = onnx.load(onnx_model_path)

    # Traverse the graph
    for node in model.graph.node:
        # Check if the current node's name matches the old name
        if node.op_type == type_old:
            # Modify the name of the node
            node.op_type = type_new
            print('typed modified!')

    # Save the modified model
    onnx.save(model, modified_model_path)

# Example usage
onnx_model_path = "smoke_dla34.onnx"
modified_model_path = "smoke_dla34_modified_tyte.onnx"
#modify_op_names(onnx_model_path, modified_model_path, "MMCVModulatedDeformConv2d_447", "MMCVModulatedDeformConv2d_447_ytx")
modify_op_type(onnx_model_path, modified_model_path, "MMCVModulatedDeformConv2d", "ModulatedDeformConv2d")

./trtexec --onnx=smoke_dla34_modified_type.onnx --saveEngine=smoke_dla34_modified_type_trt10.0.0.6.trt --verbose >smoke_dla34_modified_type.log

Here my log file
smoke_dla34_modified_type.log (397.1 KB)