IPluginRegistry¶
-
class
tensorrt.
IPluginRegistry
¶ Registers plugin creators.
- Variables
plugin_creator_list – All the registered plugin creators.
error_recorder –
IErrorRecorder
Application-implemented error reporting interface for TensorRT objects.
-
deregister_creator
(self: tensorrt.tensorrt.IPluginRegistry, creator: tensorrt.tensorrt.IPluginCreator) → bool¶ Deregister a previously registered plugin creator.
Since there may be a desire to limit the number of plugins, this function provides a mechanism for removing plugin creators registered in TensorRT. The plugin creator that is specified by
creator
is removed from TensorRT and no longer tracked.- Parameters
creator – The IPluginCreator instance.
- Returns
True
if the plugin creator was deregistered,False
if it was not found in the registry or otherwise could not be deregistered.
-
get_plugin_creator
(self: tensorrt.tensorrt.IPluginRegistry, type: str, version: str, plugin_namespace: str = '') → tensorrt.tensorrt.IPluginCreator¶ Return plugin creator based on type and version
- Parameters
type – The type of the plugin.
version – The version of the plugin.
plugin_namespace – The namespace of the plugin.
- Returns
An
IPluginCreator
.
-
register_creator
(self: tensorrt.tensorrt.IPluginRegistry, creator: tensorrt.tensorrt.IPluginCreator, plugin_namespace: str = '') → bool¶ Register a plugin creator.
- Parameters
creator – The IPluginCreator instance.
plugin_namespace – The namespace of the plugin creator.
- Returns
False if one with the same type is already registered.
-
tensorrt.
get_plugin_registry
() → tensorrt.tensorrt.IPluginRegistry¶ Return the plugin registry
-
tensorrt.
init_libnvinfer_plugins
(logger: capsule, namespace: str) → bool¶ Initialize and register all the existing TensorRT plugins to the
IPluginRegistry
with an optional namespace. The plugin library author should ensure that this function name is unique to the library. This function should be called once before accessing the Plugin Registry.- Parameters
logger – Logger to print plugin registration information.
namespace – Namespace used to register all the plugins in this library.