IPluginCreator

tensorrt.PluginFieldType

The possible field types for custom layer.

Members:

FLOAT16

FLOAT32

FLOAT64

INT8

INT16

INT32

CHAR

DIMS

UNKNOWN

BF16

INT64

FP8

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: 8>) -> 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: tensorrt.tensort.PluginField) None

Add an item to the end of the list

clear(self: tensorrt.tensorrt.PluginFieldCollection) None

Clear the contents

extend(*args, **kwargs)

Overloaded function.

  1. extend(self: tensorrt.tensorrt.PluginFieldCollection, L: tensorrt.tensorrt.PluginFieldCollection) -> None

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

  1. extend(self: tensorrt.tensorrt.PluginFieldCollection, L: Iterable) -> None

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

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

Insert an item at a given position.

pop(*args, **kwargs)

Overloaded function.

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

Remove and return the last item

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

Remove and return the item at index i

class tensorrt.IPluginCreatorInterface

Base class for for plugin sub-interfaces.

class tensorrt.IPluginCreatorV3One(self: tensorrt.tensorrt.IPluginCreatorV3One) None

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.IPluginCreatorV3One, name: str, field_collection: tensorrt.tensorrt.PluginFieldCollection_, phase: tensorrt.tensort.TensorRTPhase) tensorrt.tensorrt.IPluginV3

Creates a new plugin.

Parameters
Returns

IPluginV2 or None on failure.

class tensorrt.IPluginCreator(self: tensorrt.tensorrt.IPluginCreator) None

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(*args, **kwargs)

Overloaded function.

  1. deserialize_plugin(self: tensorrt.tensorrt.IPluginCreator, name: str, serialized_plugin: buffer) -> tensorrt.tensorrt.IPluginV2

    Creates a plugin object from a serialized plugin.

    Warning

    This API only applies when called on a C++ plugin from a Python program.

    serialized_plugin will contain a Python bytes object containing the serialized representation of the plugin.

    arg name

    Name of the plugin.

    arg serialized_plugin

    A buffer containing a serialized plugin.

    returns

    A new IPluginV2

  2. deserialize_plugin(self: tensorrt.tensorrt.IPluginV2DynamicExt, name: str, serialized_plugin: bytes) -> tensorrt.tensorrt.IPluginV2DynamicExt

    Creates a plugin object from a serialized plugin.

    Warning

    This API only applies when implementing a Python-based plugin.

    serialized_plugin contains a serialized representation of the plugin.

    arg name

    Name of the plugin.

    arg serialized_plugin

    A string containing a serialized plugin.

    returns

    A new IPluginV2