IPluginExt::configureWithFormat() isn't called prior to IPluginExt::initialize()

Documentation says configureWithFormat will be called prior to initialize():

https://docs.nvidia.com/deeplearning/sdk/tensorrt-api/c_api/classnvinfer1_1_1_i_plugin_ext.html#ad8373248e17a7184a3811d9c21e51d7e

However, not seeing this happening – when deserializeCudaEngine is called, it seems to go straight to initialize() without configureWithFormat() ever being called.

Any other way to let custom plugin know the input dimensions before it is initialized?

Hi alexm5m91,

I suppose you’re talking about your own plugin layers?

I agree their documentation is not great in this regard. However, when you’re using deserializeCudaEngine, you read from some serialized data. It’s up to you what you’d like to write to that data, and you can write to it things that configureWithFormat might do. In other words, write all you need to the serialization stream to be able to reinstantiate your plugin later.

Cheers,
Tom

Hi,

Please refer to below plugin samples and TRT plugins:
https://github.com/NVIDIA/TensorRT/tree/release/6.0/samples/opensource/samplePlugin
https://github.com/NVIDIA/TensorRT/tree/release/6.0/samples/opensource/sampleUffPluginV2Ext
https://github.com/NVIDIA/TensorRT/tree/release/6.0/plugin

Thanks