IPluginRegistry

class tensorrt.IPluginRegistry

Registers plugin creators.

Variables:plugin_creator_list – All the registered plugin creators.
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.