Description
Based on the sampleNonZeroPlugin I unsuccessfully tried to create a Plugin V3 for Unique operator.
I took the NonZero PIugIn V3 source code and tried to adapted it according to the Unique Onnx operator definition.
For now, i leaved the enqueue method empty because I just wanted to verify that all other inherited methods were implemented correctly by me.
I created a very small Onnx model which contain only one Unique layer which i changed its type to be TRT_Unique.
The Onnx parser correctly identify that my Unique PlugIn was registered but the buildSerializedNetwork API throw an assert: Error Code 4: API Usage Error (IPluginV3Layer Unique: Assertion canBeSizeTensor(*t) failed. )
Environment
TensorRT Version: 10.7
GPU Type: GeForce RTX 4090 Laptop GPU
Nvidia Driver Version: R566.07 (r565_00) / 32.0.15.6607 (10-20-2024)
CUDA Version: 12.3
CUDNN Version: 8.9.7
Operating System + Version: Windows 11 Pro, version - 10.0.26100 Build 26100
Python Version (if applicable): 3.10.11
TensorFlow Version (if applicable): NA
PyTorch Version (if applicable): 2.6.0+cu124
Baremetal or Container (if container which image + tag): Baremetal
Relevant Files
Attach is my Onnx model test
TRT_unique_model.zip (323 Bytes)
Attach is the Unique PlugIn source code -
UniquePlugIn.zip (6.3 KB)
Steps To Reproduce
Regular TensorRT C++ sequence to create a builder, builder config, network, parser and finally call to buildSerializedNetwork API.
No special setting and config only defaults…
Thanks,