TensorRT 8.6.0
NvInferRuntimeCommon.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 1993-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3 * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4 *
5 * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6 * property and proprietary rights in and to this material, related
7 * documentation and any modifications thereto. Any use, reproduction,
8 * disclosure or distribution of this material and related documentation
9 * without an express license agreement from NVIDIA CORPORATION or
10 * its affiliates is strictly prohibited.
11 */
12
13#ifndef NV_INFER_RUNTIME_COMMON_H
14#define NV_INFER_RUNTIME_COMMON_H
15
26#include "NvInferRuntimeBase.h"
28
29namespace nvinfer1
30{
48
50{
51public:
53 using PluginLibraryHandle = void*;
65 virtual bool registerCreator(IPluginCreator& creator, AsciiChar const* const pluginNamespace) noexcept = 0;
66
75 virtual IPluginCreator* const* getPluginCreatorList(int32_t* const numCreators) const noexcept = 0;
76
88 virtual IPluginCreator* getPluginCreator(AsciiChar const* const pluginName, AsciiChar const* const pluginVersion,
89 AsciiChar const* const pluginNamespace = "") noexcept
90 = 0;
91
100 virtual bool isParentSearchEnabled() const = 0;
101
109 virtual void setParentSearchEnabled(bool const enabled) = 0;
110
119 virtual PluginLibraryHandle loadLibrary(AsciiChar const* pluginPath) noexcept = 0;
120
127 virtual void deregisterLibrary(PluginLibraryHandle handle) noexcept = 0;
128
129 // @cond SuppressDoxyWarnings
130 IPluginRegistry() = default;
131 IPluginRegistry(IPluginRegistry const&) = delete;
133 IPluginRegistry& operator=(IPluginRegistry const&) & = delete;
134 IPluginRegistry& operator=(IPluginRegistry&&) & = delete;
135// @endcond
136
137protected:
138 virtual ~IPluginRegistry() noexcept = default;
139
140public:
150 //
157 virtual void setErrorRecorder(IErrorRecorder* const recorder) noexcept = 0;
158
174 virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
175
191 virtual bool deregisterCreator(IPluginCreator const& creator) noexcept = 0;
192};
193
194} // namespace nvinfer1
195
196#endif /* NV_INFER_RUNTIME_COMMON_H */
Reference counted application-implemented error reporting interface for TensorRT objects.
Definition: NvInferRuntimeBase.h:694
Plugin creator class for user implemented layers.
Definition: NvInferRuntimePlugin.h:803
Single registration point for all plugins in an application. It is used to find plugin implementation...
Definition: NvInferRuntimeCommon.h:50
virtual IErrorRecorder * getErrorRecorder() const noexcept=0
Get the ErrorRecorder assigned to this interface.
virtual PluginLibraryHandle loadLibrary(AsciiChar const *pluginPath) noexcept=0
Load and register a shared library of plugins.
void * PluginLibraryHandle
Pointer for plugin library handle.
Definition: NvInferRuntimeCommon.h:53
virtual bool isParentSearchEnabled() const =0
Return whether the parent registry will be searched if a plugin is not found in this registry default...
virtual bool registerCreator(IPluginCreator &creator, AsciiChar const *const pluginNamespace) noexcept=0
Register a plugin creator. Returns false if one with same type is already registered.
virtual 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 netw...
virtual void setErrorRecorder(IErrorRecorder *const recorder) noexcept=0
Set the ErrorRecorder for this interface.
virtual void setParentSearchEnabled(bool const enabled)=0
Set whether the parent registry will be searched if a plugin is not found in this registry.
virtual void deregisterLibrary(PluginLibraryHandle handle) noexcept=0
Deregister plugins associated with a library. Any resources acquired when the library was loaded will...
virtual IPluginCreator *const * getPluginCreatorList(int32_t *const numCreators) const noexcept=0
Return all the registered plugin creators and the number of registered plugin creators....
virtual bool deregisterCreator(IPluginCreator const &creator) noexcept=0
Deregister a previously registered plugin creator.
The TensorRT API version 1 namespace.
char_t AsciiChar
Definition: NvInferRuntimeBase.h:94