Is there any step-by-step illustration of how to write my own plugin?


I have read the developer guide but still confused about how to write my own plugin. Specifically,

  1. How to get file
  2. How to extend IPluginV2DynamicExt class. What is the meaning of each class member?
  3. How to adapt my cuda kernel c++ code to a plugin? What is the input and output format?

Please refer to below links related custom plugin implementation and sample:

While IPluginV2 and IPluginV2Ext interfaces are still supported for backward compatibility with TensorRT 5.1 and 6.0.x respectively, however, we recommend that you write new plugins or refactor existing ones to target the IPluginV2DynamicExt or IPluginV2IOExt interfaces instead.