class tensorrt.IPluginRegistry

Registers plugin creators.

  • plugin_creator_list – All the registered plugin creators.

  • error_recorderIErrorRecorder 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.


creator – The IPluginCreator instance.


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

  • type – The type of the plugin.

  • version – The version of the plugin.

  • plugin_namespace – The namespace of the plugin.


An IPluginCreator .

register_creator(self: tensorrt.tensorrt.IPluginRegistry, creator: tensorrt.tensorrt.IPluginCreator, plugin_namespace: str = '') → bool

Register a plugin creator.

  • creator – The IPluginCreator instance.

  • plugin_namespace – The namespace of the plugin creator.


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.

  • logger – Logger to print plugin registration information.

  • namespace – Namespace used to register all the plugins in this library.