TensorRT 10.13.0
NvInferImpl.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright (c) 1993-2025 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_IMPL_H
19#define NV_INFER_IMPL_H
20
21#include "NvInferLegacyDims.h"
23
24// @cond SuppressDoxyWarnings
25
26namespace nvinfer1
27{
28
29class ILogger;
30
31namespace v_1_0
32{
34} // namespace v_1_0
36
37namespace v_1_0
38{
40} // namespace v_1_0
42
43namespace v_1_0
44{
45class IProfiler;
46} // namespace v_1_0
48
49namespace v_1_0
50{
52} // namespace v_1_0
54
55namespace v_1_0
56{
57class IDebugListener;
58} // namespace v_1_0
60
61class IActivationLayer;
62class IAlgorithm;
63class IAlgorithmContext;
64class IAlgorithmIOInfo;
65class IAlgorithmVariant;
66class IAssertionLayer;
67class IBuilder;
68class IBuilderConfig;
69class IConcatenationLayer;
70class IConditionLayer;
71class IConstantLayer;
72class IConvolutionLayer;
73class ICudaEngine;
74class ICumulativeLayer;
75class IDeconvolutionLayer;
76class IDequantizeLayer;
77class IDimensionExpr;
78class IDynamicQuantizeLayer;
79class IEinsumLayer;
80class IElementWiseLayer;
81class IEngineInspector;
82class IExecutionContext;
83class IFillLayer;
84class IGatherLayer;
85class IGridSampleLayer;
86class IHostMemory;
87class IIdentityLayer;
88class ICastLayer;
89class IIfConditional;
90class IIfConditionalInputLayer;
91class IIfConditionalOutputLayer;
92class IInt8Calibrator;
93class IIteratorLayer;
94class ILayer;
95class ILoop;
96class ILoopOutputLayer;
97class ILRNLayer;
98class IMatrixMultiplyLayer;
99class INetworkDefinition;
100class INormalizationLayer;
101class INMSLayer;
102class INonZeroLayer;
103class IOneHotLayer;
104class IOptimizationProfile;
105class IPaddingLayer;
106class IParametricReLULayer;
107class IPlugin;
108class IPluginExt;
109class IPluginFactory;
110class IPluginLayer;
111class IPluginRegistry;
112class IPluginV2Layer;
113class IRuntimeConfig;
114
115namespace v_1_0
116{
117class IPluginV3;
118} // namespace v_1_0
120
121namespace v_1_0
122{
123class IStreamReader;
124class IStreamWriter;
125} // namespace v_1_0
128namespace v_1_0
129{
130class IStreamReaderV2;
131} // namespace v_1_0
133
134class IPluginV3Layer;
135class IPoolingLayer;
136class IQuantizeLayer;
137class IRaggedSoftMaxLayer;
138class IRecurrenceLayer;
139class IReduceLayer;
140class IRefitter;
141class IResizeLayer;
142class IReverseSequenceLayer;
143class IRuntime;
144class IScaleLayer;
145class IScatterLayer;
146class ISelectLayer;
147class ISerializationConfig;
148class IShapeLayer;
149class IShuffleLayer;
150class ISliceLayer;
151class ISoftMaxLayer;
152class ISqueezeLayer;
153class ITensor;
154
155namespace v_1_0
156{
157struct TimingCacheKey;
158struct TimingCacheValue;
159} // namespace v_1_0
160using TimingCacheKey = v_1_0::TimingCacheKey;
161using TimingCacheValue = v_1_0::TimingCacheValue;
162
163class ITimingCache;
164class ITopKLayer;
165class ITripLimitLayer;
166class IUnaryLayer;
167class IUnsqueezeLayer;
168struct Permutation;
169class Weights;
170
171enum class ActivationType : int32_t;
172enum class BoundingBoxFormat : int32_t;
173enum class BuilderFlag : int32_t;
174enum class CalibrationAlgoType : int32_t;
175enum class CumulativeOperation : int32_t;
176enum class DeviceType : int32_t;
177enum class DimensionOperation : int32_t;
178enum class ElementWiseOperation : int32_t;
179enum class EngineCapability : int32_t;
180enum class FillOperation : int32_t;
181enum class GatherMode : int32_t;
182enum class LayerInformationFormat : int32_t;
183enum class LayerType : int32_t;
184enum class LoopOutput : int32_t;
185enum class MatrixOperation : int32_t;
186enum class MemoryPoolType : int32_t;
187enum class NetworkDefinitionCreationFlag : int32_t;
188enum class OptProfileSelector : int32_t;
189enum class PaddingMode : int32_t;
190enum class PoolingType : int32_t;
191enum class ProfilingVerbosity : int32_t;
192enum class QuantizationFlag : int32_t;
193enum class ReduceOperation : int32_t;
194enum class ResizeCoordinateTransformation : int32_t;
195enum class InterpolationMode : int32_t;
196enum class ResizeRoundMode : int32_t;
197enum class ResizeSelector : int32_t;
198enum class ScaleMode : int32_t;
199enum class ScatterMode : int32_t;
200enum class SampleMode : int32_t;
201enum class SerializationFlag : int32_t;
202enum class TensorIOMode : int32_t;
203enum class TensorLocation : int32_t;
204enum class TopKOperation : int32_t;
205enum class TripLimit : int32_t;
206enum class UnaryOperation : int32_t;
207enum class WeightsRole : int32_t;
208enum class PreviewFeature : int32_t;
209enum class HardwareCompatibilityLevel : int32_t;
210enum class ExecutionContextAllocationStrategy : int32_t;
211enum class RuntimePlatform : int32_t;
212enum class TilingOptimizationLevel : int32_t;
213
214
215using TacticSources = uint32_t;
216using TensorFormats = uint32_t;
217using BuilderFlags = uint32_t;
218using NetworkDefinitionCreationFlags = uint32_t;
219using QuantizationFlags = uint32_t;
220using TempfileControlFlags = uint32_t;
221using SerializationFlags = uint32_t;
222
230
231namespace apiv
232{
233
234class VRoot
235{
236public:
237 virtual ~VRoot() noexcept = default;
238};
239
240class VHostMemory : public VRoot
241{
242public:
243 virtual void* data() const noexcept = 0;
244 virtual std::size_t size() const noexcept = 0;
245 virtual DataType type() const noexcept = 0;
246};
247
248class VDimensionExpr : public VRoot
249{
250public:
251 virtual bool isConstant() const = 0;
252 virtual int64_t getConstantValue() const = 0;
253 virtual bool isSizeTensor() const = 0;
254};
255
256class VExprBuilder : public VRoot
257{
258public:
259 virtual IDimensionExpr const* constant(int64_t value) = 0;
260 virtual IDimensionExpr const* operation(
261 DimensionOperation op, IDimensionExpr const& first, IDimensionExpr const& second)
262 = 0;
263 virtual IDimensionExpr const* declareSizeTensor(
264 int32_t outputIndex, IDimensionExpr const& opt, IDimensionExpr const& upper)
265 = 0;
266};
267
268class VRuntime : public VRoot
269{
270public:
271 virtual IRuntime* getPImpl() noexcept = 0;
272 virtual nvinfer1::ICudaEngine* deserializeCudaEngine(void const* blob, std::size_t size) noexcept = 0;
273 virtual nvinfer1::ICudaEngine* deserializeCudaEngine(IStreamReader& streamReader) noexcept = 0;
274 virtual void setDLACore(int32_t dlaCore) noexcept = 0;
275 virtual int32_t getDLACore() const noexcept = 0;
276 virtual int32_t getNbDLACores() const noexcept = 0;
277 virtual void setGpuAllocator(IGpuAllocator* allocator) noexcept = 0;
278 virtual void setErrorRecorder(IErrorRecorder* recorder) noexcept = 0;
279 virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
280 virtual ILogger* getLogger() const noexcept = 0;
281 virtual bool setMaxThreads(int32_t maxThreads) noexcept = 0;
282 virtual int32_t getMaxThreads() const noexcept = 0;
283 virtual void setTemporaryDirectory(char const*) noexcept = 0;
284 virtual char const* getTemporaryDirectory() const noexcept = 0;
285 virtual void setTempfileControlFlags(TempfileControlFlags) noexcept = 0;
286 virtual TempfileControlFlags getTempfileControlFlags() const noexcept = 0;
287 virtual IPluginRegistry& getPluginRegistry() noexcept = 0;
288 virtual void setPluginRegistryParent(IPluginRegistry* parent) noexcept = 0;
289 virtual IRuntime* loadRuntime(char const* path) noexcept = 0;
290 virtual void setEngineHostCodeAllowed(bool allowed) noexcept = 0;
291 virtual bool getEngineHostCodeAllowed() const noexcept = 0;
292 // Added in TensorRT version 10.7
293 virtual nvinfer1::ICudaEngine* deserializeCudaEngineV2(IStreamReaderV2& streamReader) noexcept = 0;
294};
295
296class VRefitter : public VRoot
297{
298public:
299 virtual IRefitter* getPImpl() noexcept = 0;
300 virtual bool setWeights(char const* layerName, WeightsRole role, const Weights weights) noexcept = 0;
301 virtual bool refitCudaEngine() noexcept = 0;
302 virtual int32_t getMissing(int32_t size, char const** layerNames, WeightsRole* roles) noexcept = 0;
303 virtual int32_t getAll(int32_t size, char const** layerNames, WeightsRole* roles) noexcept = 0;
304 virtual bool setDynamicRange(char const* tensorName, float min, float max) noexcept = 0;
305 virtual float getDynamicRangeMin(char const* tensorName) const noexcept = 0;
306 virtual float getDynamicRangeMax(char const* tensorName) const noexcept = 0;
307 virtual int32_t getTensorsWithDynamicRange(int32_t size, char const** tensorNames) const noexcept = 0;
308 virtual void setErrorRecorder(IErrorRecorder* recorder) noexcept = 0;
309 virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
310 virtual bool setNamedWeights(char const* name, Weights weights) noexcept = 0;
311 virtual int32_t getMissingWeights(int32_t size, char const** weightsNames) noexcept = 0;
312 virtual int32_t getAllWeights(int32_t size, char const** weightsNames) noexcept = 0;
313 virtual ILogger* getLogger() const noexcept = 0;
314 virtual bool setMaxThreads(int32_t maxThreads) noexcept = 0;
315 virtual int32_t getMaxThreads() const noexcept = 0;
316 virtual bool setNamedWeightsWithLocation(char const* name, Weights weights, TensorLocation location) noexcept = 0;
317 virtual Weights getNamedWeights(char const* weightsName) const noexcept = 0;
318 virtual TensorLocation getWeightsLocation(char const* weightsName) const noexcept = 0;
319 virtual bool unsetNamedWeights(char const* weightsName) noexcept = 0;
320 virtual void setWeightsValidation(bool weightsValidation) noexcept = 0;
321 virtual bool getWeightsValidation() const noexcept = 0;
322 virtual bool refitCudaEngineAsync(cudaStream_t stream) noexcept = 0;
323 virtual Weights getWeightsPrototype(char const* weightsName) const noexcept = 0;
324};
325
326class VOptimizationProfile : public VRoot
327{
328public:
329 virtual bool setDimensions(char const* inputName, OptProfileSelector select, Dims const& dims) noexcept = 0;
330 virtual Dims getDimensions(char const* inputName, OptProfileSelector select) const noexcept = 0;
331 virtual bool setShapeValues(
332 char const* inputName, OptProfileSelector select, int32_t const* values, int32_t nbValues) noexcept = 0;
333 virtual int32_t getNbShapeValues(char const* inputName) const noexcept = 0;
334 virtual int32_t const* getShapeValues(char const* inputName, OptProfileSelector select) const noexcept = 0;
335 virtual bool setExtraMemoryTarget(float target) noexcept = 0;
336 virtual float getExtraMemoryTarget() const noexcept = 0;
337 virtual bool isValid() const noexcept = 0;
338 // Added in TensorRT 10.11
339 TRT_NODISCARD virtual bool setShapeValuesV2(
340 char const* inputName, OptProfileSelector select, int64_t const* values, int32_t nbValues) noexcept = 0;
341 TRT_NODISCARD virtual int64_t const* getShapeValuesV2(
342 char const* inputName, OptProfileSelector select) const noexcept = 0;
343};
344
345class VCudaEngine : public VRoot
346{
347public:
348 virtual ICudaEngine* getPImpl() noexcept = 0;
349 virtual int32_t getNbLayers() const noexcept = 0;
350 virtual IHostMemory* serialize() const noexcept = 0;
351 virtual IExecutionContext* createExecutionContext(ExecutionContextAllocationStrategy strategy) noexcept = 0;
352 virtual IExecutionContext* createExecutionContextWithoutDeviceMemory() noexcept = 0;
353 virtual size_t getDeviceMemorySize() const noexcept = 0;
354 virtual bool isRefittable() const noexcept = 0;
355 virtual char const* getName() const noexcept = 0;
356 virtual int32_t getNbOptimizationProfiles() const noexcept = 0;
357 virtual int32_t const* getProfileTensorValues(
358 char const* tensorName, int32_t profileIndex, OptProfileSelector select) const noexcept = 0;
359 virtual EngineCapability getEngineCapability() const noexcept = 0;
360 virtual void setErrorRecorder(IErrorRecorder* recorder) noexcept = 0;
361 virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
362 virtual bool hasImplicitBatchDimension() const noexcept = 0;
363 virtual TacticSources getTacticSources() const noexcept = 0;
364 virtual ProfilingVerbosity getProfilingVerbosity() const noexcept = 0;
365 virtual IEngineInspector* createEngineInspector() const noexcept = 0;
366 virtual Dims getTensorShape(char const* tensorName) const noexcept = 0;
367 virtual DataType getTensorDataType(char const* tensorName) const noexcept = 0;
368 virtual TensorLocation getTensorLocation(char const* tensorName) const noexcept = 0;
369 virtual bool isShapeInferenceIO(char const* tensorName) const noexcept = 0;
370 virtual TensorIOMode getTensorIOMode(char const* tensorName) const noexcept = 0;
371 virtual int32_t getTensorBytesPerComponent(char const* tensorName) const noexcept = 0;
372 virtual int32_t getTensorComponentsPerElement(char const* tensorName) const noexcept = 0;
373 virtual TensorFormat getTensorFormat(char const* tensorName) const noexcept = 0;
374 virtual char const* getTensorFormatDesc(char const* tensorName) const noexcept = 0;
375 virtual int32_t getTensorVectorizedDim(char const* tensorName) const noexcept = 0;
376 virtual Dims getProfileShape(
377 char const* tensorName, int32_t profileIndex, OptProfileSelector select) const noexcept = 0;
378 virtual int32_t getNbIOTensors() const noexcept = 0;
379 virtual char const* getIOTensorName(int32_t index) const noexcept = 0;
380 virtual HardwareCompatibilityLevel getHardwareCompatibilityLevel() const noexcept = 0;
381 virtual int32_t getNbAuxStreams() const noexcept = 0;
382
383 virtual int32_t getTensorBytesPerComponentV2(char const* tensorName, int32_t profileIndex) const noexcept = 0;
384 virtual int32_t getTensorComponentsPerElementV2(char const* tensorName, int32_t profileIndex) const noexcept = 0;
385 virtual TensorFormat getTensorFormatV2(char const* tensorName, int32_t profileIndex) const noexcept = 0;
386 virtual char const* getTensorFormatDescV2(char const* tensorName, int32_t profileIndex) const noexcept = 0;
387 virtual int32_t getTensorVectorizedDimV2(char const* tensorName, int32_t profileIndex) const noexcept = 0;
388
389 virtual ISerializationConfig* createSerializationConfig() noexcept = 0;
390 virtual IHostMemory* serializeWithConfig(ISerializationConfig& config) const noexcept = 0;
391
392 virtual size_t getDeviceMemorySizeForProfile(int32_t profileIndex) const noexcept = 0;
393 virtual IRefitter* createRefitter(ILogger& logger) noexcept = 0;
394
395 virtual bool setWeightStreamingBudget(int64_t gpuMemoryBudget) noexcept = 0;
396 virtual int64_t getWeightStreamingBudget() const noexcept = 0;
397 virtual int64_t getMinimumWeightStreamingBudget() const noexcept = 0;
398 virtual int64_t getStreamableWeightsSize() const noexcept = 0;
399
400 virtual bool isDebugTensor(char const* name) const noexcept = 0;
401
402 // Added in TensorRT 10.1
403 virtual bool setWeightStreamingBudgetV2(int64_t gpuMemoryBudget) noexcept = 0;
404 virtual int64_t getWeightStreamingBudgetV2() const noexcept = 0;
405 virtual int64_t getWeightStreamingAutomaticBudget() const noexcept = 0;
406 virtual int64_t getWeightStreamingScratchMemorySize() const noexcept = 0;
407 virtual int64_t getDeviceMemorySizeV2() const noexcept = 0;
408 virtual int64_t getDeviceMemorySizeForProfileV2(int32_t profileIndex) const noexcept = 0;
409 // Added in TensorRT 10.11
410 TRT_NODISCARD virtual int64_t const* getProfileTensorValuesV2(
411 char const* tensorName, int32_t profileIndex, OptProfileSelector select) const noexcept = 0;
412 TRT_NODISCARD virtual IExecutionContext* createExecutionContextWithRuntimeConfig(
413 IRuntimeConfig* runtimeConfig) noexcept = 0;
414 TRT_NODISCARD virtual IRuntimeConfig* createRuntimeConfig() noexcept = 0;
415};
416
417class VExecutionContext : public VRoot
418{
419public:
420 virtual IExecutionContext* getPImpl() noexcept = 0;
421 virtual void setDebugSync(bool sync) noexcept = 0;
422 virtual bool getDebugSync() const noexcept = 0;
423 virtual void setProfiler(IProfiler*) noexcept = 0;
424 virtual IProfiler* getProfiler() const noexcept = 0;
425 virtual ICudaEngine const& getEngine() const noexcept = 0;
426 virtual void setName(char const* name) noexcept = 0;
427 virtual char const* getName() const noexcept = 0;
428 virtual void setDeviceMemory(void* memory) noexcept = 0;
429 virtual int32_t getOptimizationProfile() const noexcept = 0;
430 virtual bool allInputDimensionsSpecified() const noexcept = 0;
431 virtual bool allInputShapesSpecified() const noexcept = 0;
432 virtual void setErrorRecorder(IErrorRecorder* recorder) noexcept = 0;
433 virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
434 virtual bool executeV2(void* const* bindings) noexcept = 0;
435 virtual bool setOptimizationProfileAsync(int32_t profileIndex, cudaStream_t stream) noexcept = 0;
436 virtual void setEnqueueEmitsProfile(bool enqueueEmitsProfile) noexcept = 0;
437 virtual bool getEnqueueEmitsProfile() const noexcept = 0;
438 virtual bool reportToProfiler() const noexcept = 0;
439 virtual bool setInputShape(char const* tensorName, Dims const& dims) noexcept = 0;
440 virtual Dims getTensorShape(char const* tensorName) const noexcept = 0;
441 virtual Dims getTensorStrides(char const* tensorName) const noexcept = 0;
442 virtual bool setTensorAddress(char const* tensorName, void* data) noexcept = 0;
443 virtual void const* getTensorAddress(char const* tensorName) const noexcept = 0;
444 virtual bool setInputTensorAddress(char const* tensorName, void const* data) noexcept = 0;
445 virtual bool setOutputTensorAddress(char const* tensorName, void* data) noexcept = 0;
446 virtual int32_t inferShapes(int32_t nbMaxNames, char const** tensorNames) noexcept = 0;
447 virtual bool setInputConsumedEvent(cudaEvent_t event) noexcept = 0;
448 virtual cudaEvent_t getInputConsumedEvent() const noexcept = 0;
449 virtual void* getOutputTensorAddress(char const* tensorName) const noexcept = 0;
450 virtual bool setOutputAllocator(char const* tensorName, IOutputAllocator* outputAllocator) noexcept = 0;
451 virtual IOutputAllocator* getOutputAllocator(char const* name) noexcept = 0;
452 virtual int64_t getMaxOutputSize(char const* tensorName) const noexcept = 0;
453 virtual bool setTemporaryStorageAllocator(IGpuAllocator* allocator) noexcept = 0;
454 virtual IGpuAllocator* getTemporaryStorageAllocator() const noexcept = 0;
455 virtual bool enqueueV3(cudaStream_t stream) noexcept = 0;
456 virtual void setPersistentCacheLimit(size_t size) noexcept = 0;
457 virtual size_t getPersistentCacheLimit() const noexcept = 0;
458 virtual bool setNvtxVerbosity(ProfilingVerbosity verbosity) noexcept = 0;
459 virtual ProfilingVerbosity getNvtxVerbosity() const noexcept = 0;
460 virtual void setAuxStreams(cudaStream_t* auxStreams, int32_t nbStreams) noexcept = 0;
461 virtual bool setDebugListener(IDebugListener* listener) noexcept = 0;
462 virtual IDebugListener* getDebugListener() noexcept = 0;
463 virtual bool setTensorDebugState(char const* name, bool flag) noexcept = 0;
464 virtual bool getDebugState(char const* name) const noexcept = 0;
465 virtual bool setAllTensorsDebugState(bool flag) noexcept = 0;
466 virtual size_t updateDeviceMemorySizeForShapes() noexcept = 0;
467 virtual void setDeviceMemoryV2(void* memory, int64_t size) noexcept = 0;
468 TRT_NODISCARD virtual IRuntimeConfig* getRuntimeConfig() const noexcept = 0;
469 virtual bool setUnfusedTensorsDebugState(bool flag) noexcept = 0;
470 virtual bool getUnfusedTensorsDebugState() const noexcept = 0;
471};
472
473class VEngineInspector : public VRoot
474{
475public:
476 virtual IEngineInspector* getPImpl() noexcept = 0;
477 virtual bool setExecutionContext(IExecutionContext const* context) noexcept = 0;
478 virtual IExecutionContext const* getExecutionContext() const noexcept = 0;
479 virtual char const* getLayerInformation(int32_t layerIndex, LayerInformationFormat format) const noexcept = 0;
480 virtual char const* getEngineInformation(LayerInformationFormat format) const noexcept = 0;
481 virtual void setErrorRecorder(IErrorRecorder* recorder) noexcept = 0;
482 virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
483};
484
485class VTensor : public VRoot
486{
487public:
488 virtual void setName(char const* name) noexcept = 0;
489 virtual char const* getName() const noexcept = 0;
490 virtual void setDimensions(Dims const& dimensions) noexcept = 0;
491 virtual Dims getDimensions() const noexcept = 0;
492 virtual void setType(DataType type) noexcept = 0;
493 virtual DataType getType() const noexcept = 0;
494 virtual bool setDynamicRange(float min, float max) noexcept = 0;
495 virtual bool isNetworkInput() const noexcept = 0;
496 virtual bool isNetworkOutput() const noexcept = 0;
497 virtual void setBroadcastAcrossBatch(bool broadcastAcrossBatch) noexcept = 0;
498 virtual bool getBroadcastAcrossBatch() const noexcept = 0;
499 virtual TensorLocation getLocation() const noexcept = 0;
500 virtual void setLocation(TensorLocation location) noexcept = 0;
501 virtual bool dynamicRangeIsSet() const noexcept = 0;
502 virtual void resetDynamicRange() noexcept = 0;
503 virtual float getDynamicRangeMin() const noexcept = 0;
504 virtual float getDynamicRangeMax() const noexcept = 0;
505 virtual void setAllowedFormats(TensorFormats formats) noexcept = 0;
506 virtual TensorFormats getAllowedFormats() const noexcept = 0;
507 virtual bool isShapeTensor() const noexcept = 0;
508 virtual bool isExecutionTensor() const noexcept = 0;
509 virtual void setDimensionName(int32_t index, char const* name) noexcept = 0;
510 virtual char const* getDimensionName(int32_t index) const noexcept = 0;
511};
512
513class VLayer : public VRoot
514{
515public:
516 virtual LayerType getType() const noexcept = 0;
517 virtual void setName(char const* name) noexcept = 0;
518 virtual char const* getName() const noexcept = 0;
519 virtual int32_t getNbInputs() const noexcept = 0;
520 virtual ITensor* getInput(int32_t index) const noexcept = 0;
521 virtual int32_t getNbOutputs() const noexcept = 0;
522 virtual ITensor* getOutput(int32_t index) const noexcept = 0;
523 virtual void setInput(int32_t index, ITensor& tensor) noexcept = 0;
524 virtual void setPrecision(DataType dataType) noexcept = 0;
525 virtual DataType getPrecision() const noexcept = 0;
526 virtual bool precisionIsSet() const noexcept = 0;
527 virtual void resetPrecision() noexcept = 0;
528 virtual void setOutputType(int32_t index, DataType dataType) noexcept = 0;
529 virtual DataType getOutputType(int32_t index) const noexcept = 0;
530 virtual bool outputTypeIsSet(int32_t index) const noexcept = 0;
531 virtual void resetOutputType(int32_t index) noexcept = 0;
532 virtual void setMetadata(char const* docString) noexcept = 0;
533 virtual char const* getMetadata() const noexcept = 0;
534};
535
536class VConvolutionLayer : public VRoot
537{
538public:
539 virtual void setNbOutputMaps(int64_t nbOutputMaps) noexcept = 0;
540 virtual int64_t getNbOutputMaps() const noexcept = 0;
541 virtual void setNbGroups(int64_t nbGroups) noexcept = 0;
542 virtual int64_t getNbGroups() const noexcept = 0;
543 virtual void setKernelWeights(Weights weights) noexcept = 0;
544 virtual Weights getKernelWeights() const noexcept = 0;
545 virtual void setBiasWeights(Weights weights) noexcept = 0;
546 virtual Weights getBiasWeights() const noexcept = 0;
547 virtual void setPrePadding(Dims const& padding) noexcept = 0;
548 virtual Dims getPrePadding() const noexcept = 0;
549 virtual void setPostPadding(Dims const& padding) noexcept = 0;
550 virtual Dims getPostPadding() const noexcept = 0;
551 virtual void setPaddingMode(PaddingMode paddingMode) noexcept = 0;
552 virtual PaddingMode getPaddingMode() const noexcept = 0;
553 virtual void setKernelSizeNd(Dims const& kernelSize) noexcept = 0;
554 virtual Dims getKernelSizeNd() const noexcept = 0;
555 virtual void setStrideNd(Dims const& stride) noexcept = 0;
556 virtual Dims getStrideNd() const noexcept = 0;
557 virtual void setPaddingNd(Dims const& padding) noexcept = 0;
558 virtual Dims getPaddingNd() const noexcept = 0;
559 virtual void setDilationNd(Dims const& dilation) noexcept = 0;
560 virtual Dims getDilationNd() const noexcept = 0;
561};
562
563class VActivationLayer : public VRoot
564{
565public:
566 virtual void setActivationType(ActivationType type) noexcept = 0;
567 virtual ActivationType getActivationType() const noexcept = 0;
568 virtual void setAlpha(float alpha) noexcept = 0;
569 virtual void setBeta(float beta) noexcept = 0;
570 virtual float getAlpha() const noexcept = 0;
571 virtual float getBeta() const noexcept = 0;
572};
573
574class VPoolingLayer : public VRoot
575{
576public:
577 virtual void setPoolingType(PoolingType type) noexcept = 0;
578 virtual PoolingType getPoolingType() const noexcept = 0;
579 virtual void setBlendFactor(float blendFactor) noexcept = 0;
580 virtual float getBlendFactor() const noexcept = 0;
581 virtual void setAverageCountExcludesPadding(bool exclusive) noexcept = 0;
582 virtual bool getAverageCountExcludesPadding() const noexcept = 0;
583 virtual void setPrePadding(Dims const& padding) noexcept = 0;
584 virtual Dims getPrePadding() const noexcept = 0;
585 virtual void setPostPadding(Dims const& padding) noexcept = 0;
586 virtual Dims getPostPadding() const noexcept = 0;
587 virtual void setPaddingMode(PaddingMode paddingMode) noexcept = 0;
588 virtual PaddingMode getPaddingMode() const noexcept = 0;
589 virtual void setWindowSizeNd(Dims const& windowSize) noexcept = 0;
590 virtual Dims getWindowSizeNd() const noexcept = 0;
591 virtual void setStrideNd(Dims const& stride) noexcept = 0;
592 virtual Dims getStrideNd() const noexcept = 0;
593 virtual void setPaddingNd(Dims const& padding) noexcept = 0;
594 virtual Dims getPaddingNd() const noexcept = 0;
595};
596
597class VLRNLayer : public VRoot
598{
599public:
600 virtual void setWindowSize(int64_t windowSize) noexcept = 0;
601 virtual int64_t getWindowSize() const noexcept = 0;
602 virtual void setAlpha(float alpha) noexcept = 0;
603 virtual float getAlpha() const noexcept = 0;
604 virtual void setBeta(float beta) noexcept = 0;
605 virtual float getBeta() const noexcept = 0;
606 virtual void setK(float k) noexcept = 0;
607 virtual float getK() const noexcept = 0;
608};
609
610class VScaleLayer : public VRoot
611{
612public:
613 virtual void setMode(ScaleMode mode) noexcept = 0;
614 virtual ScaleMode getMode() const noexcept = 0;
615 virtual void setShift(Weights shift) noexcept = 0;
616 virtual Weights getShift() const noexcept = 0;
617 virtual void setScale(Weights scale) noexcept = 0;
618 virtual Weights getScale() const noexcept = 0;
619 virtual void setPower(Weights power) noexcept = 0;
620 virtual Weights getPower() const noexcept = 0;
621 virtual int32_t getChannelAxis() const noexcept = 0;
622 virtual void setChannelAxis(int32_t channelAxis) noexcept = 0;
623};
624
625class VSoftMaxLayer : public VRoot
626{
627public:
628 virtual void setAxes(uint32_t axes) noexcept = 0;
629 virtual uint32_t getAxes() const noexcept = 0;
630};
631
632class VConcatenationLayer : public VRoot
633{
634public:
635 virtual void setAxis(int32_t axis) noexcept = 0;
636 virtual int32_t getAxis() const noexcept = 0;
637};
638
639class VDeconvolutionLayer : public VRoot
640{
641public:
642 virtual void setNbOutputMaps(int64_t nbOutputMaps) noexcept = 0;
643 virtual int64_t getNbOutputMaps() const noexcept = 0;
644 virtual void setNbGroups(int64_t nbGroups) noexcept = 0;
645 virtual int64_t getNbGroups() const noexcept = 0;
646 virtual void setKernelWeights(Weights weights) noexcept = 0;
647 virtual Weights getKernelWeights() const noexcept = 0;
648 virtual void setBiasWeights(Weights weights) noexcept = 0;
649 virtual Weights getBiasWeights() const noexcept = 0;
650 virtual void setPrePadding(Dims const& padding) noexcept = 0;
651 virtual Dims getPrePadding() const noexcept = 0;
652 virtual void setPostPadding(Dims const& padding) noexcept = 0;
653 virtual Dims getPostPadding() const noexcept = 0;
654 virtual void setPaddingMode(PaddingMode paddingMode) noexcept = 0;
655 virtual PaddingMode getPaddingMode() const noexcept = 0;
656 virtual void setKernelSizeNd(Dims const& kernelSize) noexcept = 0;
657 virtual Dims getKernelSizeNd() const noexcept = 0;
658 virtual void setStrideNd(Dims const& stride) noexcept = 0;
659 virtual Dims getStrideNd() const noexcept = 0;
660 virtual void setPaddingNd(Dims const& padding) noexcept = 0;
661 virtual Dims getPaddingNd() const noexcept = 0;
662 virtual void setDilationNd(Dims const& dilation) noexcept = 0;
663 virtual Dims getDilationNd() const noexcept = 0;
664};
665
666class VElementWiseLayer : public VRoot
667{
668public:
669 virtual void setOperation(ElementWiseOperation op) noexcept = 0;
670 virtual ElementWiseOperation getOperation() const noexcept = 0;
671};
672
673class VGatherLayer : public VRoot
674{
675public:
676 virtual void setGatherAxis(int32_t axis) noexcept = 0;
677 virtual int32_t getGatherAxis() const noexcept = 0;
678 virtual void setNbElementWiseDims(int32_t k) noexcept = 0;
679 virtual int32_t getNbElementWiseDims() const noexcept = 0;
680 virtual void setMode(GatherMode mode) noexcept = 0;
681 virtual GatherMode getMode() const noexcept = 0;
682};
683
684class VPluginLayer : public VRoot
685{
686public:
687 virtual IPlugin& getPlugin() noexcept = 0;
688};
689
690class VPluginV2Layer : public VRoot
691{
692public:
693 virtual IPluginV2& getPlugin() noexcept = 0;
694};
695
696class VPluginV3Layer : public VRoot
697{
698public:
699 virtual IPluginV3& getPlugin() noexcept = 0;
700};
701
702class VUnaryLayer : public VRoot
703{
704public:
705 virtual void setOperation(UnaryOperation op) noexcept = 0;
706 virtual UnaryOperation getOperation() const noexcept = 0;
707};
708
709class VReduceLayer : public VRoot
710{
711public:
712 virtual void setOperation(ReduceOperation op) noexcept = 0;
713 virtual ReduceOperation getOperation() const noexcept = 0;
714 virtual void setReduceAxes(uint32_t reduceAxes) noexcept = 0;
715 virtual uint32_t getReduceAxes() const noexcept = 0;
716 virtual void setKeepDimensions(bool keepDimensions) noexcept = 0;
717 virtual bool getKeepDimensions() const noexcept = 0;
718};
719
720class VPaddingLayer : public VRoot
721{
722public:
723 virtual void setPrePaddingNd(Dims const& padding) noexcept = 0;
724 virtual Dims getPrePaddingNd() const noexcept = 0;
725 virtual void setPostPaddingNd(Dims const& padding) noexcept = 0;
726 virtual Dims getPostPaddingNd() const noexcept = 0;
727};
728
729class VShuffleLayer : public VRoot
730{
731public:
732 virtual void setFirstTranspose(Permutation const& permutation) noexcept = 0;
733 virtual Permutation const& getFirstTranspose() const noexcept = 0;
734 virtual void setReshapeDimensions(Dims const& dimensions) noexcept = 0;
735 virtual Dims getReshapeDimensions() const noexcept = 0;
736 virtual void setSecondTranspose(Permutation const& permutation) noexcept = 0;
737 virtual Permutation const& getSecondTranspose() const noexcept = 0;
738 virtual void setZeroIsPlaceholder(bool zeroIsPlaceholder) noexcept = 0;
739 virtual bool getZeroIsPlaceholder() const noexcept = 0;
740};
741
742class VSliceLayer : public VRoot
743{
744public:
745 virtual void setStart(Dims const& start) noexcept = 0;
746 virtual Dims getStart() const noexcept = 0;
747 virtual void setSize(Dims const& size) noexcept = 0;
748 virtual Dims getSize() const noexcept = 0;
749 virtual void setStride(Dims const& stride) noexcept = 0;
750 virtual Dims getStride() const noexcept = 0;
751 virtual void setMode(SampleMode mode) noexcept = 0;
752 virtual SampleMode getMode() const noexcept = 0;
753 virtual void setAxes(Dims const& axes) noexcept = 0;
754 virtual Dims getAxes() const noexcept = 0;
755};
756
757class VShapeLayer : public VRoot
758{
759public:
760};
761
762class VTopKLayer : public VRoot
763{
764public:
765 virtual void setOperation(TopKOperation op) noexcept = 0;
766 virtual TopKOperation getOperation() const noexcept = 0;
767 virtual void setK(int32_t k) noexcept = 0;
768 virtual int32_t getK() const noexcept = 0;
769 virtual void setReduceAxes(uint32_t reduceAxes) noexcept = 0;
770 virtual uint32_t getReduceAxes() const noexcept = 0;
771};
772
773class VMatrixMultiplyLayer : public VRoot
774{
775public:
776 virtual void setOperation(int32_t index, MatrixOperation op) noexcept = 0;
777 virtual MatrixOperation getOperation(int32_t index) const noexcept = 0;
778};
779
780class VNonZeroLayer : public VRoot
781{
782public:
783};
784
785class VRaggedSoftMaxLayer : public VRoot
786{
787public:
788};
789
790class VIdentityLayer : public VRoot
791{
792public:
793};
794
795class VCastLayer : public VRoot
796{
797public:
798 virtual void setToType(DataType toType) noexcept = 0;
799 virtual DataType getToType() const noexcept = 0;
800};
801
802class VConstantLayer : public VRoot
803{
804public:
805 virtual void setWeights(Weights weights) noexcept = 0;
806 virtual Weights getWeights() const noexcept = 0;
807 virtual void setDimensions(Dims const& dimensions) noexcept = 0;
808 virtual Dims getDimensions() const noexcept = 0;
809};
810
811class VParametricReLULayer : public VRoot
812{
813public:
814};
815
816class VResizeLayer : public VRoot
817{
818public:
819 virtual void setOutputDimensions(Dims const& dimensions) noexcept = 0;
820 virtual Dims getOutputDimensions() const noexcept = 0;
821 virtual void setScales(float const* scales, int32_t nbScales) noexcept = 0;
822 virtual int32_t getScales(int32_t size, float* scales) const noexcept = 0;
823 virtual void setResizeMode(InterpolationMode interpolationMode) noexcept = 0;
824 virtual InterpolationMode getResizeMode() const noexcept = 0;
825 virtual void setCoordinateTransformation(ResizeCoordinateTransformation coordTransform) noexcept = 0;
826 virtual ResizeCoordinateTransformation getCoordinateTransformation() const noexcept = 0;
827 virtual void setSelectorForSinglePixel(ResizeSelector selector) noexcept = 0;
828 virtual ResizeSelector getSelectorForSinglePixel() const noexcept = 0;
829 virtual void setNearestRounding(ResizeRoundMode value) noexcept = 0;
830 virtual ResizeRoundMode getNearestRounding() const noexcept = 0;
831 virtual void setCubicCoeff(float value) noexcept = 0;
832 virtual float getCubicCoeff() const noexcept = 0;
833 virtual void setExcludeOutside(bool value) noexcept = 0;
834 virtual bool getExcludeOutside() const noexcept = 0;
835};
836
837class VLoopBoundaryLayer : public VRoot
838{
839public:
840 virtual ILoop* getLoop() const noexcept = 0;
841};
842
843class VRecurrenceLayer : public VRoot
844{
845public:
846};
847
848class VLoopOutputLayer : public VRoot
849{
850public:
851 virtual LoopOutput getLoopOutput() const noexcept = 0;
852 virtual void setAxis(int32_t axis) noexcept = 0;
853 virtual int32_t getAxis() const noexcept = 0;
854};
855
856class VTripLimitLayer : public VRoot
857{
858public:
859 virtual TripLimit getTripLimit() const noexcept = 0;
860};
861
862class VIteratorLayer : public VRoot
863{
864public:
865 virtual void setAxis(int32_t axis) noexcept = 0;
866 virtual int32_t getAxis() const noexcept = 0;
867 virtual void setReverse(bool reverse) noexcept = 0;
868 virtual bool getReverse() const noexcept = 0;
869};
870class VLoop : public VRoot
871{
872public:
873 virtual IRecurrenceLayer* addRecurrence(ITensor& initialValue) noexcept = 0;
874 virtual ITripLimitLayer* addTripLimit(ITensor& tensor, TripLimit limit) noexcept = 0;
875 virtual IIteratorLayer* addIterator(ITensor& tensor, int32_t axis = 0, bool reverse = false) noexcept = 0;
876 virtual ILoopOutputLayer* addLoopOutput(ITensor& tensor, LoopOutput outputKind, int32_t axis = 0) noexcept = 0;
877 virtual void setName(char const* name) noexcept = 0;
878 virtual char const* getName() const noexcept = 0;
879};
880
881class VConditionalBoundaryLayer : public VRoot
882{
883public:
884 virtual IIfConditional* getConditional() const noexcept = 0;
885};
886
887class VConditionLayer : public VRoot
888{
889public:
890};
891
892class VConditionalInputLayer : public VRoot
893{
894public:
895};
896
897class VConditionalOutputLayer : public VRoot
898{
899public:
900};
901
902class VIfConditional : public VRoot
903{
904public:
905 virtual IConditionLayer* setCondition(ITensor& tensor) noexcept = 0;
906 virtual IIfConditionalInputLayer* addInput(ITensor& tensor) noexcept = 0;
907 virtual IIfConditionalOutputLayer* addOutput(ITensor& trueTensor, ITensor& falseTensor) noexcept = 0;
908 virtual void setName(char const* name) noexcept = 0;
909 virtual char const* getName() const noexcept = 0;
910};
911
912class VSelectLayer : public VRoot
913{
914};
915
916class VAssertionLayer : public VRoot
917{
918public:
919 virtual void setMessage(char const* message) noexcept = 0;
920 virtual char const* getMessage() const noexcept = 0;
921};
922
923class VFillLayer : public VRoot
924{
925public:
926 virtual void setDimensions(Dims const& dimensions) noexcept = 0;
927 virtual Dims getDimensions() const noexcept = 0;
928 virtual void setOperation(FillOperation op) noexcept = 0;
929 virtual FillOperation getOperation() const noexcept = 0;
930 virtual void setAlpha(double alpha) noexcept = 0;
931 virtual double getAlpha() const noexcept = 0;
932 virtual void setBeta(double beta) noexcept = 0;
933 virtual double getBeta() const noexcept = 0;
934 virtual void setAlphaInt64(int64_t alpha) noexcept = 0;
935 virtual int64_t getAlphaInt64() const noexcept = 0;
936 virtual void setBetaInt64(int64_t beta) noexcept = 0;
937 virtual int64_t getBetaInt64() const noexcept = 0;
938 virtual bool isAlphaBetaInt64() const noexcept = 0;
939 virtual DataType getToType() const noexcept = 0;
940 virtual void setToType(DataType toType) noexcept = 0;
941};
942
943class VQuantizeLayer : public VRoot
944{
945public:
946 virtual int32_t getAxis() const noexcept = 0;
947 virtual void setAxis(int32_t axis) noexcept = 0;
948 virtual DataType getToType() const noexcept = 0;
949 virtual void setToType(DataType toType) noexcept = 0;
950};
951
952class VDequantizeLayer : public VRoot
953{
954public:
955 virtual int32_t getAxis() const noexcept = 0;
956 virtual void setAxis(int32_t axis) noexcept = 0;
957 virtual DataType getToType() const noexcept = 0;
958 virtual void setToType(DataType toType) noexcept = 0;
959};
960
961class VDynamicQuantizeLayer : public VRoot
962{
963public:
964 virtual int32_t getAxis() const noexcept = 0;
965 virtual void setAxis(int32_t axis) noexcept = 0;
966 virtual int32_t getBlockSize() const noexcept = 0;
967 virtual void setBlockSize(int32_t axis) noexcept = 0;
968 virtual DataType getScaleType() const noexcept = 0;
969 virtual void setScaleType(DataType axis) noexcept = 0;
970 virtual DataType getToType() const noexcept = 0;
971 virtual void setToType(DataType toType) noexcept = 0;
972};
973
974class VScatterLayer : public VRoot
975{
976public:
977 virtual void setMode(ScatterMode mode) noexcept = 0;
978 virtual ScatterMode getMode() const noexcept = 0;
979 virtual void setAxis(int32_t axis) noexcept = 0;
980 virtual int32_t getAxis() const noexcept = 0;
981}; // class VScatterLayer
982
983class VEinsumLayer : public VRoot
984{
985public:
986 virtual bool setEquation(char const* equation) noexcept = 0;
987 virtual char const* getEquation() const noexcept = 0;
988};
989
990class VOneHotLayer : public VRoot
991{
992public:
993 virtual int32_t getAxis() const noexcept = 0;
994 virtual void setAxis(int32_t axis) noexcept = 0;
995}; // class VOneHotLayer
996
997class VGridSampleLayer : public VRoot
998{
999public:
1000 virtual void setInterpolationMode(InterpolationMode mode) noexcept = 0;
1001 virtual InterpolationMode getInterpolationMode() const noexcept = 0;
1002 virtual void setAlignCorners(bool alignCorners) noexcept = 0;
1003 virtual bool getAlignCorners() const noexcept = 0;
1004 virtual bool setSampleMode(SampleMode mode) noexcept = 0;
1005 virtual SampleMode getSampleMode() const noexcept = 0;
1006}; // class VGridSampleLayer
1007
1008class VNMSLayer : public VRoot
1009{
1010public:
1011 virtual void setBoundingBoxFormat(BoundingBoxFormat fmt) noexcept = 0;
1012 virtual BoundingBoxFormat getBoundingBoxFormat() const noexcept = 0;
1013 virtual void setTopKBoxLimit(int32_t limit) noexcept = 0;
1014 virtual int32_t getTopKBoxLimit() const noexcept = 0;
1015}; // class VNMSLayer
1016
1017class VReverseSequenceLayer : public VRoot
1018{
1019public:
1020 virtual void setBatchAxis(int32_t batchAxis) noexcept = 0;
1021 virtual int32_t getBatchAxis() const noexcept = 0;
1022
1023 virtual void setSequenceAxis(int32_t sequenceAxis) noexcept = 0;
1024 virtual int32_t getSequenceAxis() const noexcept = 0;
1025}; // class VReverseSequenceLayer
1026
1027class VNormalizationLayer : public VRoot
1028{
1029public:
1030 virtual void setEpsilon(float eps) noexcept = 0;
1031 virtual float getEpsilon() const noexcept = 0;
1032 virtual void setAxes(uint32_t axesMask) noexcept = 0;
1033 virtual uint32_t getAxes() const noexcept = 0;
1034 virtual void setNbGroups(int64_t nbGroups) noexcept = 0;
1035 virtual int64_t getNbGroups() const noexcept = 0;
1036 virtual void setComputePrecision(DataType type) noexcept = 0;
1037 virtual DataType getComputePrecision() const noexcept = 0;
1038}; // class VNormalizationLayer
1039
1040class VSqueezeLayer : public VRoot
1041{
1042};
1043
1044class VUnsqueezeLayer : public VRoot
1045{
1046};
1047
1048class VCumulativeLayer : public VRoot
1049{
1050public:
1051 virtual bool setOperation(CumulativeOperation op) noexcept = 0;
1052 virtual CumulativeOperation getOperation() const noexcept = 0;
1053 virtual void setExclusive(bool exclusive) noexcept = 0;
1054 virtual bool getExclusive() const noexcept = 0;
1055 virtual void setReverse(bool reverse) noexcept = 0;
1056 virtual bool getReverse() const noexcept = 0;
1057}; // class VCumulativeLayer
1058
1059
1060class VNetworkDefinition : public VRoot
1061{
1062public:
1063 virtual ITensor* addInput(char const* name, DataType type, Dims const& dimensions) noexcept = 0;
1064 virtual void markOutput(ITensor& tensor) noexcept = 0;
1065 virtual IActivationLayer* addActivation(ITensor& input, ActivationType type) noexcept = 0;
1066 virtual ILRNLayer* addLRN(ITensor& input, int64_t window, float alpha, float beta, float k) noexcept = 0;
1067 virtual IScaleLayer* addScale(
1068 ITensor& input, ScaleMode mode, Weights shift, Weights scale, Weights power) noexcept = 0;
1069 virtual ISoftMaxLayer* addSoftMax(ITensor& input) noexcept = 0;
1070 virtual IConcatenationLayer* addConcatenation(ITensor* const* inputs, int32_t nbInputs) noexcept = 0;
1071 virtual IElementWiseLayer* addElementWise(ITensor& input1, ITensor& input2, ElementWiseOperation op) noexcept = 0;
1072 virtual IUnaryLayer* addUnary(ITensor& input, UnaryOperation operation) noexcept = 0;
1073 virtual IShuffleLayer* addShuffle(ITensor& input) noexcept = 0;
1074 virtual int32_t getNbLayers() const noexcept = 0;
1075 virtual ILayer* getLayer(int32_t index) const noexcept = 0;
1076 virtual int32_t getNbInputs() const noexcept = 0;
1077 virtual ITensor* getInput(int32_t index) const noexcept = 0;
1078 virtual int32_t getNbOutputs() const noexcept = 0;
1079 virtual ITensor* getOutput(int32_t index) const noexcept = 0;
1080 virtual IReduceLayer* addReduce(
1081 ITensor& input, ReduceOperation operation, uint32_t reduceAxes, bool keepDimensions) noexcept
1082 = 0;
1083 virtual ITopKLayer* addTopK(ITensor& input, TopKOperation op, int32_t k, uint32_t reduceAxes) noexcept = 0;
1084 virtual IGatherLayer* addGather(ITensor& data, ITensor& indices, int32_t axis) noexcept = 0;
1085 virtual IRaggedSoftMaxLayer* addRaggedSoftMax(ITensor& input, ITensor& bounds) noexcept = 0;
1086 virtual IMatrixMultiplyLayer* addMatrixMultiply(
1087 ITensor& input0, MatrixOperation op0, ITensor& input1, MatrixOperation op1) noexcept = 0;
1088 virtual IConstantLayer* addConstant(Dims const& dimensions, Weights weights) noexcept = 0;
1089 virtual IIdentityLayer* addIdentity(ITensor& input) noexcept = 0;
1090 virtual void removeTensor(ITensor& tensor) noexcept = 0;
1091 virtual void unmarkOutput(ITensor& tensor) noexcept = 0;
1092 virtual IPluginV2Layer* addPluginV2(ITensor* const* inputs, int32_t nbInputs, IPluginV2& plugin) noexcept = 0;
1093 virtual IPluginV3Layer* addPluginV3(ITensor* const* inputs, int32_t nbInputs, ITensor* const* shapeInputs,
1094 int32_t nbShapeInputs, IPluginV3& plugin) noexcept = 0;
1095 virtual ISliceLayer* addSlice(ITensor& input, Dims const& start, Dims const& size, Dims const& stride) noexcept = 0;
1096 virtual void setName(char const* name) noexcept = 0;
1097 virtual char const* getName() const noexcept = 0;
1098 virtual IShapeLayer* addShape(ITensor& input) noexcept = 0;
1099 virtual bool hasImplicitBatchDimension() const noexcept = 0;
1100 virtual bool markOutputForShapes(ITensor& tensor) noexcept = 0;
1101 virtual bool unmarkOutputForShapes(ITensor& tensor) noexcept = 0;
1102 virtual IParametricReLULayer* addParametricReLU(ITensor& input, ITensor& slope) noexcept = 0;
1103 virtual IConvolutionLayer* addConvolutionNd(
1104 ITensor& input, int64_t nbOutputMaps, Dims const& kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
1105 = 0;
1106 virtual IPoolingLayer* addPoolingNd(ITensor& input, PoolingType type, Dims const& windowSize) noexcept = 0;
1107 virtual IDeconvolutionLayer* addDeconvolutionNd(
1108 ITensor& input, int64_t nbOutputMaps, Dims const& kernelSize, Weights kernelWeights, Weights biasWeights) noexcept
1109 = 0;
1110 virtual IScaleLayer* addScaleNd(
1111 ITensor& input, ScaleMode mode, Weights shift, Weights scale, Weights power, int32_t channelAxis) noexcept = 0;
1112 virtual IResizeLayer* addResize(ITensor& input) noexcept = 0;
1113 virtual ILoop* addLoop() noexcept = 0;
1114 virtual ISelectLayer* addSelect(ITensor& condition, ITensor& thenInput, ITensor& elseInput) noexcept = 0;
1115 virtual IFillLayer* addFill(Dims const& dimensions, FillOperation op) noexcept = 0;
1116 virtual IPaddingLayer* addPaddingNd(ITensor& input, Dims const& prePadding, Dims const& postPadding) noexcept = 0;
1117 virtual bool setWeightsName(Weights weights, char const* name) noexcept = 0;
1118 virtual void setErrorRecorder(IErrorRecorder* recorder) noexcept = 0;
1119 virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
1120 virtual IDequantizeLayer* addDequantize(ITensor& input, ITensor& scale) noexcept = 0;
1121 virtual IQuantizeLayer* addQuantize(ITensor& input, ITensor& scale) noexcept = 0;
1122 virtual IGatherLayer* addGatherV2(ITensor& data, ITensor& indices, GatherMode mode) noexcept = 0;
1123 virtual IIfConditional* addIfConditional() noexcept = 0;
1124 virtual IScatterLayer* addScatter(ITensor& data, ITensor& indices, ITensor& updates, ScatterMode mode) noexcept = 0;
1125 virtual IEinsumLayer* addEinsum(ITensor* const* inputs, int32_t nbInputs, char const* equation) noexcept = 0;
1126 virtual IAssertionLayer* addAssertion(ITensor& condition, char const* message) noexcept = 0;
1127 virtual IOneHotLayer* addOneHot(ITensor& indices, ITensor& values, ITensor& depth, int32_t axis) noexcept = 0;
1128 virtual INonZeroLayer* addNonZero(ITensor& input) noexcept = 0;
1129 virtual IGridSampleLayer* addGridSample(ITensor& input, ITensor& grid) noexcept = 0;
1130 virtual INMSLayer* addNMS(ITensor& boxes, ITensor& scores, ITensor& maxOutputBoxesPerClass) noexcept = 0;
1131 virtual IReverseSequenceLayer* addReverseSequence(ITensor& input, ITensor& sequenceLens) noexcept = 0;
1132 virtual INormalizationLayer* addNormalization(
1133 ITensor& input, ITensor& scale, ITensor& bias, uint32_t axesMask) noexcept = 0;
1134 virtual ICastLayer* addCast(ITensor& input, DataType toType) noexcept = 0;
1135 virtual IBuilder& getBuilder() const noexcept = 0;
1136 virtual NetworkDefinitionCreationFlags getFlags() const noexcept = 0;
1137 virtual bool getFlag(NetworkDefinitionCreationFlag networkDefinitionCreationFlag) const noexcept = 0;
1138 virtual IQuantizeLayer* addQuantizeV2(ITensor& input, ITensor& scale, DataType outputType) noexcept = 0;
1139 virtual IDequantizeLayer* addDequantizeV2(ITensor& input, ITensor& scale, DataType outputType) noexcept = 0;
1140 virtual IFillLayer* addFillV2(Dims const& dimensions, FillOperation op, DataType outputType) noexcept = 0;
1141 virtual bool markDebug(ITensor& tensor) noexcept = 0;
1142 virtual bool unmarkDebug(ITensor& tensor) noexcept = 0;
1143 virtual bool isDebugTensor(ITensor const& tensor) const noexcept = 0;
1144 virtual bool markWeightsRefittable(char const* name) noexcept = 0;
1145 virtual bool unmarkWeightsRefittable(char const* name) noexcept = 0;
1146 virtual bool areWeightsMarkedRefittable(char const* name) const noexcept = 0;
1147 virtual ISqueezeLayer* addSqueeze(ITensor& input, ITensor& axes) noexcept = 0;
1148 virtual IUnsqueezeLayer* addUnsqueeze(ITensor& input, ITensor& axes) noexcept = 0;
1149 virtual IDynamicQuantizeLayer* addDynamicQuantize(
1150 ITensor& input, int32_t axis, int32_t blockSize, DataType toType, DataType scaleType) noexcept = 0;
1151 virtual ICumulativeLayer* addCumulative(
1152 ITensor& input, ITensor& axis, CumulativeOperation operation, bool exclusive, bool reverse) noexcept = 0;
1153 virtual bool markUnfusedTensorsAsDebugTensors() noexcept = 0;
1154 virtual bool unmarkUnfusedTensorsAsDebugTensors() noexcept = 0;
1155};
1156
1157class VAlgorithmIOInfo : public VRoot
1158{
1159public:
1160 virtual DataType getDataType() const noexcept = 0;
1161 virtual Dims getStrides() const noexcept = 0;
1162 virtual int64_t getVectorizedDim() const noexcept = 0;
1163 virtual int64_t getComponentsPerElement() const noexcept = 0;
1164};
1165
1166class VAlgorithmVariant : public VRoot
1167{
1168public:
1169 virtual int64_t getImplementation() const noexcept = 0;
1170 virtual int64_t getTactic() const noexcept = 0;
1171};
1172
1173class VAlgorithmContext : public VRoot
1174{
1175public:
1176 virtual char const* getName() const noexcept = 0;
1177 virtual Dims getDimensions(int32_t index, OptProfileSelector select) const noexcept = 0;
1178 virtual int32_t getNbInputs() const noexcept = 0;
1179 virtual int32_t getNbOutputs() const noexcept = 0;
1180};
1181
1182class VAlgorithm : public VRoot
1183{
1184public:
1185 virtual IAlgorithmVariant const& getAlgorithmVariant() const noexcept = 0;
1186 virtual float getTimingMSec() const noexcept = 0;
1187 virtual std::size_t getWorkspaceSize() const noexcept = 0;
1188 virtual IAlgorithmIOInfo const* getAlgorithmIOInfoByIndex(int32_t index) const noexcept = 0;
1189};
1190
1191
1192class VTimingCache : public VRoot
1193{
1194public:
1195 virtual nvinfer1::IHostMemory* serialize() const noexcept = 0;
1196 virtual bool combine(ITimingCache const& inputCache, bool ignoreMismatch) noexcept = 0;
1197 virtual bool reset() noexcept = 0;
1198 virtual int64_t queryKeys(TimingCacheKey* keyBuffer, int64_t capacity) const noexcept = 0;
1199 virtual TimingCacheValue query(TimingCacheKey const& key) const noexcept = 0;
1200 virtual bool update(TimingCacheKey const& key, TimingCacheValue const& value) noexcept = 0;
1201};
1202
1203class VBuilderConfig : public VRoot
1204{
1205public:
1206 virtual void setAvgTimingIterations(int32_t avgTiming) noexcept = 0;
1207 virtual int32_t getAvgTimingIterations() const noexcept = 0;
1208 virtual void setEngineCapability(EngineCapability capability) noexcept = 0;
1209 virtual EngineCapability getEngineCapability() const noexcept = 0;
1210 virtual void setInt8Calibrator(IInt8Calibrator* calibrator) noexcept = 0;
1211 virtual IInt8Calibrator* getInt8Calibrator() const noexcept = 0;
1212 virtual void setFlags(BuilderFlags builderFlags) noexcept = 0;
1213 virtual BuilderFlags getFlags() const noexcept = 0;
1214 virtual void clearFlag(BuilderFlag builderFlag) noexcept = 0;
1215 virtual void setFlag(BuilderFlag builderFlag) noexcept = 0;
1216 virtual bool getFlag(BuilderFlag builderFlag) const noexcept = 0;
1217 virtual void setDeviceType(ILayer const* layer, DeviceType deviceType) noexcept = 0;
1218 virtual DeviceType getDeviceType(ILayer const* layer) const noexcept = 0;
1219 virtual bool isDeviceTypeSet(ILayer const* layer) const noexcept = 0;
1220 virtual void resetDeviceType(ILayer const* layer) noexcept = 0;
1221 virtual bool canRunOnDLA(ILayer const* layer) const noexcept = 0;
1222 virtual void setDLACore(int32_t dlaCore) noexcept = 0;
1223 virtual int32_t getDLACore() const noexcept = 0;
1224 virtual void setDefaultDeviceType(DeviceType deviceType) noexcept = 0;
1225 virtual DeviceType getDefaultDeviceType() const noexcept = 0;
1226 virtual void reset() noexcept = 0;
1227 virtual void setProfileStream(const cudaStream_t stream) noexcept = 0;
1228 virtual cudaStream_t getProfileStream() const noexcept = 0;
1229 virtual int32_t addOptimizationProfile(IOptimizationProfile const* profile) noexcept = 0;
1230 virtual int32_t getNbOptimizationProfiles() const noexcept = 0;
1231 virtual void setProfilingVerbosity(ProfilingVerbosity verbosity) noexcept = 0;
1232 virtual ProfilingVerbosity getProfilingVerbosity() const noexcept = 0;
1233 virtual void setAlgorithmSelector(IAlgorithmSelector* selector) noexcept = 0;
1234 virtual IAlgorithmSelector* getAlgorithmSelector() const noexcept = 0;
1235 virtual bool setCalibrationProfile(IOptimizationProfile const* profile) noexcept = 0;
1236 virtual IOptimizationProfile const* getCalibrationProfile() noexcept = 0;
1237 virtual void setQuantizationFlags(QuantizationFlags flags) noexcept = 0;
1238 virtual QuantizationFlags getQuantizationFlags() const noexcept = 0;
1239 virtual void clearQuantizationFlag(QuantizationFlag flag) noexcept = 0;
1240 virtual void setQuantizationFlag(QuantizationFlag flag) noexcept = 0;
1241 virtual bool getQuantizationFlag(QuantizationFlag flag) const noexcept = 0;
1242 virtual bool setTacticSources(TacticSources tacticSources) noexcept = 0;
1243 virtual TacticSources getTacticSources() const noexcept = 0;
1244 virtual nvinfer1::ITimingCache* createTimingCache(void const* blob, std::size_t size) const noexcept = 0;
1245 virtual bool setTimingCache(ITimingCache const& cache, bool ignoreMismatch) noexcept = 0;
1246 virtual nvinfer1::ITimingCache const* getTimingCache() const noexcept = 0;
1247 virtual void setMemoryPoolLimit(MemoryPoolType pool, std::size_t poolSize) noexcept = 0;
1248 virtual std::size_t getMemoryPoolLimit(MemoryPoolType pool) const noexcept = 0;
1249 virtual void setPreviewFeature(PreviewFeature feature, bool enable) noexcept = 0;
1250 virtual bool getPreviewFeature(PreviewFeature feature) const noexcept = 0;
1251 virtual void setBuilderOptimizationLevel(int32_t level) noexcept = 0;
1252 virtual int32_t getBuilderOptimizationLevel() const noexcept = 0;
1253 virtual void setHardwareCompatibilityLevel(HardwareCompatibilityLevel hardwareCompatibilityLevel) noexcept = 0;
1254 virtual HardwareCompatibilityLevel getHardwareCompatibilityLevel() const noexcept = 0;
1255 virtual void setPluginsToSerialize(char const* const* paths, int32_t nbPaths) noexcept = 0;
1256 virtual char const* getPluginToSerialize(int32_t index) const noexcept = 0;
1257 virtual int32_t getNbPluginsToSerialize() const noexcept = 0;
1258 virtual void setMaxAuxStreams(int32_t nbStreams) noexcept = 0;
1259 virtual int32_t getMaxAuxStreams() const noexcept = 0;
1260 virtual void setProgressMonitor(IProgressMonitor* monitor) noexcept = 0;
1261 virtual IProgressMonitor* getProgressMonitor() const noexcept = 0;
1262 virtual void setRuntimePlatform(RuntimePlatform runtimePlatform) noexcept = 0;
1263 virtual RuntimePlatform getRuntimePlatform() const noexcept = 0;
1264 virtual void setMaxNbTactics(int32_t maxTactics) noexcept = 0;
1265 virtual int32_t getMaxNbTactics() const noexcept = 0;
1266 virtual bool setTilingOptimizationLevel(TilingOptimizationLevel level) noexcept = 0;
1267 virtual TilingOptimizationLevel getTilingOptimizationLevel() const noexcept = 0;
1268 virtual bool setL2LimitForTiling(int64_t size) noexcept = 0;
1269 virtual int64_t getL2LimitForTiling() const noexcept = 0;
1270 virtual bool setRemoteAutoTuningConfig(char const* config) noexcept = 0;
1271 virtual char const* getRemoteAutoTuningConfig() const noexcept = 0;
1272};
1273
1274class VSerializationConfig : public VRoot
1275{
1276public:
1277 virtual bool setFlags(SerializationFlags serializationFlags) noexcept = 0;
1278 virtual SerializationFlags getFlags() const noexcept = 0;
1279 virtual bool clearFlag(SerializationFlag serializationFlag) noexcept = 0;
1280 virtual bool setFlag(SerializationFlag serializationFlag) noexcept = 0;
1281 virtual bool getFlag(SerializationFlag serializationFlag) const noexcept = 0;
1282};
1283
1284class VBuilder : public VRoot
1285{
1286public:
1287 virtual bool platformHasFastFp16() const noexcept = 0;
1288 virtual bool platformHasFastInt8() const noexcept = 0;
1289 virtual int32_t getMaxDLABatchSize() const noexcept = 0;
1290 virtual int32_t getNbDLACores() const noexcept = 0;
1291 virtual void setGpuAllocator(IGpuAllocator* allocator) noexcept = 0;
1292 virtual nvinfer1::IBuilderConfig* createBuilderConfig() noexcept = 0;
1293 virtual nvinfer1::INetworkDefinition* createNetworkV2(NetworkDefinitionCreationFlags flags) noexcept = 0;
1294 virtual nvinfer1::IOptimizationProfile* createOptimizationProfile() noexcept = 0;
1295 virtual void setErrorRecorder(IErrorRecorder* recorder) noexcept = 0;
1296 virtual IErrorRecorder* getErrorRecorder() const noexcept = 0;
1297 virtual void reset() noexcept = 0;
1298 virtual bool platformHasTf32() const noexcept = 0;
1299 virtual nvinfer1::IHostMemory* buildSerializedNetwork(
1300 INetworkDefinition& network, IBuilderConfig& config) noexcept = 0;
1301 virtual bool isNetworkSupported(INetworkDefinition const& network, IBuilderConfig const& config) const noexcept = 0;
1302 virtual ILogger* getLogger() const noexcept = 0;
1303 virtual bool setMaxThreads(int32_t maxThreads) noexcept = 0;
1304 virtual int32_t getMaxThreads() const noexcept = 0;
1305 virtual IPluginRegistry& getPluginRegistry() noexcept = 0;
1306 virtual ICudaEngine* buildEngineWithConfig(INetworkDefinition& network, IBuilderConfig& config) noexcept = 0;
1307 virtual bool buildSerializedNetworkToStream(
1308 INetworkDefinition& network, IBuilderConfig& config, IStreamWriter& writer) noexcept = 0;
1309};
1310
1311class VRuntimeConfig : public VRoot
1312{
1313public:
1314 virtual IRuntimeConfig* getPImpl() noexcept = 0;
1315 virtual void setExecutionContextAllocationStrategy(ExecutionContextAllocationStrategy strategy) noexcept = 0;
1316 virtual ExecutionContextAllocationStrategy getExecutionContextAllocationStrategy() const noexcept = 0;
1317};
1318
1319
1320} // namespace apiv
1321} // namespace nvinfer1
1322
1323// @endcond
1324
1325#endif // NV_INFER_RUNTIME_IMPL_H
nvinfer1::ILogger * getLogger() noexcept
Return the logger object.
nvinfer1::IPluginRegistry * getPluginRegistry() noexcept
Return the plugin registry.
#define TRT_NODISCARD
A stand-in for [[nodiscard]] and [[nodiscard(REASON)]] that works with older compilers.
Definition: NvInferRuntimeBase.h:57
Structure to define the dimensions of a tensor.
Interface implemented by application for selecting and reporting algorithms of a layer provided by th...
User-implemented callback for notification when value of a debug tensor is updated.
Reference counted application-implemented error reporting interface for TensorRT objects.
Application-implemented class for controlling allocation on the GPU.
Callback from ExecutionContext::enqueueV3()
Plugin class for the V3 generation of user-implemented layers.
Application-implemented interface for profiling.
Application-implemented progress reporting interface for TensorRT.
Application-implemented class for reading data in a stream-based manner.
Application-implemented class for reading data in a stream-based manner asynchronously....
Application-implemented class for writing data in a stream-based manner.
Class to handle library allocated memory that is accessible to the user.
Definition: NvInferRuntime.h:142
The TensorRT API version 1 namespace.
uint32_t TacticSources
Represents a collection of one or more TacticSource values combine using bitwise-OR operations.
Definition: NvInferRuntime.h:2959
v_1_0::IOutputAllocator IOutputAllocator
Definition: NvInferRuntime.h:4182
ResizeSelector
The coordinate selector when resize to single pixel output.
Definition: NvInfer.h:4054
EngineCapability
List of supported engine capability flows.
Definition: NvInferRuntime.h:76
DimensionOperation
An operation on two IDimensionExpr, which represent integer expressions used in dimension computation...
Definition: NvInferRuntime.h:179
MemoryPoolType
The type for memory pools used by TensorRT.
Definition: NvInfer.h:9205
ScaleMode
Controls how shift, scale and power are applied in a Scale layer.
Definition: NvInfer.h:1850
RuntimePlatform
Describes the intended runtime platform (operating system and CPU architecture) for the execution of ...
Definition: NvInfer.h:8805
uint32_t QuantizationFlags
Represents one or more QuantizationFlag values using binary OR operations.
Definition: NvInfer.h:8757
TensorIOMode
Definition of tensor IO Mode.
Definition: NvInferRuntimeBase.h:656
HardwareCompatibilityLevel
Describes requirements of compatibility with GPU architectures other than that of the GPU on which th...
Definition: NvInfer.h:9324
CumulativeOperation
Enumerates the cumulative operations that may be performed by a Cumulative layer.
Definition: NvInfer.h:6535
SerializationFlag
List of valid flags that the engine can enable when serializing the bytes.
Definition: NvInferRuntime.h:3000
BoundingBoxFormat
Representation of bounding box data used for the Boxes input tensor in INMSLayer.
Definition: NvInfer.h:6120
v_1_0::IPluginV3 IPluginV3
Definition: NvInferPluginBase.h:273
UnaryOperation
Enumerates the unary operations that may be performed by a Unary layer.
Definition: NvInfer.h:2795
v_1_0::IStreamWriter IStreamWriter
Definition: NvInferRuntime.h:720
v_1_0::IProfiler IProfiler
Definition: NvInferRuntime.h:1318
v_1_0::IAlgorithmSelector IAlgorithmSelector
Definition: NvInfer.h:8749
v_1_0::IStreamReaderV2 IStreamReaderV2
Definition: NvInferRuntime.h:797
ActivationType
Enumerates the types of activation to perform in an activation layer.
Definition: NvInfer.h:137
uint32_t TempfileControlFlags
Represents a collection of one or more TempfileControlFlag values combined using bitwise-OR operation...
Definition: NvInferRuntime.h:1396
FillOperation
Enumerates the tensor fill operations that may performed by a fill layer.
Definition: NvInfer.h:5035
ResizeRoundMode
The rounding mode for nearest neighbor resize.
Definition: NvInfer.h:4084
PaddingMode
Enumerates the modes of padding to perform in convolution, deconvolution and pooling layer,...
Definition: NvInfer.h:1028
TripLimit
Enum that describes kinds of trip limits.
Definition: NvInfer.h:4443
uint32_t NetworkDefinitionCreationFlags
Represents one or more NetworkDefinitionCreationFlag flags using binary OR operations....
Definition: NvInfer.h:10458
PreviewFeature
Define preview features.
Definition: NvInfer.h:9280
TilingOptimizationLevel
Define the optimization levels for Tiling.
Definition: NvInfer.h:9377
DataType
The type of weights and tensors.
Definition: NvInferRuntimeBase.h:143
uint32_t BuilderFlags
Represents one or more BuilderFlag values using binary OR operations, e.g., 1U << BuilderFlag::kFP16 ...
Definition: NvInfer.h:8835
DeviceType
The device that this layer/network will execute on.
Definition: NvInferRuntime.h:1350
CalibrationAlgoType
Version of calibration algorithm to use.
Definition: NvInfer.h:8183
LayerType
The type values of layer classes.
Definition: NvInfer.h:58
SampleMode
Controls how ISliceLayer and IGridSample handle out-of-bounds coordinates.
Definition: NvInfer.h:3253
GatherMode
Control form of IGatherLayer.
Definition: NvInfer.h:2542
v_1_0::IDebugListener IDebugListener
Definition: NvInferRuntime.h:4223
WeightsRole
How a layer uses particular Weights.
Definition: NvInferRuntime.h:1328
uint32_t TensorFormats
It is capable of representing one or more TensorFormat by binary OR operations, e....
Definition: NvInfer.h:129
ProfilingVerbosity
List of verbosity levels of layer information exposed in NVTX annotations and in IEngineInspector.
Definition: NvInferRuntime.h:2971
NetworkDefinitionCreationFlag
List of immutable network properties expressed at network creation time. NetworkDefinitionCreationFla...
Definition: NvInfer.h:10469
ElementWiseOperation
Enumerates the binary operations that may be performed by an ElementWise layer.
Definition: NvInfer.h:2452
QuantizationFlag
List of valid flags for quantizing the network to int8.
Definition: NvInfer.h:8769
uint32_t SerializationFlags
Represents one or more SerializationFlag values using binary OR operations, e.g., 1U << Serialization...
Definition: NvInferRuntime.h:2990
InterpolationMode
Enumerates various modes of interpolation.
Definition: NvInfer.h:3972
BuilderFlag
List of valid modes that the builder can enable when creating an engine from a network definition.
Definition: NvInfer.h:8845
TensorFormat
Format of the input/output tensors.
Definition: NvInferRuntime.h:1430
ExecutionContextAllocationStrategy
Different memory allocation behaviors for IExecutionContext.
Definition: NvInferRuntime.h:3104
TopKOperation
Enumerates the operations that may be performed by a TopK layer.
Definition: NvInfer.h:3534
ReduceOperation
Enumerates the reduce operations that may be performed by a Reduce layer.
Definition: NvInfer.h:2890
LayerInformationFormat
The format in which the IEngineInspector prints the layer information.
Definition: NvInferRuntime.h:5156
ScatterMode
Control form of IScatterLayer.
Definition: NvInfer.h:5854
MatrixOperation
Enumerates the operations that may be performed on a tensor by IMatrixMultiplyLayer before multiplica...
Definition: NvInfer.h:3660
ResizeCoordinateTransformation
The resize coordinate transformation function.
Definition: NvInfer.h:4000
LoopOutput
Enum that describes kinds of loop outputs.
Definition: NvInfer.h:4415
v_1_0::IStreamReader IStreamReader
Definition: NvInferRuntime.h:710
PoolingType
The type of pooling to perform in a pooling layer.
Definition: NvInfer.h:1464
v_1_0::IProgressMonitor IProgressMonitor
Definition: NvInfer.h:9493
TensorLocation
The location for tensor data storage, device or host.
Definition: NvInferRuntime.h:204
OptProfileSelector
When setting or querying optimization profile parameters (such as shape tensor inputs or dynamic dime...
Definition: NvInferRuntime.h:2633

  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