TensorRT 11.0.0
NvInferConsistency.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 1993-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef NV_INFER_CONSISTENCY_CHECKER_H
19#define NV_INFER_CONSISTENCY_CHECKER_H
20#include "NvInferForwardDecl.h"
21#include "NvInferPluginBase.h"
22#include "NvInferSafeRuntime.h"
23#include <vector>
24
28
29namespace nvinfer2
30{
31namespace safe
32{
33// Forward declaration
34class ISafeRecorder;
35
36namespace consistency
37{
38
47{
48public:
54 virtual bool validate() noexcept = 0;
58 virtual ~IConsistencyChecker() = default;
59
60protected:
81 IConsistencyChecker& operator=(IConsistencyChecker const& other) & = delete;
93 IConsistencyChecker& operator=(IConsistencyChecker&& other) & = delete;
94};
95
105{
106public:
114 virtual bool validate(std::vector<TensorDescriptor> const& Inputs, std::vector<TensorDescriptor> const& Outputs,
115 PluginFieldCollection* fc) noexcept = 0;
116
120 virtual ~IPluginChecker() = default;
121
122protected:
131 IPluginChecker() = default;
137 IPluginChecker(IPluginChecker const& other) = delete;
143 IPluginChecker& operator=(IPluginChecker const& other) & = delete;
156};
157
164 nvinfer2::safe::ISafeRecorder& recorder, void const* blob, size_t size,
165 std::vector<std::string> const& pluginBuildLibs = {}) noexcept;
166
167} // namespace consistency
168
169} // namespace safe
170} // namespace nvinfer2
171
172#endif // NV_INFER_CONSISTENCY_CHECKER_H
Interface for extended recorder which allows error, warn, debug, or info messages to be recorded.
Definition: NvInferSafeRecorder.h:82
Validates a TRT engine (Serialized binary blob)
Definition: NvInferConsistency.h:47
virtual bool validate() noexcept=0
Check that a blob that was input to createConsistencyChecker method represents a valid TRT engine.
Interface for validating a plugin used in a TensorRT engine.
Definition: NvInferConsistency.h:105
IPluginChecker & operator=(IPluginChecker const &other) &=delete
Deleted copy assignment operator to maintain non-copyability.
virtual bool validate(std::vector< TensorDescriptor > const &Inputs, std::vector< TensorDescriptor > const &Outputs, PluginFieldCollection *fc) noexcept=0
Validate a plugin.
IPluginChecker(IPluginChecker &&other)=delete
Deleted move constructor to maintain non-movability.
IPluginChecker & operator=(IPluginChecker &&other) &=delete
Deleted move assignment operator to maintain non-movability.
IPluginChecker(IPluginChecker const &other)=delete
Deleted copy constructor to maintain non-copyability.
IPluginChecker()=default
Default constructor for IPluginChecker.
virtual ~IPluginChecker()=default
De-allocates any internally allocated memory.
ErrorCode
Error codes that can be returned by TensorRT during execution.
Definition: NvInferRuntimeBase.h:315
nvinfer2::safe::ErrorCode createConsistencyChecker(IConsistencyChecker *&icc, nvinfer2::safe::ISafeRecorder &recorder, void const *blob, size_t size, std::vector< std::string > const &pluginBuildLibs={}) noexcept
Create an instance of an IConsistencyChecker class.
Definition: NvInferConsistency.h:30
Plugin field collection struct.
Definition: NvInferPluginBase.h:103

  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