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: - name –
str
Plugin field attribute name. - data –
buffer
Plugin field attribute data. - type –
PluginFieldType
Plugin field attribute type. - size –
int
Number of data entries in the Plugin attribute.
Overloaded function.
- __init__(self: tensorrt.tensorrt.PluginField, name: tensorrt.tensorrt.FallbackString = ‘’) -> None
- __init__(self: tensorrt.tensorrt.PluginField, name: tensorrt.tensorrt.FallbackString, data: buffer, type: tensorrt.tensorrt.PluginFieldType = PluginFieldType.UNKNOWN) -> None
- name –
-
class
tensorrt.
PluginFieldCollection
(*args, **kwargs)¶ Overloaded function.
- __init__(self: tensorrt.tensorrt.PluginFieldCollection) -> None
- __init__(self: tensorrt.tensorrt.PluginFieldCollection, arg0: tensorrt.tensorrt.PluginFieldCollection) -> None
Copy constructor
- __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.
- pop(self: tensorrt.tensorrt.PluginFieldCollection) -> nvinfer1::PluginField
Remove and return the last item
- 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_version –
int
Number ofPluginField
entries. - name –
str
Plugin name. - plugin_version –
str
Plugin version. - field_names –
list
List of fields that needs to be passed tocreate_plugin()
. - plugin_namespace –
str
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: - name – The name of the plugin.
- field_collection – The
PluginFieldCollection
for this plugin.
Returns: IPluginV2
orNone
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
- tensorrt_version –