TensorRT 10.8.0
|
Single registration point for all plugins in an application. It is used to find plugin implementations during engine deserialization. Internally, the plugin registry is considered to be a singleton so all plugins in an application are part of the same global registry. Note that the plugin registry is only supported for plugins of type IPluginV2 and should also have a corresponding IPluginCreator implementation. More...
#include <NvInferRuntimeCommon.h>
Public Types | |
using | PluginLibraryHandle = void * |
Pointer for plugin library handle. More... | |
Public Member Functions | |
virtual TRT_DEPRECATED bool | registerCreator (IPluginCreator &creator, AsciiChar const *const pluginNamespace) noexcept=0 |
Register a plugin creator implementing IPluginCreator. Returns false if any plugin creator with the same name, version or namespace is already registered. More... | |
virtual TRT_DEPRECATED IPluginCreator *const * | getPluginCreatorList (int32_t *const numCreators) const noexcept=0 |
Return all the registered plugin creators and the number of registered plugin creators. Returns nullptr if none found. More... | |
virtual TRT_DEPRECATED IPluginCreator * | getPluginCreator (AsciiChar const *const pluginName, AsciiChar const *const pluginVersion, AsciiChar const *const pluginNamespace="") noexcept=0 |
Return plugin creator based on plugin name, version, and namespace associated with plugin during network creation. More... | |
virtual void | setErrorRecorder (IErrorRecorder *const recorder) noexcept=0 |
Set the ErrorRecorder for this interface. More... | |
virtual IErrorRecorder * | getErrorRecorder () const noexcept=0 |
Get the ErrorRecorder assigned to this interface. More... | |
virtual TRT_DEPRECATED bool | deregisterCreator (IPluginCreator const &creator) noexcept=0 |
Deregister a previously registered plugin creator implementing IPluginCreator. More... | |
virtual bool | isParentSearchEnabled () const =0 |
Return whether the parent registry will be searched if a plugin is not found in this registry default: true. More... | |
virtual void | setParentSearchEnabled (bool const enabled)=0 |
Set whether the parent registry will be searched if a plugin is not found in this registry. More... | |
virtual PluginLibraryHandle | loadLibrary (AsciiChar const *pluginPath) noexcept=0 |
Load and register a shared library of plugins. More... | |
virtual void | deregisterLibrary (PluginLibraryHandle handle) noexcept=0 |
Deregister plugins associated with a library. Any resources acquired when the library was loaded will be released. More... | |
virtual bool | registerCreator (IPluginCreatorInterface &creator, AsciiChar const *const pluginNamespace) noexcept=0 |
Register a plugin creator. Returns false if a plugin creator with the same type is already registered. More... | |
virtual IPluginCreatorInterface *const * | getAllCreators (int32_t *const numCreators) const noexcept=0 |
Return all registered plugin creators. Returns nullptr if none found. More... | |
virtual IPluginCreatorInterface * | getCreator (AsciiChar const *const pluginName, AsciiChar const *const pluginVersion, AsciiChar const *const pluginNamespace="") noexcept=0 |
Return a registered plugin creator based on plugin name, version, and namespace associated with the plugin during network creation. More... | |
virtual bool | deregisterCreator (IPluginCreatorInterface const &creator) noexcept=0 |
Deregister a previously registered plugin creator. More... | |
virtual IPluginResource * | acquirePluginResource (AsciiChar const *key, IPluginResource *resource) noexcept=0 |
Get a plugin resource. More... | |
virtual int32_t | releasePluginResource (AsciiChar const *key) noexcept=0 |
Decrement reference count for the resource with this key If reference count goes to zero after decrement, release() will be invoked on the resource, the key will be deregistered and the resource object will be deleted. More... | |
Protected Member Functions | |
virtual | ~IPluginRegistry () noexcept=default |
Single registration point for all plugins in an application. It is used to find plugin implementations during engine deserialization. Internally, the plugin registry is considered to be a singleton so all plugins in an application are part of the same global registry. Note that the plugin registry is only supported for plugins of type IPluginV2 and should also have a corresponding IPluginCreator implementation.
using nvinfer1::IPluginRegistry::PluginLibraryHandle = void* |
Pointer for plugin library handle.
|
protectedvirtualdefaultnoexcept |
|
pure virtualnoexcept |
Get a plugin resource.
key | Key for identifying the resource. Cannot be null. |
resource | A plugin resource object. The object will only need to be valid until this method returns, as only a clone of this object will be registered by TRT. Cannot be null. |
Usage considerations
|
pure virtualnoexcept |
Deregister a previously registered plugin creator implementing IPluginCreator.
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.
Usage considerations
Allowed context for the API call
|
pure virtualnoexcept |
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.
Usage considerations
|
pure virtualnoexcept |
Deregister plugins associated with a library. Any resources acquired when the library was loaded will be released.
handle | the plugin library handle to deregister. |
|
pure virtualnoexcept |
Return all registered plugin creators. Returns nullptr if none found.
Usage considerations
|
pure virtualnoexcept |
Return a registered plugin creator based on plugin name, version, and namespace associated with the plugin during network creation.
Usage considerations
|
pure virtualnoexcept |
Get the ErrorRecorder assigned to this interface.
Retrieves the assigned error recorder object for the given class. A default error recorder does not exist, so a nullptr will be returned if setErrorRecorder has not been called, or an ErrorRecorder has not been inherited.
Usage considerations
|
pure virtualnoexcept |
Return plugin creator based on plugin name, version, and namespace associated with plugin during network creation.
Usage considerations
Allowed context for the API call
|
pure virtualnoexcept |
Return all the registered plugin creators and the number of registered plugin creators. Returns nullptr if none found.
Usage considerations
Allowed context for the API call
|
pure virtual |
Return whether the parent registry will be searched if a plugin is not found in this registry default: true.
|
pure virtualnoexcept |
Load and register a shared library of plugins.
pluginPath | the plugin library path. |
|
pure virtualnoexcept |
Register a plugin creator implementing IPluginCreator. Returns false if any plugin creator with the same name, version or namespace is already registered.
Usage considerations
Allowed context for the API call
|
pure virtualnoexcept |
Register a plugin creator. Returns false if a plugin creator with the same type is already registered.
Usage considerations
|
pure virtualnoexcept |
Decrement reference count for the resource with this key If reference count goes to zero after decrement, release() will be invoked on the resource, the key will be deregistered and the resource object will be deleted.
key | Key that was used to register the resource. Cannot be null. |
Usage considerations
|
pure virtualnoexcept |
Set the ErrorRecorder for this interface.
Assigns the ErrorRecorder to this interface. The ErrorRecorder will track all errors during execution. This function will call incRefCount of the registered ErrorRecorder at least once. Setting recorder to nullptr unregisters the recorder with the interface, resulting in a call to decRefCount if a recorder has been registered.
recorder | The error recorder to register with this interface. |
Usage considerations
|
pure virtual |
Set whether the parent registry will be searched if a plugin is not found in this registry.
enabled | The bool variable indicating whether parent search is enabled. |
Copyright © 2024 NVIDIA Corporation
Privacy Policy |
Manage My Privacy |
Do Not Sell or Share My Data |
Terms of Service |
Accessibility |
Corporate Policies |
Product Security |
Contact