IPluginCreator

tensorrt.PluginFieldType

The possible field types for custom layer.

Members:

FLOAT16

FLOAT32

FLOAT64

INT8

INT16

INT32

CHAR

DIMS

UNKNOWN

class tensorrt.PluginField(*args, **kwargs)

Contains plugin attribute field names and associated data. This information can be parsed to decode necessary plugin metadata

Variables:
  • namestr Plugin field attribute name.
  • databuffer Plugin field attribute data.
  • typePluginFieldType Plugin field attribute type.
  • sizeint Number of data entries in the Plugin attribute.

Overloaded function.

  1. __init__(self: tensorrt.tensorrt.PluginField, name: tensorrt.tensorrt.FallbackString = ‘’) -> None
  2. __init__(self: tensorrt.tensorrt.PluginField, name: tensorrt.tensorrt.FallbackString, data: buffer, type: tensorrt.tensorrt.PluginFieldType = PluginFieldType.UNKNOWN) -> None
class tensorrt.PluginFieldCollection(*args, **kwargs)

Overloaded function.

  1. __init__(self: tensorrt.tensorrt.PluginFieldCollection) -> None
  2. __init__(self: tensorrt.tensorrt.PluginFieldCollection, arg0: tensorrt.tensorrt.PluginFieldCollection) -> None

Copy constructor

  1. __init__(self: tensorrt.tensorrt.PluginFieldCollection, arg0: iterable) -> None
append(self: tensorrt.tensorrt.PluginFieldCollection, x: nvinfer1::PluginField) → None

Add an item to the end of the list

extend(self: tensorrt.tensorrt.PluginFieldCollection, L: tensorrt.tensorrt.PluginFieldCollection) → None

Extend the list by appending all the items in the given list

insert(self: tensorrt.tensorrt.PluginFieldCollection, i: int, x: nvinfer1::PluginField) → None

Insert an item at a given position.

pop(*args, **kwargs)

Overloaded function.

  1. pop(self: tensorrt.tensorrt.PluginFieldCollection) -> nvinfer1::PluginField

Remove and return the last item

  1. pop(self: tensorrt.tensorrt.PluginFieldCollection, i: int) -> nvinfer1::PluginField

Remove and return the item at index i

class tensorrt.IPluginCreator

Plugin creator class for user implemented layers

Variables:
  • tensorrt_versionint Number of PluginField entries.
  • namestr Plugin name.
  • plugin_versionstr Plugin version.
  • field_nameslist List of fields that needs to be passed to create_plugin() .
  • plugin_namespacestr The namespace of the plugin creator based on the plugin library it belongs to. This can be set while registering the plugin creator.
create_plugin(self: tensorrt.tensorrt.IPluginCreator, name: str, field_collection: tensorrt.tensorrt.PluginFieldCollection_) → tensorrt.tensorrt.IPluginV2

Creates a new plugin.

Parameters:
Returns:

IPluginV2 or None on failure.

deserialize_plugin(self: tensorrt.tensorrt.IPluginCreator, name: str, serialized_plugin: buffer) → tensorrt.tensorrt.IPluginV2

Creates a plugin object from a serialized plugin.

Parameters:
  • name – Name of the plugin.
  • serialized_plugin – A buffer containing a serialized plugin.
Returns:

A new IPluginV2