TensorRT
7.2.2.3
|
Common interface for the Nvidia created plugins. More...
#include <NvInferPlugin.h>
Public Member Functions | |
virtual PluginType | getPluginType () const =0 |
Get the parameter plugin ID. More... | |
virtual const char * | getName () const =0 |
Get the name of the plugin from the ID. More... | |
virtual void | destroy ()=0 |
Destroy the plugin. More... | |
![]() | |
virtual int32_t | getNbOutputs () const =0 |
Get the number of outputs from the layer. More... | |
virtual Dims | getOutputDimensions (int32_t index, const Dims *inputs, int32_t nbInputDims)=0 |
Get the dimension of an output tensor. More... | |
virtual void | configure (const Dims *inputDims, int32_t nbInputs, const Dims *outputDims, int32_t nbOutputs, int32_t maxBatchSize)=0 |
Configure the layer. More... | |
virtual int32_t | initialize ()=0 |
Initialize the layer for execution. This is called when the engine is created. More... | |
virtual void | terminate ()=0 |
Release resources acquired during plugin layer initialization. This is called when the engine is destroyed. More... | |
virtual size_t | getWorkspaceSize (int32_t maxBatchSize) const =0 |
Find the workspace size required by the layer. More... | |
virtual int32_t | enqueue (int32_t batchSize, const void *const *inputs, void **outputs, void *workspace, cudaStream_t stream)=0 |
Execute the layer. More... | |
virtual size_t | getSerializationSize ()=0 |
Find the size of the serialization buffer required. More... | |
virtual void | serialize (void *buffer)=0 |
Serialize the layer. More... | |
Common interface for the Nvidia created plugins.
This class provides a common subset of functionality that is used to provide distinguish the Nvidia created plugins. Each plugin provides a function to validate the parameter options and create the plugin object.
|
pure virtual |
Destroy the plugin.
The valid id
values are ranged [0, numPlugins()).
|
pure virtual |
Get the name of the plugin from the ID.
id
. Return nullptr if invalid ID is specified.The valid id
values are ranged [0, numPlugins()).
|
pure virtual |
Get the parameter plugin ID.