TensorRT 11.3.0
NvInferReference.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_REFERENCE_CHECKER_H
19#define NV_INFER_REFERENCE_CHECKER_H
20#include "NvInferForwardDecl.h"
21#include "NvInferSafeRuntime.h"
22#include <cstdint>
23
34
35namespace nvinfer2
36{
37namespace safe
38{
39// Forward declaration
40class ISafeRecorder;
41
42namespace reference
43{
44
56{
57public:
69 virtual bool validate() noexcept = 0;
73 virtual ~IReferenceChecker() = default;
74
75protected:
84 IReferenceChecker() = default;
90 IReferenceChecker(IReferenceChecker const& other) = delete;
96 IReferenceChecker& operator=(IReferenceChecker const& other) & = delete;
108 IReferenceChecker& operator=(IReferenceChecker&& other) & = delete;
109};
110
132 nvinfer2::safe::ISafeRecorder& recorder, void const* engineBlob, int64_t engineBlobSize, void const* checkerBlob,
133 int64_t checkerBlobSize, char const* remoteConfig) noexcept;
134
135} // namespace reference
136
137} // namespace safe
138} // namespace nvinfer2
139
140#endif // NV_INFER_REFERENCE_CHECKER_H
Interface for extended recorder which allows error, warn, debug, or info messages to be recorded.
Definition: NvInferSafeRecorder.h:82
Validates a safety-certified TRT engine (serialized binary blob) by re-deriving each generated kernel...
Definition: NvInferReference.h:56
virtual bool validate() noexcept=0
Run the reference check over the engine blob that was input to createReferenceChecker.
ErrorCode
Error codes that can be returned by TensorRT during execution.
Definition: NvInferRuntimeBase.h:317
nvinfer2::safe::ErrorCode createReferenceChecker(IReferenceChecker *&irc, nvinfer2::safe::ISafeRecorder &recorder, void const *engineBlob, int64_t engineBlobSize, void const *checkerBlob, int64_t checkerBlobSize, char const *remoteConfig) noexcept
Create an instance of an IReferenceChecker class.
Definition: NvInferConsistency.h:34

  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