TensorRT 11.5.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
21#include "NvInferForwardDecl.h"
22#include "NvInferPluginBase.h"
23#include "NvInferSafeRuntime.h"
24#include <cstdint>
25
29
30namespace nvinfer2
31{
32namespace safe
33{
34// Forward declaration
35class ISafeRecorder;
36
37namespace consistency
38{
39
48{
49public:
55 virtual bool validate() noexcept = 0;
59 virtual ~IConsistencyChecker() = default;
60
61protected:
82 IConsistencyChecker& operator=(IConsistencyChecker const& other) & = delete;
94 IConsistencyChecker& operator=(IConsistencyChecker&& other) & = delete;
95};
96
106{
107public:
117 virtual bool validate(TensorDescriptor const* inputs, int32_t nbInputs, TensorDescriptor const* outputs,
118 int32_t nbOutputs, PluginFieldCollection* fc) noexcept
119 = 0;
120
124 virtual ~IPluginChecker() = default;
125
126protected:
135 IPluginChecker() = default;
141 IPluginChecker(IPluginChecker const& other) = delete;
147 IPluginChecker& operator=(IPluginChecker const& other) & = delete;
160};
161
175 nvinfer2::safe::ISafeRecorder& recorder, void const* blob, int64_t size,
176 char const* const* pluginBuildLibs = nullptr, int64_t nbPluginBuildLibs = 0) noexcept;
177
178} // namespace consistency
179
180} // namespace safe
181} // namespace nvinfer2
182
183#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:48
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:106
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:326
nvinfer2::safe::ErrorCode createConsistencyChecker(IConsistencyChecker *&icc, nvinfer2::safe::ISafeRecorder &recorder, void const *blob, int64_t size, char const *const *pluginBuildLibs=nullptr, int64_t nbPluginBuildLibs=0) noexcept
Create an instance of an IConsistencyChecker class.
Definition: NvInferConsistency.h:31
Plugin field collection struct.
Definition: NvInferPluginBase.h:111
A simple record summarizing various properties of a network IO Tensor.
Definition: NvInferSafeRuntime.h:281

  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