TensorRT 10.0.0
NvOnnxConfig.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 1993-2024 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_OnnxConfig_H
19#define NV_OnnxConfig_H
20
21#include "NvInfer.h"
22
23namespace nvonnxparser
24{
25
35
41
47{
48public:
49 virtual ~IOnnxConfig() noexcept = default;
55 typedef int32_t Verbosity;
56
65 virtual void setModelDtype(const nvinfer1::DataType) noexcept = 0;
66
74 virtual nvinfer1::DataType getModelDtype() const noexcept = 0;
75
83 virtual char const* getModelFileName() const noexcept = 0;
84
96 virtual void setModelFileName(char const* onnxFilename) noexcept = 0;
97
105 virtual Verbosity getVerbosityLevel() const noexcept = 0;
106
114 virtual void addVerbosity() noexcept = 0;
115
121 virtual void reduceVerbosity() noexcept = 0;
122
128 virtual void setVerbosityLevel(Verbosity) noexcept = 0;
129
138 virtual char const* getTextFileName() const noexcept = 0;
139
151 virtual void setTextFileName(char const* textFileName) noexcept = 0;
152
161 virtual char const* getFullTextFileName() const noexcept = 0;
162
174 virtual void setFullTextFileName(char const* fullTextFileName) noexcept = 0;
175
183 virtual bool getPrintLayerInfo() const noexcept = 0;
184
190 virtual void setPrintLayerInfo(bool) noexcept = 0;
191
192}; // class IOnnxConfig
193
195
196} // namespace nvonnxparser
197
198#endif
#define TENSORRTAPI
Definition: NvInferRuntimeBase.h:59
Configuration Manager Class.
Definition: NvOnnxConfig.h:47
virtual void setFullTextFileName(char const *fullTextFileName) noexcept=0
Set the File Name of the Network Description as a Text File, including the weights.
virtual char const * getTextFileName() const noexcept=0
Returns the File Name of the Network Description as a Text File.
virtual void addVerbosity() noexcept=0
Increase the Verbosity Level.
virtual nvinfer1::DataType getModelDtype() const noexcept=0
Get the Model Data Type.
virtual void setPrintLayerInfo(bool) noexcept=0
Set whether the layer information will be printed.
virtual void reduceVerbosity() noexcept=0
Reduce the Verbosity Level.
int32_t Verbosity
Defines Verbosity level.
Definition: NvOnnxConfig.h:55
virtual Verbosity getVerbosityLevel() const noexcept=0
Get the Verbosity Level.
virtual bool getPrintLayerInfo() const noexcept=0
Get whether the layer information will be printed.
virtual void setModelDtype(const nvinfer1::DataType) noexcept=0
Set the Model Data Type.
virtual void setVerbosityLevel(Verbosity) noexcept=0
Set to specific verbosity Level.
virtual ~IOnnxConfig() noexcept=default
virtual void setModelFileName(char const *onnxFilename) noexcept=0
Set the Model File Name.
virtual char const * getModelFileName() const noexcept=0
Get the Model FileName.
virtual char const * getFullTextFileName() const noexcept=0
Get the File Name of the Network Description as a Text File, including the weights.
virtual void setTextFileName(char const *textFileName) noexcept=0
Set the File Name of the Network Description as a Text File.
The TensorRT API version 1 namespace.
DataType
The type of weights and tensors.
Definition: NvInferRuntimeBase.h:129
The TensorRT ONNX parser API namespace.
Definition: NvOnnxConfig.h:24
IOnnxConfig * createONNXConfig()

  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