TensorRT  8.0.2
nvinfer1 Namespace Reference

The TensorRT API version 1 namespace. More...

Classes

class  Dims2
 Descriptor for two-dimensional data. More...
 
class  Dims3
 Descriptor for three-dimensional data. More...
 
class  Dims32
 
class  Dims4
 Descriptor for four-dimensional data. More...
 
class  DimsExprs
 
class  DimsHW
 Descriptor for two-dimensional spatial data. More...
 
class  DynamicPluginTensorDesc
 
class  IActivationLayer
 An Activation layer in a network definition. More...
 
class  IAlgorithm
 Describes a variation of execution of a layer. An algorithm is represented by IAlgorithmVariant and the IAlgorithmIOInfo for each of its inputs and outputs. An algorithm can be selected or reproduced using AlgorithmSelector::selectAlgorithms().". More...
 
class  IAlgorithmContext
 Describes the context and requirements, that could be fulfilled by one or more instances of IAlgorithm. More...
 
class  IAlgorithmIOInfo
 Carries information about input or output of the algorithm. IAlgorithmIOInfo for all the input and output along with IAlgorithmVariant denotes the variation of algorithm and can be used to select or reproduce an algorithm using IAlgorithmSelector::selectAlgorithms(). More...
 
class  IAlgorithmSelector
 Interface implemented by application for selecting and reporting algorithms of a layer provided by the builder. More...
 
class  IAlgorithmVariant
 provides a unique 128-bit identifier, which along with the input and output information denotes the variation of algorithm and can be used to select or reproduce an algorithm, using IAlgorithmSelector::selectAlgorithms() More...
 
class  IBuilder
 Builds an engine from a network definition. More...
 
class  IBuilderConfig
 Holds properties for configuring a builder to produce an engine. More...
 
class  IConcatenationLayer
 A concatenation layer in a network definition. More...
 
class  IConstantLayer
 Layer that represents a constant value. More...
 
class  IConvolutionLayer
 A convolution layer in a network definition. More...
 
class  ICudaEngine
 An engine for executing inference on a built network, with functionally unsafe features. More...
 
class  IDeconvolutionLayer
 A deconvolution layer in a network definition. More...
 
class  IDequantizeLayer
 A Dequantize layer in a network definition. More...
 
class  IDimensionExpr
 
class  IElementWiseLayer
 A elementwise layer in a network definition. More...
 
class  IErrorRecorder
 Reference counted application-implemented error reporting interface for TensorRT objects. More...
 
class  IExecutionContext
 Context for executing inference using an engine, with functionally unsafe features. More...
 
class  IExprBuilder
 
class  IFillLayer
 Generate an output tensor with specified mode. More...
 
class  IFullyConnectedLayer
 A fully connected layer in a network definition. This layer expects an input tensor of three or more non-batch dimensions. The input is automatically reshaped into an MxV tensor X, where V is a product of the last three dimensions and M is a product of the remaining dimensions (where the product over 0 dimensions is defined as 1). For example: More...
 
class  IGatherLayer
 
class  IGpuAllocator
 Application-implemented class for controlling allocation on the GPU. More...
 
class  IHostMemory
 Class to handle library allocated memory that is accessible to the user. More...
 
class  IIdentityLayer
 A layer that represents the identity function. More...
 
class  IInt8Calibrator
 Application-implemented interface for calibration. More...
 
class  IInt8EntropyCalibrator
 
class  IInt8EntropyCalibrator2
 
class  IInt8LegacyCalibrator
 
class  IInt8MinMaxCalibrator
 
class  IIteratorLayer
 
class  ILayer
 Base class for all layer classes in a network definition. More...
 
class  ILogger
 Application-implemented logging interface for the builder, engine and runtime. More...
 
class  ILoop
 
class  ILoopBoundaryLayer
 
class  ILoopOutputLayer
 
class  ILRNLayer
 A LRN layer in a network definition. More...
 
class  IMatrixMultiplyLayer
 Layer that represents a Matrix Multiplication. More...
 
class  INetworkDefinition
 A network definition for input to the builder. More...
 
class  INoCopy
 Forward declaration of IPluginFactory for use by other interfaces. More...
 
class  IOptimizationProfile
 Optimization profile for dynamic input dimensions and shape tensors. More...
 
class  IPaddingLayer
 Layer that represents a padding operation. More...
 
class  IParametricReLULayer
 Layer that represents a parametric ReLU operation. More...
 
class  IPluginCreator
 Plugin creator class for user implemented layers. More...
 
class  IPluginRegistry
 Single registration point for all plugins in an application. It is used to find plugin implementations during engine deserialization. Internally, the plugin registry is considered to be a singleton so all plugins in an application are part of the same global registry. Note that the plugin registry is only supported for plugins of type IPluginV2 and should also have a corresponding IPluginCreator implementation. More...
 
class  IPluginV2
 Plugin class for user-implemented layers. More...
 
class  IPluginV2DynamicExt
 
class  IPluginV2Ext
 Plugin class for user-implemented layers. More...
 
class  IPluginV2IOExt
 Plugin class for user-implemented layers. More...
 
class  IPluginV2Layer
 Layer type for pluginV2. More...
 
class  IPoolingLayer
 A Pooling layer in a network definition. More...
 
class  IProfiler
 Application-implemented interface for profiling. More...
 
class  IQuantizeLayer
 A Quantize layer in a network definition. More...
 
class  IRaggedSoftMaxLayer
 A RaggedSoftmax layer in a network definition. More...
 
class  IRecurrenceLayer
 
class  IReduceLayer
 Layer that represents a reduction operator across Shape, Int32, Float, and Half tensors. More...
 
class  IRefitter
 Updates weights in an engine. More...
 
class  IResizeLayer
 A resize layer in a network definition. More...
 
class  IRNNv2Layer
 An RNN layer in a network definition, version 2. More...
 
class  IRuntime
 Allows a serialized functionally unsafe engine to be deserialized. More...
 
class  IScaleLayer
 A Scale layer in a network definition. More...
 
class  ISelectLayer
 
class  IShapeLayer
 Layer type for getting shape of a tensor. More...
 
class  IShuffleLayer
 Layer type for shuffling data. More...
 
class  ISliceLayer
 Slices an input tensor into an output tensor based on the offset and strides. More...
 
class  ISoftMaxLayer
 A Softmax layer in a network definition. More...
 
class  ITensor
 A tensor in a network definition. More...
 
class  ITimingCache
 Class to handle tactic timing info collected from builder. More...
 
class  ITopKLayer
 Layer that represents a TopK reduction. More...
 
class  ITripLimitLayer
 
class  IUnaryLayer
 Layer that represents an unary operation. More...
 
struct  Permutation
 
class  PluginField
 Structure containing plugin attribute field names and associated data This information can be parsed to decode necessary plugin metadata. More...
 
struct  PluginFieldCollection
 Plugin field collection struct. More...
 
class  PluginRegistrar
 Register the plugin creator to the registry The static registry object will be instantiated when the plugin library is loaded. This static object will register all creators available in the library to the registry. More...
 
struct  PluginTensorDesc
 Fields that a plugin might see for an input or output. More...
 
class  Weights
 An array of weights used as a layer parameter. More...
 

Typedefs

using TensorFormats = uint32_t
 It is capable of representing one or more TensorFormat by binary OR operations, e.g., 1U << TensorFormat::kCHW4 | 1U << TensorFormat::kCHW32. More...
 
using QuantizationFlags = uint32_t
 Represents one or more QuantizationFlag values using binary OR operations. More...
 
using BuilderFlags = uint32_t
 Represents one or more QuantizationFlag values using binary OR operations, e.g., 1U << BuilderFlag::kFP16 | 1U << BuilderFlag::kDEBUG. More...
 
using NetworkDefinitionCreationFlags = uint32_t
 Represents one or more NetworkDefinitionCreationFlag flags using binary OR operations. e.g., 1U << NetworkDefinitionCreationFlag::kEXPLICIT_BATCH. More...
 
using TacticSources = int32_t uint32_t
 Represents a collection of one or more TacticSource values combine using bitwise-OR operations. More...
 
using char_t = char
 char_t is the type used by TensorRT to represent all valid characters.
 
using AsciiChar = char_t
 AsciiChar is the type used by TensorRT to represent valid ASCII characters.
 
using Dims = Dims32
 
using PluginFormat = TensorFormat
 PluginFormat is reserved for backward compatibility. More...
 
using AllocatorFlags = uint32_t
 

Enumerations

enum  LayerType : int32_t {
  LayerType::kCONVOLUTION = 0, LayerType::kFULLY_CONNECTED = 1, LayerType::kACTIVATION = 2, LayerType::kPOOLING = 3,
  LayerType::kLRN = 4, LayerType::kSCALE = 5, LayerType::kSOFTMAX = 6, LayerType::kDECONVOLUTION = 7,
  LayerType::kCONCATENATION = 8, LayerType::kELEMENTWISE = 9, LayerType::kPLUGIN = 10, LayerType::kUNARY = 11,
  LayerType::kPADDING = 12, LayerType::kSHUFFLE = 13, LayerType::kREDUCE = 14, LayerType::kTOPK = 15,
  LayerType::kGATHER = 16, LayerType::kMATRIX_MULTIPLY = 17, LayerType::kRAGGED_SOFTMAX = 18, LayerType::kCONSTANT = 19,
  LayerType::kRNN_V2 = 20, LayerType::kIDENTITY = 21, LayerType::kPLUGIN_V2 = 22, LayerType::kSLICE = 23,
  LayerType::kSHAPE = 24, LayerType::kPARAMETRIC_RELU = 25, LayerType::kRESIZE = 26, LayerType::kTRIP_LIMIT = 27,
  LayerType::kRECURRENCE = 28, LayerType::kITERATOR = 29, LayerType::kLOOP_OUTPUT = 30, LayerType::kSELECT = 31,
  LayerType::kFILL = 32, LayerType::kQUANTIZE = 33, LayerType::kDEQUANTIZE = 34
}
 The type values of layer classes. More...
 
enum  ActivationType : int32_t {
  ActivationType::kRELU = 0, ActivationType::kSIGMOID = 1, ActivationType::kTANH = 2, ActivationType::kLEAKY_RELU = 3,
  ActivationType::kELU = 4, ActivationType::kSELU = 5, ActivationType::kSOFTSIGN = 6, ActivationType::kSOFTPLUS = 7,
  ActivationType::kCLIP = 8, ActivationType::kHARD_SIGMOID = 9, ActivationType::kSCALED_TANH = 10, ActivationType::kTHRESHOLDED_RELU = 11
}
 Enumerates the types of activation to perform in an activation layer. More...
 
enum  PaddingMode : int32_t {
  PaddingMode::kEXPLICIT_ROUND_DOWN = 0, PaddingMode::kEXPLICIT_ROUND_UP = 1, PaddingMode::kSAME_UPPER = 2, PaddingMode::kSAME_LOWER = 3,
  PaddingMode::kCAFFE_ROUND_DOWN = 4, PaddingMode::kCAFFE_ROUND_UP = 5
}
 Enumerates the modes of padding to perform in convolution, deconvolution and pooling layer, padding mode takes precedence if setPaddingMode() and setPrePadding() are also used. More...
 
enum  PoolingType : int32_t { kMAX = 0, kAVERAGE = 1, kMAX_AVERAGE_BLEND = 2 }
 The type of pooling to perform in a pooling layer.
 
enum  ScaleMode : int32_t { ScaleMode::kUNIFORM = 0, ScaleMode::kCHANNEL = 1, ScaleMode::kELEMENTWISE = 2 }
 Controls how shift, scale and power are applied in a Scale layer. More...
 
enum  ElementWiseOperation : int32_t {
  ElementWiseOperation::kSUM = 0, ElementWiseOperation::kPROD = 1, ElementWiseOperation::kMAX = 2, ElementWiseOperation::kMIN = 3,
  ElementWiseOperation::kSUB = 4, ElementWiseOperation::kDIV = 5, ElementWiseOperation::kPOW = 6, ElementWiseOperation::kFLOOR_DIV = 7,
  ElementWiseOperation::kAND = 8, ElementWiseOperation::kOR = 9, ElementWiseOperation::kXOR = 10, ElementWiseOperation::kEQUAL = 11,
  ElementWiseOperation::kGREATER = 12, ElementWiseOperation::kLESS = 13
}
 Enumerates the binary operations that may be performed by an ElementWise layer. More...
 
enum  RNNOperation : int32_t { RNNOperation::kRELU = 0, RNNOperation::kTANH = 1, RNNOperation::kLSTM = 2, RNNOperation::kGRU = 3 }
 Enumerates the RNN operations that may be performed by an RNN layer. More...
 
enum  RNNDirection : int32_t { RNNDirection::kUNIDIRECTION = 0, RNNDirection::kBIDIRECTION = 1 }
 Enumerates the RNN direction that may be performed by an RNN layer. More...
 
enum  RNNInputMode : int32_t { RNNInputMode::kLINEAR = 0, RNNInputMode::kSKIP = 1 }
 Enumerates the RNN input modes that may occur with an RNN layer. More...
 
enum  RNNGateType : int32_t {
  RNNGateType::kINPUT = 0, RNNGateType::kOUTPUT = 1, RNNGateType::kFORGET = 2, RNNGateType::kUPDATE = 3,
  RNNGateType::kRESET = 4, RNNGateType::kCELL = 5, RNNGateType::kHIDDEN = 6
}
 Identifies an individual gate within an RNN cell. More...
 
enum  UnaryOperation : int32_t {
  UnaryOperation::kEXP = 0, UnaryOperation::kLOG = 1, UnaryOperation::kSQRT = 2, UnaryOperation::kRECIP = 3,
  UnaryOperation::kABS = 4, UnaryOperation::kNEG = 5, UnaryOperation::kSIN = 6, UnaryOperation::kCOS = 7,
  UnaryOperation::kTAN = 8, UnaryOperation::kSINH = 9, UnaryOperation::kCOSH = 10, UnaryOperation::kASIN = 11,
  UnaryOperation::kACOS = 12, UnaryOperation::kATAN = 13, UnaryOperation::kASINH = 14, UnaryOperation::kACOSH = 15,
  UnaryOperation::kATANH = 16, UnaryOperation::kCEIL = 17, UnaryOperation::kFLOOR = 18, UnaryOperation::kERF = 19,
  UnaryOperation::kNOT = 20
}
 Enumerates the unary operations that may be performed by a Unary layer. More...
 
enum  ReduceOperation : int32_t {
  kSUM = 0, kPROD = 1, kMAX = 2, kMIN = 3,
  kAVG = 4
}
 Enumerates the reduce operations that may be performed by a Reduce layer. More...
 
enum  SliceMode : int32_t { SliceMode::kDEFAULT = 0, SliceMode::kWRAP = 1 }
 Controls how ISliceLayer handles out of bounds coordinates. More...
 
enum  TopKOperation : int32_t { TopKOperation::kMAX = 0, TopKOperation::kMIN = 1 }
 Enumerates the operations that may be performed by a TopK layer. More...
 
enum  MatrixOperation : int32_t { MatrixOperation::kNONE, MatrixOperation::kTRANSPOSE, MatrixOperation::kVECTOR }
 Enumerates the operations that may be performed on a tensor by IMatrixMultiplyLayer before multiplication. More...
 
enum  ResizeMode : int32_t { ResizeMode::kNEAREST = 0, ResizeMode::kLINEAR = 1 }
 Enumerates various modes of resize in the resize layer. Resize mode set using setResizeMode(). More...
 
enum  ResizeCoordinateTransformation : int32_t { ResizeCoordinateTransformation::kALIGN_CORNERS = 0, ResizeCoordinateTransformation::kASYMMETRIC = 1, ResizeCoordinateTransformation::kHALF_PIXEL = 2 }
 The resize coordinate transformation function. More...
 
enum  ResizeSelector : int32_t { ResizeSelector::kFORMULA = 0, ResizeSelector::kUPPER = 1 }
 The coordinate selector when resize to single pixel output. More...
 
enum  ResizeRoundMode : int32_t { ResizeRoundMode::kHALF_UP = 0, ResizeRoundMode::kHALF_DOWN = 1, ResizeRoundMode::kFLOOR = 2, ResizeRoundMode::kCEIL = 3 }
 The rounding mode for nearest neighbor resize. More...
 
enum  LoopOutput : int32_t { LoopOutput::kLAST_VALUE = 0, LoopOutput::kCONCATENATE = 1, LoopOutput::kREVERSE = 2 }
 Enum that describes kinds of loop outputs. More...
 
enum  TripLimit : int32_t { TripLimit::kCOUNT = 0, TripLimit::kWHILE = 1 }
 Enum that describes kinds of trip limits. More...
 
enum  FillOperation : int32_t { FillOperation::kLINSPACE = 0, FillOperation::kRANDOM_UNIFORM = 1 }
 Enumerates the tensor fill operations that may performed by a fill layer. More...
 
enum  CalibrationAlgoType : int32_t { kLEGACY_CALIBRATION = 0, kENTROPY_CALIBRATION = 1, kENTROPY_CALIBRATION_2 = 2, kMINMAX_CALIBRATION = 3 }
 Version of calibration algorithm to use. More...
 
enum  QuantizationFlag : int32_t { QuantizationFlag::kCALIBRATE_BEFORE_FUSION = 0 }
 List of valid flags for quantizing the network to int8. More...
 
enum  BuilderFlag : int32_t {
  BuilderFlag::kFP16 = 0, BuilderFlag::kINT8 = 1, BuilderFlag::kDEBUG = 2, BuilderFlag::kGPU_FALLBACK = 3,
  BuilderFlag::kSTRICT_TYPES = 4, BuilderFlag::kREFIT = 5, BuilderFlag::kDISABLE_TIMING_CACHE = 6, BuilderFlag::kTF32 = 7,
  BuilderFlag::kSPARSE_WEIGHTS = 8, BuilderFlag::kSAFETY_SCOPE = 9
}
 List of valid modes that the builder can enable when creating an engine from a network definition. More...
 
enum  ProfilingVerbosity : int32_t { ProfilingVerbosity::kDEFAULT = 0, ProfilingVerbosity::kNONE = 1, ProfilingVerbosity::kVERBOSE = 2 }
 List of verbosity levels of layer information exposed in NVTX annotations. More...
 
enum  NetworkDefinitionCreationFlag : int32_t { NetworkDefinitionCreationFlag::kEXPLICIT_BATCH = 0, NetworkDefinitionCreationFlag::kEXPLICIT_PRECISION = 1 }
 List of immutable network properties expressed at network creation time. NetworkDefinitionCreationFlag is used with createNetworkV2 to specify immutable properties of the network. The createNetwork() function always had an implicit batch dimension being specified by the maxBatchSize builder parameter. createNetworkV2 with kDEFAULT flag mimics that behaviour. More...
 
enum  EngineCapability : int32_t {
  EngineCapability::kSTANDARD = 0, kDEFAULT = kSTANDARD, EngineCapability::kSAFETY = 1, kSAFE_GPU = kSAFETY,
  EngineCapability::kDLA_STANDALONE = 2, kSAFE_DLA = kDLA_STANDALONE
}
 List of supported engine capability flows. More...
 
enum  DimensionOperation : int32_t {
  DimensionOperation::kSUM = 0, DimensionOperation::kPROD = 1, DimensionOperation::kMAX = 2, DimensionOperation::kMIN = 3,
  DimensionOperation::kSUB = 4, DimensionOperation::kEQUAL = 5, DimensionOperation::kLESS = 6, DimensionOperation::kFLOOR_DIV = 7,
  DimensionOperation::kCEIL_DIV = 8
}
 An operation on two IDimensionExpr, which represent integer expressions used in dimension computations. More...
 
enum  TensorLocation : int32_t { TensorLocation::kDEVICE = 0, TensorLocation::kHOST = 1 }
 The location for tensor data storage, device or host. More...
 
enum  WeightsRole : int32_t {
  WeightsRole::kKERNEL = 0, WeightsRole::kBIAS = 1, WeightsRole::kSHIFT = 2, WeightsRole::kSCALE = 3,
  WeightsRole::kCONSTANT = 4, WeightsRole::kANY = 5
}
 How a layer uses particular Weights. More...
 
enum  DeviceType : int32_t { DeviceType::kGPU, DeviceType::kDLA }
 The device that this layer/network will execute on. More...
 
enum  OptProfileSelector : int32_t { OptProfileSelector::kMIN = 0, OptProfileSelector::kOPT = 1, OptProfileSelector::kMAX = 2 }
 When setting or querying optimization profile parameters (such as shape tensor inputs or dynamic dimensions), select whether we are interested in the minimum, optimum, or maximum values for these parameters. The minimum and maximum specify the permitted range that is supported at runtime, while the optimum value is used for the kernel selection. This should be the "typical" value that is expected to occur at runtime. More...
 
enum  TacticSource : int32_t { TacticSource::kCUBLAS = 0, TacticSource::kCUBLAS_LT = 1, TacticSource::kCUDNN = 2 }
 List of tactic sources for TensorRT. More...
 
enum  DataType : int32_t {
  DataType::kFLOAT = 0, DataType::kHALF = 1, DataType::kINT8 = 2, DataType::kINT32 = 3,
  DataType::kBOOL = 4
}
 The type of weights and tensors. More...
 
enum  TensorFormat : int32_t {
  TensorFormat::kLINEAR = 0, TensorFormat::kCHW2 = 1, TensorFormat::kHWC8 = 2, TensorFormat::kCHW4 = 3,
  TensorFormat::kCHW16 = 4, TensorFormat::kCHW32 = 5, TensorFormat::kDHWC8 = 6, TensorFormat::kCDHW32 = 7,
  TensorFormat::kHWC = 8, TensorFormat::kDLA_LINEAR = 9, TensorFormat::kDLA_HWC4 = 10, TensorFormat::kHWC16 = 11
}
 Format of the input/output tensors. More...
 
enum  PluginVersion : uint8_t { PluginVersion::kV2 = 0, PluginVersion::kV2_EXT = 1, PluginVersion::kV2_IOEXT = 2, PluginVersion::kV2_DYNAMICEXT = 3 }
 
enum  PluginFieldType : int32_t {
  PluginFieldType::kFLOAT16 = 0, PluginFieldType::kFLOAT32 = 1, PluginFieldType::kFLOAT64 = 2, PluginFieldType::kINT8 = 3,
  PluginFieldType::kINT16 = 4, PluginFieldType::kINT32 = 5, PluginFieldType::kCHAR = 6, PluginFieldType::kDIMS = 7,
  PluginFieldType::kUNKNOWN = 8
}
 
enum  AllocatorFlag : int32_t { AllocatorFlag::kRESIZABLE = 0 }
 
enum  ErrorCode : int32_t {
  ErrorCode::kSUCCESS = 0, ErrorCode::kUNSPECIFIED_ERROR = 1, ErrorCode::kINTERNAL_ERROR = 2, ErrorCode::kINVALID_ARGUMENT = 3,
  ErrorCode::kINVALID_CONFIG = 4, ErrorCode::kFAILED_ALLOCATION = 5, ErrorCode::kFAILED_INITIALIZATION = 6, ErrorCode::kFAILED_EXECUTION = 7,
  ErrorCode::kFAILED_COMPUTATION = 8, ErrorCode::kINVALID_STATE = 9, ErrorCode::kUNSUPPORTED_STATE = 10
}
 Error codes that can be returned by TensorRT during execution. More...
 

Functions

template<>
constexpr int32_t EnumMax< LayerType > () noexcept
 Maximum number of elements in LayerType enum. More...
 
template<>
constexpr int32_t EnumMax< ScaleMode > () noexcept
 Maximum number of elements in ScaleMode enum. More...
 
template<>
constexpr int32_t EnumMax< RNNOperation > () noexcept
 Maximum number of elements in RNNOperation enum. More...
 
template<>
constexpr int32_t EnumMax< RNNDirection > () noexcept
 Maximum number of elements in RNNDirection enum. More...
 
template<>
constexpr int32_t EnumMax< RNNInputMode > () noexcept
 Maximum number of elements in RNNInputMode enum. More...
 
template<>
constexpr int32_t EnumMax< RNNGateType > () noexcept
 Maximum number of elements in RNNGateType enum. More...
 
template<>
constexpr int32_t EnumMax< UnaryOperation > () noexcept
 Maximum number of elements in UnaryOperation enum. More...
 
template<>
constexpr int32_t EnumMax< ReduceOperation > () noexcept
 Maximum number of elements in ReduceOperation enum. More...
 
template<>
constexpr int32_t EnumMax< SliceMode > () noexcept
 Maximum number of elements in SliceMode enum. More...
 
template<>
constexpr int32_t EnumMax< TopKOperation > () noexcept
 Maximum number of elements in TopKOperation enum. More...
 
template<>
constexpr int32_t EnumMax< MatrixOperation > () noexcept
 Maximum number of elements in MatrixOperation enum. More...
 
template<>
constexpr int32_t EnumMax< LoopOutput > () noexcept
 Maximum number of elements in LoopOutput enum. More...
 
template<>
constexpr int32_t EnumMax< TripLimit > () noexcept
 Maximum number of elements in TripLimit enum. More...
 
template<>
constexpr int32_t EnumMax< FillOperation > () noexcept
 Maximum number of elements in FillOperation enum. More...
 
template<>
constexpr int32_t EnumMax< CalibrationAlgoType > () noexcept
 Maximum number of elements in CalibrationAlgoType enum. More...
 
template<>
constexpr int32_t EnumMax< QuantizationFlag > () noexcept
 Maximum number of quantization flags in QuantizationFlag enum. More...
 
template<>
constexpr int32_t EnumMax< BuilderFlag > () noexcept
 Maximum number of builder flags in BuilderFlag enum. More...
 
template<>
constexpr int32_t EnumMax< ProfilingVerbosity > () noexcept
 Maximum number of profile verbosity levels in ProfilingVerbosity enum. More...
 
template<>
constexpr int32_t EnumMax< NetworkDefinitionCreationFlag > () noexcept
 Maximum number of elements in NetworkDefinitionCreationFlag enum. More...
 
template<>
constexpr int32_t EnumMax< DimensionOperation > () noexcept
 Maximum number of elements in DimensionOperation enum. More...
 
template<>
constexpr int32_t EnumMax< WeightsRole > () noexcept
 Maximum number of elements in WeightsRole enum. More...
 
template<>
constexpr int32_t EnumMax< DeviceType > () noexcept
 Maximum number of elements in DeviceType enum. More...
 
template<>
constexpr int32_t EnumMax< OptProfileSelector > () noexcept
 
template<>
constexpr int32_t EnumMax< TacticSource > () noexcept
 Maximum number of tactic sources in TacticSource enum. More...
 
template<typename T >
constexpr int32_t EnumMax () noexcept
 Maximum number of elements in an enumeration type.
 

Detailed Description

The TensorRT API version 1 namespace.

Typedef Documentation

◆ BuilderFlags

typedef uint32_t nvinfer1::BuilderFlags

Represents one or more QuantizationFlag values using binary OR operations, e.g., 1U << BuilderFlag::kFP16 | 1U << BuilderFlag::kDEBUG.

See also
IBuilderConfig::getFlags(), ITensor::setFlags(),

◆ Dims

using nvinfer1::Dims = typedef Dims32

Alias for Dims32.

Warning
: This alias might change in the future.

◆ NetworkDefinitionCreationFlags

Represents one or more NetworkDefinitionCreationFlag flags using binary OR operations. e.g., 1U << NetworkDefinitionCreationFlag::kEXPLICIT_BATCH.

See also
IBuilder::createNetworkV2

◆ PluginFormat

PluginFormat is reserved for backward compatibility.

See also
IPluginV2::supportsFormat()

◆ QuantizationFlags

typedef uint32_t nvinfer1::QuantizationFlags

Represents one or more QuantizationFlag values using binary OR operations.

See also
IBuilderConfig::getQuantizationFlags(), IBuilderConfig::setQuantizationFlags()

◆ TacticSources

typedef uint32_t nvinfer1::TacticSources
strong

Represents a collection of one or more TacticSource values combine using bitwise-OR operations.

See also
IBuilderConfig::setTacticSources(), IBuilderConfig::getTacticSources()

◆ TensorFormats

typedef uint32_t nvinfer1::TensorFormats

It is capable of representing one or more TensorFormat by binary OR operations, e.g., 1U << TensorFormat::kCHW4 | 1U << TensorFormat::kCHW32.

See also
ITensor::getAllowedFormats(), ITensor::setAllowedFormats(),

Enumeration Type Documentation

◆ ActivationType

enum nvinfer1::ActivationType : int32_t
strong

Enumerates the types of activation to perform in an activation layer.

Enumerator
kRELU 

Rectified linear activation.

kSIGMOID 

Sigmoid activation.

kTANH 

TanH activation.

kLEAKY_RELU 

LeakyRelu activation: x>=0 ? x : alpha * x.

kELU 

Elu activation: x>=0 ? x : alpha * (exp(x) - 1).

kSELU 

Selu activation: x>0 ? beta * x : beta * (alpha*exp(x) - alpha)

kSOFTSIGN 

Softsign activation: x / (1+|x|)

kSOFTPLUS 

Parametric softplus activation: alpha*log(exp(beta*x)+1)

kCLIP 

Clip activation: max(alpha, min(beta, x))

kHARD_SIGMOID 

Hard sigmoid activation: max(0, min(1, alpha*x+beta))

kSCALED_TANH 

Scaled tanh activation: alpha*tanh(beta*x)

kTHRESHOLDED_RELU 

Thresholded ReLU activation: x>alpha ? x : 0.

◆ AllocatorFlag

enum nvinfer1::AllocatorFlag : int32_t
strong
Enumerator
kRESIZABLE 

TensorRT may call realloc() on this allocation.

◆ BuilderFlag

enum nvinfer1::BuilderFlag : int32_t
strong

List of valid modes that the builder can enable when creating an engine from a network definition.

See also
IBuilderConfig::setFlag(), IBuilderConfig::getFlag()
Enumerator
kFP16 

Enable FP16 layer selection, with FP32 fallback.

kINT8 

Enable Int8 layer selection, with FP32 fallback with FP16 fallback if kFP16 also specified.

kDEBUG 

Enable debugging of layers via synchronizing after every layer.

kGPU_FALLBACK 

Enable layers marked to execute on GPU if layer cannot execute on DLA.

kSTRICT_TYPES 

Enables strict type constraints.

kREFIT 

Enable building a refittable engine.

kDISABLE_TIMING_CACHE 

Disable reuse of timing information across identical layers.

kTF32 

Allow (but not require) computations on tensors of type DataType::kFLOAT to use TF32. TF32 computes inner products by rounding the inputs to 10-bit mantissas before multiplying, but accumulates the sum using 23-bit mantissas. Enabled by default.

kSPARSE_WEIGHTS 

Allow the builder to examine weights and use optimized functions when weights have suitable sparsity.

kSAFETY_SCOPE 

Change the allowed parameters in the EngineCapability::kSTANDARD flow to match the restrictions that EngineCapability::kSAFETY check against for DeviceType::kGPU and EngineCapability::kDLA_STANDALONE check against the DeviceType::kDLA case. This flag is forced to true if EngineCapability::kSAFETY at build time if it is unset.

◆ CalibrationAlgoType

enum nvinfer1::CalibrationAlgoType : int32_t
strong

Version of calibration algorithm to use.

enum CalibrationAlgoType

◆ DataType

enum nvinfer1::DataType : int32_t
strong

The type of weights and tensors.

Enumerator
kFLOAT 

32-bit floating point format.

kHALF 

IEEE 16-bit floating-point format.

kINT8 

8-bit integer representing a quantized floating-point value.

kINT32 

Signed 32-bit integer format.

kBOOL 

8-bit boolean. 0 = false, 1 = true, other values undefined.

◆ DeviceType

enum nvinfer1::DeviceType : int32_t
strong

The device that this layer/network will execute on.

Enumerator
kGPU 

GPU Device.

kDLA 

DLA Core.

◆ DimensionOperation

enum nvinfer1::DimensionOperation : int32_t
strong

An operation on two IDimensionExpr, which represent integer expressions used in dimension computations.

For example, given two IDimensionExpr x and y and an IExprBuilder& eb, eb.operation(DimensionOperation::kSUM, x, y) creates a representation of x+y.

See also
IDimensionExpr, IExprBuilder
Enumerator
kSUM 

Sum of the two operands.

kPROD 

Product of the two operands.

kMAX 

Maximum of the two operands.

kMIN 

Minimum of the two operands.

kSUB 

Substract the second element from the first.

kEQUAL 

1 if operands are equal, 0 otherwise.

kLESS 

1 if first operand is less than second operand, 0 otherwise.

kFLOOR_DIV 

Floor division of the first element by the second.

kCEIL_DIV 

Division rounding up.

◆ ElementWiseOperation

enum nvinfer1::ElementWiseOperation : int32_t
strong

Enumerates the binary operations that may be performed by an ElementWise layer.

See also
IElementWiseLayer
Enumerator
kSUM 

Sum of the two elements.

kPROD 

Product of the two elements.

kMAX 

Maximum of the two elements.

kMIN 

Minimum of the two elements.

kSUB 

Substract the second element from the first.

kDIV 

Divide the first element by the second.

kPOW 

The first element to the power of the second element.

kFLOOR_DIV 

Floor division of the first element by the second.

kAND 

Logical AND of two elements.

kOR 

Logical OR of two elements.

kXOR 

Logical XOR of two elements.

kEQUAL 

Check if two elements are equal.

kGREATER 

Check if element in first tensor is greater than corresponding element in second tensor.

kLESS 

Check if element in first tensor is less than corresponding element in second tensor.

◆ EngineCapability

enum nvinfer1::EngineCapability : int32_t
strong

List of supported engine capability flows.

The EngineCapability determines the restrictions of a network during build time and what runtime it targets. When BuilderFlag::kSAFETY_SCOPE is not set (by default), EngineCapability::kSTANDARD does not provide any restrictions on functionality and the resulting serialized engine can be executed with TensorRT's standard runtime APIs in the nvinfer1 namespace. EngineCapability::kSAFETY provides a restricted subset of network operations that are safety certified and the resulting serialized engine can be executed with TensorRT's safe runtime APIs in the nvinfer1::safe namespace. EngineCapability::kDLA_STANDALONE provides a restricted subset of network operations that are DLA compatible and the resulting serialized engine can be executed using standalone DLA runtime APIs. See sampleNvmedia for an example of integrating NvMediaDLA APIs with TensorRT APIs.

Enumerator
kSTANDARD 

Standard: TensorRT flow without targeting the safety runtime. This flow supports both DeviceType::kGPU and DeviceType::kDLA.

kSAFETY 

Safety: TensorRT flow with restrictions targeting the safety runtime. See safety documentation for list of supported layers and formats. This flow supports only DeviceType::kGPU.

kDLA_STANDALONE 

DLA Standalone: TensorRT flow with restrictions targeting external, to TensorRT, DLA runtimes. See DLA documentation for list of supported layers and formats. This flow supports only DeviceType::kDLA.

◆ ErrorCode

enum nvinfer1::ErrorCode : int32_t
strong

Error codes that can be returned by TensorRT during execution.

the type of parser error

Enumerator
kSUCCESS 

Execution completed successfully.

kUNSPECIFIED_ERROR 

An error that does not fall into any other category. This error is included for forward compatibility.

kINTERNAL_ERROR 

A non-recoverable TensorRT error occurred. TensorRT is in an invalid internal state when this error is emitted and any further calls to TensorRT will result in undefined behavior.

kINVALID_ARGUMENT 

An argument passed to the function is invalid in isolation. This is a violation of the API contract.

kINVALID_CONFIG 

An error occurred when comparing the state of an argument relative to other arguments. For example, the dimensions for concat differ between two tensors outside of the channel dimension. This error is triggered when an argument is correct in isolation, but not relative to other arguments. This is to help to distinguish from the simple errors from the more complex errors. This is a violation of the API contract.

kFAILED_ALLOCATION 

An error occurred when performing an allocation of memory on the host or the device. A memory allocation error is normally fatal, but in the case where the application provided its own memory allocation routine, it is possible to increase the pool of available memory and resume execution.

kFAILED_INITIALIZATION 

One, or more, of the components that TensorRT relies on did not initialize correctly. This is a system setup issue.

kFAILED_EXECUTION 

An error occurred during execution that caused TensorRT to end prematurely, either an asynchronous error or other execution errors reported by CUDA/DLA. In a dynamic system, the data can be thrown away and the next frame can be processed or execution can be retried. This is either an execution error or a memory error.

kFAILED_COMPUTATION 

An error occurred during execution that caused the data to become corrupted, but execution finished. Examples of this error are NaN squashing or integer overflow. In a dynamic system, the data can be thrown away and the next frame can be processed or execution can be retried. This is either a data corruption error, an input error, or a range error. This is not used in safety but may be used in standard.

kINVALID_STATE 

TensorRT was put into a bad state by incorrect sequence of function calls. An example of an invalid state is specifying a layer to be DLA only without GPU fallback, and that layer is not supported by DLA. This can occur in situations where a service is optimistically executing networks for multiple different configurations without checking proper error configurations, and instead throwing away bad configurations caught by TensorRT. This is a violation of the API contract, but can be recoverable.

Example of a recovery: GPU fallback is disabled and conv layer with large filter(63x63) is specified to run on DLA. This will fail due to DLA not supporting the large kernel size. This can be recovered by either turning on GPU fallback or setting the layer to run on the GPU.

kUNSUPPORTED_STATE 

An error occurred due to the network not being supported on the device due to constraints of the hardware or system. An example is running a unsafe layer in a safety certified context, or a resource requirement for the current network is greater than the capabilities of the target device. The network is otherwise correct, but the network and hardware combination is problematic. This can be recoverable. Examples:

  • Scratch space requests larger than available device memory and can be recovered by increasing allowed workspace size.
  • Tensor size exceeds the maximum element count and can be recovered by reducing the maximum batch size.

◆ FillOperation

enum nvinfer1::FillOperation : int32_t
strong

Enumerates the tensor fill operations that may performed by a fill layer.

See also
IFillLayer
Enumerator
kLINSPACE 

Generate evenly spaced numbers over a specified interval.

kRANDOM_UNIFORM 

Generate a tensor with random values drawn from a uniform distribution.

◆ LayerType

enum nvinfer1::LayerType : int32_t
strong

The type values of layer classes.

See also
ILayer::getType()
Enumerator
kCONVOLUTION 

Convolution layer.

kFULLY_CONNECTED 

Fully connected layer.

kACTIVATION 

Activation layer.

kPOOLING 

Pooling layer.

kLRN 

LRN layer.

kSCALE 

Scale layer.

kSOFTMAX 

SoftMax layer.

kDECONVOLUTION 

Deconvolution layer.

kCONCATENATION 

Concatenation layer.

kELEMENTWISE 

Elementwise layer.

kPLUGIN 

Plugin layer.

kUNARY 

UnaryOp operation Layer.

kPADDING 

Padding layer.

kSHUFFLE 

Shuffle layer.

kREDUCE 

Reduce layer.

kTOPK 

TopK layer.

kGATHER 

Gather layer.

kMATRIX_MULTIPLY 

Matrix multiply layer.

kRAGGED_SOFTMAX 

Ragged softmax layer.

kCONSTANT 

Constant layer.

kRNN_V2 

RNNv2 layer.

kIDENTITY 

Identity layer.

kPLUGIN_V2 

PluginV2 layer.

kSLICE 

Slice layer.

kSHAPE 

Shape layer.

kPARAMETRIC_RELU 

Parametric ReLU layer.

kRESIZE 

Resize Layer.

kTRIP_LIMIT 

Loop Trip limit layer.

kRECURRENCE 

Loop Recurrence layer.

kITERATOR 

Loop Iterator layer.

kLOOP_OUTPUT 

Loop output layer.

kSELECT 

Select layer.

kFILL 

Fill layer.

kQUANTIZE 

Quantize layer.

kDEQUANTIZE 

Dequantize layer.

◆ LoopOutput

enum nvinfer1::LoopOutput : int32_t
strong

Enum that describes kinds of loop outputs.

Enumerator
kLAST_VALUE 

Output value is value of tensor for last iteration.

kCONCATENATE 

Output value is concatenation of values of tensor for each iteration, in forward order.

kREVERSE 

Output value is concatenation of values of tensor for each iteration, in reverse order.

◆ MatrixOperation

enum nvinfer1::MatrixOperation : int32_t
strong

Enumerates the operations that may be performed on a tensor by IMatrixMultiplyLayer before multiplication.

Enumerator
kNONE 

Treat x as a matrix if it has two dimensions, or as a collection of matrices if x has more than two dimensions, where the last two dimensions are the matrix dimensions. x must have at least two dimensions.

kTRANSPOSE 

Like kNONE, but transpose the matrix dimensions.

kVECTOR 

Treat x as a vector if it has one dimension, or as a collection of vectors if x has more than one dimension. x must have at least one dimension. The first input tensor with dimensions [M,K] used with MatrixOperation::kVECTOR is equivalent to a tensor with dimensions [M, 1, K] with MatrixOperation::kNONE, i.e. is treated as M row vectors of length K. If MatrixOperation::kTRANSPOSE is specified, then the dimensions are [M, K, 1].

The second input tensor with dimensions [M,K] used with MatrixOperation::kVECTOR is equivalent to a tensor with dimensions [M, K, 1] with MatrixOperation::kNONE, i.e. is treated as M column vectors of length K. If MatrixOperation::kTRANSPOSE is specified, then the dimensions are [M, 1, K].

◆ NetworkDefinitionCreationFlag

List of immutable network properties expressed at network creation time. NetworkDefinitionCreationFlag is used with createNetworkV2 to specify immutable properties of the network. The createNetwork() function always had an implicit batch dimension being specified by the maxBatchSize builder parameter. createNetworkV2 with kDEFAULT flag mimics that behaviour.

See also
IBuilder::createNetworkV2
Enumerator
kEXPLICIT_BATCH 

Mark the network to be an explicit batch network.

Dynamic shape support requires that the kEXPLICIT_BATCH flag is set. With dynamic shapes, any of the input dimensions can vary at run-time, and there are no implicit dimensions in the network specification. This is specified by using the wildcard dimension value -1.

kEXPLICIT_PRECISION 

Setting the network to be an explicit precision network has the following implications: 1) Precision of all input tensors to the network have to be specified with ITensor::setType() function 2) Precision of all layer output tensors in the network have to be specified using ILayer::setOutputType() function 3) The builder will not quantize the weights of any layer including those running in lower precision(INT8). It will simply cast the weights into the required precision. 4) Dynamic ranges must not be provided to run the network in int8 mode. Dynamic ranges of each tensor in the explicit precision network is [-127,127]. 5) Quantizing and dequantizing activation values between higher (FP32) and lower (INT8) precision will be performed using explicit Scale layers with input/output precision set appropriately.

◆ OptProfileSelector

enum nvinfer1::OptProfileSelector : int32_t
strong

When setting or querying optimization profile parameters (such as shape tensor inputs or dynamic dimensions), select whether we are interested in the minimum, optimum, or maximum values for these parameters. The minimum and maximum specify the permitted range that is supported at runtime, while the optimum value is used for the kernel selection. This should be the "typical" value that is expected to occur at runtime.

See also
IOptimizationProfile::setDimensions(), IOptimizationProfile::setShapeValues()
Enumerator
kMIN 

This is used to set or get the minimum permitted value for dynamic dimensions etc.

kOPT 

This is used to set or get the value that is used in the optimization (kernel selection).

kMAX 

This is used to set or get the maximum permitted value for dynamic dimensions etc.

◆ PaddingMode

enum nvinfer1::PaddingMode : int32_t
strong

Enumerates the modes of padding to perform in convolution, deconvolution and pooling layer, padding mode takes precedence if setPaddingMode() and setPrePadding() are also used.

There are three padding styles, EXPLICIT, SAME, and CAFFE, with each style having two variants. The EXPLICIT and CAFFE styles determine if the final sampling location is used or not. The SAME style determine if the asymmetry in the padding is on the pre or post padding.

Shorthand:
I = dimensions of input image.
B = prePadding, before the image data. For deconvolution, prePadding is set before output.
A = postPadding, after the image data. For deconvolution, postPadding is set after output.
P = delta between input and output
S = stride
F = filter
O = output
D = dilation
M = I + B + A ; The image data plus any padding
DK = 1 + D * (F - 1)

Formulas for Convolution:

  • EXPLICIT_ROUND_DOWN:
    O = floor((M - DK) / S) + 1
  • CAFFE_ROUND_DOWN:
    O = floor((I + B * 2 - DK) / S)
  • EXPLICIT_ROUND_UP:
    O = ceil((M - DK) / S) + 1
  • CAFFE_ROUND_UP:
    O = ceil((I + B * 2 - DK) / S)
  • SAME_UPPER:
    O = ceil(I / S)
    P = floor((I - 1) / S) * S + DK - I;
    B = floor(P / 2)
    A = P - B
  • SAME_LOWER:
    O = ceil(I / S)
    P = floor((I - 1) / S) * S + DK - I;
    A = floor(P / 2)
    B = P - A

Formulas for Deconvolution:

  • EXPLICIT_ROUND_DOWN:
  • CAFFE_ROUND_DOWN:
  • EXPLICIT_ROUND_UP:
  • CAFFE_ROUND_UP:
    O = (I - 1) * S + DK - (B + A)
  • SAME_UPPER:
    O = min(I * S, (I - 1) * S + DK)
    P = max(DK - S, 0)
    B = floor(P / 2)
    A = P - B
  • SAME_LOWER:
    O = min(I * S, (I - 1) * S + DK)
    P = max(DK - S, 0)
    A = floor(P / 2)
    B = P - A

Formulas for Pooling:

  • EXPLICIT_ROUND_DOWN:
    O = floor((M - F) / S) + 1
  • EXPLICIT_ROUND_UP:
    O = ceil((M - F) / S) + 1
  • SAME_UPPER:
    O = ceil(I / S)
    P = floor((I - 1) / S) * S + F - I;
    B = floor(P / 2)
    A = P - B
  • SAME_LOWER:
    O = ceil(I / S)
    P = floor((I - 1) / S) * S + F - I;
    A = floor(P / 2)
    B = P - A
  • CAFFE_ROUND_DOWN:
    EXPLICIT_ROUND_DOWN - ((EXPLICIT_ROUND_DOWN - 1) * S >= I + B)
  • CAFFE_ROUND_UP:
    EXPLICIT_ROUND_UP - ((EXPLICIT_ROUND_UP - 1) * S >= I + B)

Pooling Example 1:

Given I = {6, 6}, B = {3, 3}, A = {2, 2}, S = {2, 2}, F = {3, 3}. What is O?
(B, A can be calculated for SAME_UPPER and SAME_LOWER mode)
  • EXPLICIT_ROUND_DOWN:
    Computation:
    M = {6, 6} + {3, 3} + {2, 2} ==> {11, 11}
    O ==> floor((M - F) / S) + 1
    ==> floor(({11, 11} - {3, 3}) / {2, 2}) + {1, 1}
    ==> floor({8, 8} / {2, 2}) + {1, 1}
    ==> {5, 5}
  • EXPLICIT_ROUND_UP:
    Computation:
    M = {6, 6} + {3, 3} + {2, 2} ==> {11, 11}
    O ==> ceil((M - F) / S) + 1
    ==> ceil(({11, 11} - {3, 3}) / {2, 2}) + {1, 1}
    ==> ceil({8, 8} / {2, 2}) + {1, 1}
    ==> {5, 5}
    The sample points are {0, 2, 4, 6, 8} in each dimension.
  • SAME_UPPER:
    Computation:
    I = {6, 6}
    S = {2, 2}
    O = ceil(I / S) = {3, 3}
    P = floor((I - 1) / S) * S + F - I
    ==> floor(({6, 6} - {1, 1}) / {2, 2}) * {2, 2} + {3, 3} - {6, 6}
    ==> {4, 4} + {3, 3} - {6, 6}
    ==> {1, 1}
    B = floor({1, 1} / {2, 2})
    ==> {0, 0}
    A = {1, 1} - {0, 0}
    ==> {1, 1}
  • SAME_LOWER:
    Computation:
    I = {6, 6}
    S = {2, 2}
    O = ceil(I / S) = {3, 3}
    P = floor((I - 1) / S) * S + F - I
    ==> {1, 1}
    A = floor({1, 1} / {2, 2})
    ==> {0, 0}
    B = {1, 1} - {0, 0}
    ==> {1, 1}
    The sample pointers are {0, 2, 4} in each dimension. SAMPLE_UPPER has {O0, O1, O2, pad} in output in each dimension. SAMPLE_LOWER has {pad, O0, O1, O2} in output in each dimension.

Pooling Example 2:

Given I = {6, 6}, B = {3, 3}, A = {3, 3}, S = {2, 2}, F = {3, 3}. What is O?
  • CAFFE_ROUND_DOWN:
    Computation:
    M = {6, 6} + {3, 3} + {3, 3} ==> {12, 12}
    EXPLICIT_ROUND_DOWN ==> floor((M - F) / S) + 1
    ==> floor(({12, 12} - {3, 3}) / {2, 2}) + {1, 1}
    ==> {5, 5}
    DIFF = (((EXPLICIT_ROUND_DOWN - 1) * S >= I + B) ? {1, 1} : {0, 0})
    ==> ({5, 5} - {1, 1}) * {2, 2} >= {6, 6} + {3, 3} ? {1, 1} : {0,0}
    ==> {0, 0}
    O ==> EXPLICIT_ROUND_DOWN - DIFF
    ==> {5, 5} - {0, 0}
    ==> {5, 5}
  • CAFFE_ROUND_UP:
    Computation:
    M = {6, 6} + {3, 3} + {3, 3} ==> {12, 12}
    EXPLICIT_ROUND_UP ==> ceil((M - F) / S) + 1
    ==> ceil(({12, 12} - {3, 3}) / {2, 2}) + {1, 1}
    ==> {6, 6}
    DIFF = (((EXPLICIT_ROUND_UP - 1) * S >= I + B) ? {1, 1} : {0, 0})
    ==> ({6, 6} - {1, 1}) * {2, 2} >= {6, 6} + {3, 3} ? {1, 1} : {0,0}
    ==> {1, 1}
    O ==> EXPLICIT_ROUND_UP - DIFF
    ==> {6, 6} - {1, 1}
    ==> {5, 5}

The sample points are {0, 2, 4, 6, 8} in each dimension.
CAFFE_ROUND_DOWN and CAFFE_ROUND_UP have two restrictions each on usage with pooling operations. This will cause getDimensions to return an empty dimension and also to reject the network at validation time.
For more information on original reference code, see https://github.com/BVLC/caffe/blob/master/src/caffe/layers/pooling_layer.cpp

  • Restriction 1:
    CAFFE_ROUND_DOWN: B >= F is an error if (B - S) < F
    CAFFE_ROUND_UP: (B + S) >= (F + 1) is an error if B < (F + 1)
  • Restriction 2:
    CAFFE_ROUND_DOWN: (B - S) >= F is an error if B >= F
    CAFFE_ROUND_UP: B >= (F + 1) is an error if (B + S) >= (F + 1)
Enumerator
kEXPLICIT_ROUND_DOWN 

Use explicit padding, rounding output size down.

kEXPLICIT_ROUND_UP 

Use explicit padding, rounding output size up.

kSAME_UPPER 

Use SAME padding, with prePadding <= postPadding.

kSAME_LOWER 

Use SAME padding, with prePadding >= postPadding.

kCAFFE_ROUND_DOWN 

Use CAFFE padding, rounding output size down, uses prePadding value.

kCAFFE_ROUND_UP 

Use CAFFE padding, rounding output size up, uses prePadding value.

◆ PluginFieldType

enum nvinfer1::PluginFieldType : int32_t
strong
Enumerator
kFLOAT16 

FP16 field type.

kFLOAT32 

FP32 field type.

kFLOAT64 

FP64 field type.

kINT8 

INT8 field type.

kINT16 

INT16 field type.

kINT32 

INT32 field type.

kCHAR 

char field type.

kDIMS 

nvinfer1::Dims field type.

kUNKNOWN 

Unknown field type.

◆ PluginVersion

enum nvinfer1::PluginVersion : uint8_t
strong
Enumerator
kV2 

IPluginV2.

kV2_EXT 

IPluginV2Ext.

kV2_IOEXT 

IPluginV2IOExt.

kV2_DYNAMICEXT 

IPluginV2DynamicExt.

◆ ProfilingVerbosity

enum nvinfer1::ProfilingVerbosity : int32_t
strong

List of verbosity levels of layer information exposed in NVTX annotations.

See also
IBuilderConfig::setProfilingVerbosity(), IBuilderConfig::getProfilingVerbosity()
Enumerator
kDEFAULT 

Register layer names in NVTX message field.

kNONE 

Turn off NVTX traces.

kVERBOSE 

Register layer names in NVTX message field and register layer detail in NVTX JSON payload field.

◆ QuantizationFlag

enum nvinfer1::QuantizationFlag : int32_t
strong

List of valid flags for quantizing the network to int8.

See also
IBuilderConfig::setQuantizationFlag(), IBuilderConfig::getQuantizationFlag()
Enumerator
kCALIBRATE_BEFORE_FUSION 

Run int8 calibration pass before layer fusion. Only valid for IInt8LegacyCalibrator and IInt8EntropyCalibrator. We always run int8 calibration pass before layer fusion for IInt8MinMaxCalibrator and IInt8EntropyCalibrator2. Disabled by default.

◆ ReduceOperation

enum nvinfer1::ReduceOperation : int32_t
strong

Enumerates the reduce operations that may be performed by a Reduce layer.

The table shows the result of reducing across an empty volume of a given type.

Operation kFLOAT and kHALF kINT32 kINT8
kSUM 0 0 0
kPROD 1 1 1
kMAX negative infinity INT_MIN -128
kMIN positive infinity INT_MAX 127
kAVG NaN 0 -128

The current version of TensorRT usually performs reduction for kINT8 via kFLOAT or kHALF. The kINT8 values show the quantized representations of the floating-point values.

◆ ResizeCoordinateTransformation

The resize coordinate transformation function.

See also
IResizeLayer::setCoordinateTransformation()
Enumerator
kALIGN_CORNERS 

We can think each value in tensor has a volume, and the coordinate is a point inside this volume. The coordinate point is drawn as star(*) in below diagram, and multiple values range has a length. Let's use x_origin as the coordinate of axis x in the input tensor, x_resized as the coordinate of axis x in the output tensor, length_origin as length of the input tensor in axis x, and length_resize as length of the output tensor in axis x.

|<-----------—length-------—>| | 0 | 1 | 2 | 3 |


x_origin = x_resized * (length_origin - 1) / (length_resize - 1)

kASYMMETRIC 

|<-----------—length------------------—>| | 0 | 1 | 2 | 3 |


x_origin = x_resized * (length_origin / length_resize)

kHALF_PIXEL 

|<-----------—length------------------—>| | 0 | 1 | 2 | 3 |


x_origin = (x_resized + 0.5) * (length_origin / length_resize) - 0.5

◆ ResizeMode

enum nvinfer1::ResizeMode : int32_t
strong

Enumerates various modes of resize in the resize layer. Resize mode set using setResizeMode().

Enumerator
kNEAREST 

ND (0 < N <= 8) nearest neighbor resizing.

kLINEAR 

Can handle linear (1D), bilinear (2D), and trilinear (3D) resizing.

◆ ResizeRoundMode

enum nvinfer1::ResizeRoundMode : int32_t
strong

The rounding mode for nearest neighbor resize.

See also
IResizeLayer::setNearestRounding()
Enumerator
kHALF_UP 

Round half up.

kHALF_DOWN 

Round half down.

kFLOOR 

Round to floor.

kCEIL 

Round to ceil.

◆ ResizeSelector

enum nvinfer1::ResizeSelector : int32_t
strong

The coordinate selector when resize to single pixel output.

See also
IResizeLayer::setSelectorForSinglePixel()
Enumerator
kFORMULA 

Use formula to map the original index.

kUPPER 

Select the upper left pixel.

◆ RNNDirection

enum nvinfer1::RNNDirection : int32_t
strong

Enumerates the RNN direction that may be performed by an RNN layer.

See also
IRNNv2Layer
Enumerator
kUNIDIRECTION 

Network iterations from first input to last input.

kBIDIRECTION 

Network iterates from first to last and vice versa and outputs concatenated.

◆ RNNGateType

enum nvinfer1::RNNGateType : int32_t
strong

Identifies an individual gate within an RNN cell.

See also
RNNOperation
Enumerator
kINPUT 

Input gate (i).

kOUTPUT 

Output gate (o).

kFORGET 

Forget gate (f).

kUPDATE 

Update gate (z).

kRESET 

Reset gate (r).

kCELL 

Cell gate (c).

kHIDDEN 

Hidden gate (h).

◆ RNNInputMode

enum nvinfer1::RNNInputMode : int32_t
strong

Enumerates the RNN input modes that may occur with an RNN layer.

If the RNN is configured with RNNInputMode::kLINEAR, then for each gate g in the first layer of the RNN, the input vector X[t] (length E) is left-multiplied by the gate's corresponding weight matrix W[g] (dimensions HxE) as usual, before being used to compute the gate output as described by RNNOperation.

If the RNN is configured with RNNInputMode::kSKIP, then this initial matrix multiplication is "skipped" and W[g] is conceptually an identity matrix. In this case, the input vector X[t] must have length H (the size of the hidden state).

See also
IRNNv2Layer
Enumerator
kLINEAR 

Perform the normal matrix multiplication in the first recurrent layer.

kSKIP 

No operation is performed on the first recurrent layer.

◆ RNNOperation

enum nvinfer1::RNNOperation : int32_t
strong

Enumerates the RNN operations that may be performed by an RNN layer.

Equation definitions

In the equations below, we use the following naming convention:

t := current time step
i := input gate
o := output gate
f := forget gate
z := update gate
r := reset gate
c := cell gate
h := hidden gate
g[t] denotes the output of gate g at timestep t, e.g.
f[t] is the output of the forget gate f.
X[t] := input tensor for timestep t
C[t] := cell state for timestep t
H[t] := hidden state for timestep t
W[g] := W (input) parameter weight matrix for gate g
R[g] := U (recurrent) parameter weight matrix for gate g
Wb[g] := W (input) parameter bias vector for gate g
Rb[g] := U (recurrent) parameter bias vector for gate g
Unless otherwise specified, all operations apply pointwise
to elements of each operand tensor.
ReLU(X) := max(X, 0)
tanh(X) := hyperbolic tangent of X
sigmoid(X) := 1 / (1 + exp(-X))
exp(X) := e^X
A.B denotes matrix multiplication of A and B.
A*B denotes pointwise multiplication of A and B.

Equations

Depending on the value of RNNOperation chosen, each sub-layer of the RNN layer will perform one of the following operations:

::kRELU
H[t] := ReLU(W[i].X[t] + R[i].H[t-1] + Wb[i] + Rb[i])
H[t] := tanh(W[i].X[t] + R[i].H[t-1] + Wb[i] + Rb[i])
i[t] := sigmoid(W[i].X[t] + R[i].H[t-1] + Wb[i] + Rb[i])
f[t] := sigmoid(W[f].X[t] + R[f].H[t-1] + Wb[f] + Rb[f])
o[t] := sigmoid(W[o].X[t] + R[o].H[t-1] + Wb[o] + Rb[o])
c[t] := tanh(W[c].X[t] + R[c].H[t-1] + Wb[c] + Rb[c])
C[t] := f[t]*C[t-1] + i[t]*c[t]
H[t] := o[t]*tanh(C[t])
z[t] := sigmoid(W[z].X[t] + R[z].H[t-1] + Wb[z] + Rb[z])
r[t] := sigmoid(W[r].X[t] + R[r].H[t-1] + Wb[r] + Rb[r])
h[t] := tanh(W[h].X[t] + r[t]*(R[h].H[t-1] + Rb[h]) + Wb[h])
H[t] := (1 - z[t])*h[t] + z[t]*H[t-1]
See also
IRNNv2Layer
Enumerator
kRELU 

Single gate RNN w/ ReLU activation function.

kTANH 

Single gate RNN w/ TANH activation function.

kLSTM 

Four-gate LSTM network w/o peephole connections.

kGRU 

Three-gate network consisting of Gated Recurrent Units.

◆ ScaleMode

enum nvinfer1::ScaleMode : int32_t
strong

Controls how shift, scale and power are applied in a Scale layer.

See also
IScaleLayer
Enumerator
kUNIFORM 

Identical coefficients across all elements of the tensor.

kCHANNEL 

Per-channel coefficients.

kELEMENTWISE 

Elementwise coefficients.

◆ SliceMode

enum nvinfer1::SliceMode : int32_t
strong

Controls how ISliceLayer handles out of bounds coordinates.

See also
ISliceLayer
Enumerator
kDEFAULT 

Fail with error when the coordinates are out of bounds. This is the default.

kWRAP 

Coordinates wrap around periodically.

◆ TacticSource

enum nvinfer1::TacticSource : int32_t
strong

List of tactic sources for TensorRT.

See also
TacticSources, IBuilderConfig::setTacticSources(), IBuilderConfig::getTacticSources()
Enumerator
kCUBLAS 

cuBLAS tactics.

Note
Disabling kCUBLAS will cause the cublas handle passed to plugins in attachToContext to be null.
kCUBLAS_LT 

cuBLAS LT tactics

kCUDNN 

cuDNN tactics

◆ TensorFormat

enum nvinfer1::TensorFormat : int32_t
strong

Format of the input/output tensors.

This enum is extended to be used by both plugins and reformat-free network I/O tensors.

See also
IPluginV2::supportsFormat(), safe::ICudaEngine::getBindingFormat()

For more information about data formats, see the topic "Data Format Description" located in the TensorRT Developer Guide.

Enumerator
kLINEAR 

Row major linear format. For a tensor with dimensions {N, C, H, W} or {numbers, channels, columns, rows}, the dimensional index corresponds to {3, 2, 1, 0} and thus the order is W minor.

For DLA usage, the tensor sizes are limited to C,H,W in the range [1,8192].

kCHW2 

Two wide channel vectorized row major format. This format is bound to FP16. It is only available for dimensions >= 3. For a tensor with dimensions {N, C, H, W}, the memory layout is equivalent to a C array with dimensions [N][(C+1)/2][H][W][2], with the tensor coordinates (n, c, h, w) mapping to array subscript [n][c/2][h][w][c%2].

kHWC8 

Eight channel format where C is padded to a multiple of 8. This format is bound to FP16. It is only available for dimensions >= 3. For a tensor with dimensions {N, C, H, W}, the memory layout is equivalent to the array with dimensions [N][H][W][(C+7)/8*8], with the tensor coordinates (n, c, h, w) mapping to array subscript [n][h][w][c].

kCHW4 

Four wide channel vectorized row major format. This format is bound to INT8 or FP16. It is only available for dimensions >= 3. For INT8, the C dimension must be a build-time constant. For a tensor with dimensions {N, C, H, W}, the memory layout is equivalent to a C array with dimensions [N][(C+3)/4][H][W][4], with the tensor coordinates (n, c, h, w) mapping to array subscript [n][c/4][h][w][c%4].

Deprecated usage:

If running on the DLA, this format can be used for acceleration with the caveat that C must be equal or lesser than 4. If used as DLA input with allowGPUFallback disable, it needs to meet line stride requirement of DLA format. Column stride in bytes should be multiple of 32.

kCHW16 

Sixteen wide channel vectorized row major format. This format is bound to FP16. It is only available for dimensions >= 3. For a tensor with dimensions {N, C, H, W}, the memory layout is equivalent to a C array with dimensions [N][(C+15)/16][H][W][16], with the tensor coordinates (n, c, h, w) mapping to array subscript [n][c/16][h][w][c%16].

For DLA usage, this format maps to the native image format for FP16, and the tensor sizes are limited to C,H,W in the range [1,8192].

kCHW32 

Thirty-two wide channel vectorized row major format. This format is only available for dimensions >= 3. For a tensor with dimensions {N, C, H, W}, the memory layout is equivalent to a C array with dimensions [N][(C+31)/32][H][W][32], with the tensor coordinates (n, c, h, w) mapping to array subscript [n][c/32][h][w][c%32].

For DLA usage, this format maps to the native image format for INT8, and the tensor sizes are limited to C,H,W in the range [1,8192].

kDHWC8 

Eight channel format where C is padded to a multiple of 8. This format is bound to FP16, and it is only available for dimensions >= 4. For a tensor with dimensions {N, C, D, H, W}, the memory layout is equivalent to an array with dimensions [N][D][H][W][(C+7)/8*8], with the tensor coordinates (n, c, d, h, w) mapping to array subscript [n][d][h][w][c].

kCDHW32 

Thirty-two wide channel vectorized row major format. This format is bound to FP16 and INT8 and is only available for dimensions >= 4. For a tensor with dimensions {N, C, D, H, W}, the memory layout is equivalent to a C array with dimensions [N][(C+31)/32][D][H][W][32], with the tensor coordinates (n, c, d, h, w) mapping to array subscript [n][c/32][d][h][w][c%32].

kHWC 

Non-vectorized channel-last format. This format is bound to FP32 and is only available for dimensions >= 3.

kDLA_LINEAR 

DLA planar format. For a tensor with dimension {N, C, H, W}, the W axis always has unit stride. The stride for stepping along the H axis is rounded up to 64 bytes.

The memory layout is equivalent to a C array with dimensions [N][C][H][roundUp(W, 64/elementSize)] where elementSize is 2 for FP16 and 1 for Int8, with the tensor coordinates (n, c, h, w) mapping to array subscript [n][c][h][w].

kDLA_HWC4 

DLA image format. For a tensor with dimension {N, C, H, W} the C axis always has unit stride. The stride for stepping along the H axis is rounded up to 32 bytes. C can only be 1, 3 or 4. If C == 1, it will map to grayscale format. If C == 3 or C == 4, it will map to color image format. And if C == 3, the stride for stepping along the W axis needs to be padded to 4 in elements.

When C is {1, 3, 4}, then C' is {1, 4, 4} respectively, the memory layout is equivalent to a C array with dimensions [N][H][roundUp(W, 32/C'/elementSize)][C'] where elementSize is 2 for FP16 and 1 for Int8. The tensor coordinates (n, c, h, w) mapping to array subscript [n][h][w][c].

kHWC16 

Sixteen channel format where C is padded to a multiple of 16. This format is bound to FP16. It is only available for dimensions >= 3. For a tensor with dimensions {N, C, H, W}, the memory layout is equivalent to the array with dimensions [N][H][W][(C+15)/16*16], with the tensor coordinates (n, c, h, w) mapping to array subscript [n][h][w][c].

◆ TensorLocation

enum nvinfer1::TensorLocation : int32_t
strong

The location for tensor data storage, device or host.

Enumerator
kDEVICE 

Data stored on device.

kHOST 

Data stored on host.

◆ TopKOperation

enum nvinfer1::TopKOperation : int32_t
strong

Enumerates the operations that may be performed by a TopK layer.

Enumerator
kMAX 

Maximum of the elements.

kMIN 

Minimum of the elements.

◆ TripLimit

enum nvinfer1::TripLimit : int32_t
strong

Enum that describes kinds of trip limits.

Enumerator
kCOUNT 

Tensor is scalar of type kINT32 that contains the trip count.

kWHILE 

Tensor is a scalar of type kBOOL. Loop terminates when value is false.

◆ UnaryOperation

enum nvinfer1::UnaryOperation : int32_t
strong

Enumerates the unary operations that may be performed by a Unary layer.

See also
IUnaryLayer
Enumerator
kEXP 

Exponentiation.

kLOG 

Log (base e).

kSQRT 

Square root.

kRECIP 

Reciprocal.

kABS 

Absolute value.

kNEG 

Negation.

kSIN 

Sine.

kCOS 

Cosine.

kTAN 

Tangent.

kSINH 

Hyperbolic sine.

kCOSH 

Hyperbolic cosine.

kASIN 

Inverse sine.

kACOS 

Inverse cosine.

kATAN 

Inverse tangent.

kASINH 

Inverse hyperbolic sine.

kACOSH 

Inverse hyperbolic cosine.

kATANH 

Inverse hyperbolic tangent.

kCEIL 

Ceiling.

kFLOOR 

Floor.

kERF 

Gauss error function.

kNOT 

Logical NOT.

◆ WeightsRole

enum nvinfer1::WeightsRole : int32_t
strong

How a layer uses particular Weights.

The power weights of an IScaleLayer are omitted. Refitting those is not supported.

Enumerator
kKERNEL 

kernel for IConvolutionLayer, IDeconvolutionLayer, or IFullyConnectedLayer

kBIAS 

bias for IConvolutionLayer, IDeconvolutionLayer, or IFullyConnectedLayer

kSHIFT 

shift part of IScaleLayer

kSCALE 

scale part of IScaleLayer

kCONSTANT 

weights for IConstantLayer

kANY 

Any other weights role.

Function Documentation

◆ EnumMax< BuilderFlag >()

template<>
constexpr int32_t nvinfer1::EnumMax< BuilderFlag > ( )
inlineconstexprnoexcept

Maximum number of builder flags in BuilderFlag enum.

See also
BuilderFlag

◆ EnumMax< CalibrationAlgoType >()

template<>
constexpr int32_t nvinfer1::EnumMax< CalibrationAlgoType > ( )
inlineconstexprnoexcept

Maximum number of elements in CalibrationAlgoType enum.

See also
DataType

◆ EnumMax< DeviceType >()

template<>
constexpr int32_t nvinfer1::EnumMax< DeviceType > ( )
inlineconstexprnoexcept

Maximum number of elements in DeviceType enum.

See also
DeviceType

◆ EnumMax< DimensionOperation >()

template<>
constexpr int32_t nvinfer1::EnumMax< DimensionOperation > ( )
inlineconstexprnoexcept

Maximum number of elements in DimensionOperation enum.

See also
DimensionOperation

◆ EnumMax< FillOperation >()

template<>
constexpr int32_t nvinfer1::EnumMax< FillOperation > ( )
inlineconstexprnoexcept

Maximum number of elements in FillOperation enum.

See also
FillOperation

◆ EnumMax< LayerType >()

template<>
constexpr int32_t nvinfer1::EnumMax< LayerType > ( )
inlineconstexprnoexcept

Maximum number of elements in LayerType enum.

See also
LayerType

◆ EnumMax< LoopOutput >()

template<>
constexpr int32_t nvinfer1::EnumMax< LoopOutput > ( )
inlineconstexprnoexcept

Maximum number of elements in LoopOutput enum.

See also
DataType

◆ EnumMax< MatrixOperation >()

template<>
constexpr int32_t nvinfer1::EnumMax< MatrixOperation > ( )
inlineconstexprnoexcept

Maximum number of elements in MatrixOperation enum.

See also
DataType

◆ EnumMax< NetworkDefinitionCreationFlag >()

template<>
constexpr int32_t nvinfer1::EnumMax< NetworkDefinitionCreationFlag > ( )
inlineconstexprnoexcept

Maximum number of elements in NetworkDefinitionCreationFlag enum.

See also
NetworkDefinitionCreationFlag

◆ EnumMax< ProfilingVerbosity >()

template<>
constexpr int32_t nvinfer1::EnumMax< ProfilingVerbosity > ( )
inlineconstexprnoexcept

Maximum number of profile verbosity levels in ProfilingVerbosity enum.

See also
ProfilingVerbosity

◆ EnumMax< QuantizationFlag >()

template<>
constexpr int32_t nvinfer1::EnumMax< QuantizationFlag > ( )
inlineconstexprnoexcept

Maximum number of quantization flags in QuantizationFlag enum.

See also
QuantizationFlag

◆ EnumMax< ReduceOperation >()

template<>
constexpr int32_t nvinfer1::EnumMax< ReduceOperation > ( )
inlineconstexprnoexcept

Maximum number of elements in ReduceOperation enum.

See also
ReduceOperation

◆ EnumMax< RNNDirection >()

template<>
constexpr int32_t nvinfer1::EnumMax< RNNDirection > ( )
inlineconstexprnoexcept

Maximum number of elements in RNNDirection enum.

See also
RNNDirection

◆ EnumMax< RNNGateType >()

template<>
constexpr int32_t nvinfer1::EnumMax< RNNGateType > ( )
inlineconstexprnoexcept

Maximum number of elements in RNNGateType enum.

See also
RNNGateType

◆ EnumMax< RNNInputMode >()

template<>
constexpr int32_t nvinfer1::EnumMax< RNNInputMode > ( )
inlineconstexprnoexcept

Maximum number of elements in RNNInputMode enum.

See also
RNNInputMode

◆ EnumMax< RNNOperation >()

template<>
constexpr int32_t nvinfer1::EnumMax< RNNOperation > ( )
inlineconstexprnoexcept

Maximum number of elements in RNNOperation enum.

See also
RNNOperation

◆ EnumMax< ScaleMode >()

template<>
constexpr int32_t nvinfer1::EnumMax< ScaleMode > ( )
inlineconstexprnoexcept

Maximum number of elements in ScaleMode enum.

See also
ScaleMode

◆ EnumMax< SliceMode >()

template<>
constexpr int32_t nvinfer1::EnumMax< SliceMode > ( )
inlineconstexprnoexcept

Maximum number of elements in SliceMode enum.

See also
SliceMode

◆ EnumMax< TacticSource >()

template<>
constexpr int32_t nvinfer1::EnumMax< TacticSource > ( )
inlineconstexprnoexcept

Maximum number of tactic sources in TacticSource enum.

See also
TacticSource

◆ EnumMax< TopKOperation >()

template<>
constexpr int32_t nvinfer1::EnumMax< TopKOperation > ( )
inlineconstexprnoexcept

Maximum number of elements in TopKOperation enum.

See also
TopKOperation

◆ EnumMax< TripLimit >()

template<>
constexpr int32_t nvinfer1::EnumMax< TripLimit > ( )
inlineconstexprnoexcept

Maximum number of elements in TripLimit enum.

See also
DataType

◆ EnumMax< UnaryOperation >()

template<>
constexpr int32_t nvinfer1::EnumMax< UnaryOperation > ( )
inlineconstexprnoexcept

Maximum number of elements in UnaryOperation enum.

See also
UnaryOperation

◆ EnumMax< WeightsRole >()

template<>
constexpr int32_t nvinfer1::EnumMax< WeightsRole > ( )
inlineconstexprnoexcept

Maximum number of elements in WeightsRole enum.

See also
WeightsRole
nvinfer1::ActivationType::kTANH
TanH activation.
nvinfer1::RNNOperation::kLSTM
Four-gate LSTM network w/o peephole connections.
nvinfer1::RNNOperation::kGRU
Three-gate network consisting of Gated Recurrent Units.