TensorRT 10.16.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: 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_CONSISTENCY_CHECKER_H
14#define NV_INFER_CONSISTENCY_CHECKER_H
15#include "NvInferForwardDecl.h"
16#include "NvInferPluginBase.h"
17#include "NvInferSafeRuntime.h"
18#include <vector>
19
23
24namespace nvinfer2
25{
26namespace safe
27{
28// Forward decal
29class ISafeRecorder;
30
31namespace consistency
32{
33
42{
43public:
49 virtual bool validate() noexcept = 0;
53 virtual ~IConsistencyChecker() = default;
54
55protected:
58 IConsistencyChecker& operator=(IConsistencyChecker const& other) & = delete;
60 IConsistencyChecker& operator=(IConsistencyChecker&& other) & = delete;
61};
62
64{
65public:
73 virtual bool validate(std::vector<TensorDescriptor> const& Inputs, std::vector<TensorDescriptor> const& Outputs,
74 PluginFieldCollection* fc) noexcept = 0;
75
79 virtual ~IPluginChecker() = default;
80
81protected:
82 IPluginChecker() = default;
83 IPluginChecker(IPluginChecker const& other) = delete;
84 IPluginChecker& operator=(IPluginChecker const& other) & = delete;
85 IPluginChecker(IPluginChecker&& other) = delete;
87};
88
95 nvinfer2::safe::ISafeRecorder& recorder, void const* blob, size_t size,
96 std::vector<std::string> const& pluginBuildLibs = {}) noexcept;
97
98} // namespace consistency
99
100} // namespace safe
101} // namespace nvinfer2
102
103#endif // NV_INFER_CONSISTENCY_CHECKER_H
Interface for extended recorder which allows error, warn, debug, or info messages to be recorded.
Definition: NvInferSafeRecorder.h:76
Validates a TRT engine (Serialized binary blob)
Definition: NvInferConsistency.h:42
virtual bool validate() noexcept=0
Check that a blob that was input to createConsistencyChecker method represents a valid TRT engine.
Definition: NvInferConsistency.h:64
IPluginChecker & operator=(IPluginChecker const &other) &=delete
virtual bool validate(std::vector< TensorDescriptor > const &Inputs, std::vector< TensorDescriptor > const &Outputs, PluginFieldCollection *fc) noexcept=0
Validate a plugin.
IPluginChecker(IPluginChecker &&other)=delete
IPluginChecker & operator=(IPluginChecker &&other) &=delete
IPluginChecker(IPluginChecker const &other)=delete
virtual ~IPluginChecker()=default
De-allocates any internally allocated memory.
ErrorCode
Error codes that can be returned by TensorRT during execution.
Definition: NvInferRuntimeBase.h:312
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:25
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