TensorRT  7.0.0.11
NvInferRuntimeCommon.h File Reference
#include <cstddef>
#include <cstdint>
#include "NvInferVersion.h"

Go to the source code of this file.

Classes

class  nvinfer1::Dims
 Structure to define the dimensions of a tensor. More...
 
struct  nvinfer1::PluginTensorDesc
 Fields that a plugin might see for an input or output. More...
 
class  nvinfer1::IPluginV2
 Plugin class for user-implemented layers. More...
 
class  nvinfer1::IPluginV2Ext
 Plugin class for user-implemented layers. More...
 
class  nvinfer1::IPluginV2IOExt
 Plugin class for user-implemented layers. More...
 
class  nvinfer1::PluginField
 Structure containing plugin attribute field names and associated data This information can be parsed to decode necessary plugin metadata. More...
 
struct  nvinfer1::PluginFieldCollection
 
class  nvinfer1::IPluginCreator
 Plugin creator class for user implemented layers. More...
 
class  nvinfer1::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  nvinfer1::IGpuAllocator
 Application-implemented class for controlling allocation on the GPU. More...
 
class  nvinfer1::ILogger
 Application-implemented logging interface for the builder, engine and runtime. More...
 
class  nvinfer1::IErrorRecorder
 Reference counted application-implemented error reporting interface for TensorRT objects. More...
 
class  nvinfer1::PluginRegistrar< T >
 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...
 

Namespaces

 nvinfer1
 The TensorRT API version 1 namespace.
 

Macros

#define _TENSORRT_FINAL
 
#define _TENSORRT_OVERRIDE
 Items that are marked as deprecated will be removed in a future release.
 
#define TRT_DEPRECATED   __attribute__((deprecated))
 
#define TRT_DEPRECATED_ENUM
 
#define TRT_DEPRECATED_API   __attribute__((deprecated, visibility("default")))
 Defines which symbols are exported.
 
#define TENSORRTAPI
 
#define TRTNOEXCEPT
 
#define REGISTER_TENSORRT_PLUGIN(name)   static nvinfer1::PluginRegistrar<name> pluginRegistrar##name {}
 

Typedefs

typedef struct CUstream_st * cudaStream_t
 Forward declaration of cudaStream_t.
 
typedef struct CUevent_st * cudaEvent_t
 Forward declaration of cudaEvent_t.
 
typedef uint32_t nvinfer1::TensorFormats
 It is capable of representing one or more TensorFormat by binary OR operations, e.g., 1U << TensorFormats::kCHW4 | 1U << TensorFormats::kCHW32. More...
 
using nvinfer1::PluginFormat = TensorFormat
 PluginFormat is reserved for backward compatibility. More...
 

Enumerations

enum  nvinfer1::ActivationType : int {
  nvinfer1::ActivationType::kRELU = 0, nvinfer1::ActivationType::kSIGMOID = 1, nvinfer1::ActivationType::kTANH = 2, nvinfer1::ActivationType::kLEAKY_RELU = 3,
  nvinfer1::ActivationType::kELU = 4, nvinfer1::ActivationType::kSELU = 5, nvinfer1::ActivationType::kSOFTSIGN = 6, nvinfer1::ActivationType::kSOFTPLUS = 7,
  nvinfer1::ActivationType::kCLIP = 8, nvinfer1::ActivationType::kHARD_SIGMOID = 9, nvinfer1::ActivationType::kSCALED_TANH = 10, nvinfer1::ActivationType::kTHRESHOLDED_RELU = 11
}
 Forward declare IGpuAllocator for use in other interfaces. More...
 
enum  nvinfer1::DataType : int {
  nvinfer1::DataType::kFLOAT = 0, nvinfer1::DataType::kHALF = 1, nvinfer1::DataType::kINT8 = 2, nvinfer1::DataType::kINT32 = 3,
  nvinfer1::DataType::kBOOL = 4
}
 The type of weights and tensors. More...
 
enum  nvinfer1::DimensionType : int { nvinfer1::DimensionType::kSPATIAL = 0, nvinfer1::DimensionType::kCHANNEL = 1, nvinfer1::DimensionType::kINDEX = 2, nvinfer1::DimensionType::kSEQUENCE = 3 }
 The type of data encoded across this dimension. More...
 
enum  nvinfer1::TensorFormat : int {
  nvinfer1::TensorFormat::kLINEAR = 0, TRT_DEPRECATED_ENUM = kLINEAR, nvinfer1::TensorFormat::kCHW2 = 1, TRT_DEPRECATED_ENUM = kCHW2,
  nvinfer1::TensorFormat::kHWC8 = 2, TRT_DEPRECATED_ENUM = kHWC8, nvinfer1::TensorFormat::kCHW4 = 3, nvinfer1::TensorFormat::kCHW16 = 4,
  nvinfer1::TensorFormat::kCHW32 = 5
}
 Format of the input/output tensors. More...
 
enum  nvinfer1::PluginVersion : uint8_t { kV2 = 0, nvinfer1::PluginVersion::kV2_EXT = 1, nvinfer1::PluginVersion::kV2_IOEXT = 2, nvinfer1::PluginVersion::kV2_DYNAMICEXT = 3 }
 
enum  nvinfer1::PluginFieldType : int {
  nvinfer1::PluginFieldType::kFLOAT16 = 0, nvinfer1::PluginFieldType::kFLOAT32 = 1, nvinfer1::PluginFieldType::kFLOAT64 = 2, nvinfer1::PluginFieldType::kINT8 = 3,
  nvinfer1::PluginFieldType::kINT16 = 4, nvinfer1::PluginFieldType::kINT32 = 5, nvinfer1::PluginFieldType::kCHAR = 6, nvinfer1::PluginFieldType::kDIMS = 7,
  kUNKNOWN = 8
}
 
enum  nvinfer1::TensorLocation : int { nvinfer1::TensorLocation::kDEVICE = 0, nvinfer1::TensorLocation::kHOST = 1 }
 The location for tensor data storage, device or host. More...
 
enum  nvinfer1::ErrorCode : int {
  nvinfer1::ErrorCode::kSUCCESS = 0, nvinfer1::ErrorCode::kUNSPECIFIED_ERROR = 1, nvinfer1::ErrorCode::kINTERNAL_ERROR = 2, nvinfer1::ErrorCode::kINVALID_ARGUMENT = 3,
  nvinfer1::ErrorCode::kINVALID_CONFIG = 4, nvinfer1::ErrorCode::kFAILED_ALLOCATION = 5, nvinfer1::ErrorCode::kFAILED_INITIALIZATION = 6, nvinfer1::ErrorCode::kFAILED_EXECUTION = 7,
  nvinfer1::ErrorCode::kFAILED_COMPUTATION = 8, nvinfer1::ErrorCode::kINVALID_STATE = 9, nvinfer1::ErrorCode::kUNSUPPORTED_STATE = 10
}
 Error codes that can be returned by TensorRT during execution. More...
 

Functions

template<typename T >
constexpr int nvinfer1::EnumMax ()
 Maximum number of elements in an enumeration type.
 
template<>
constexpr int nvinfer1::EnumMax< ActivationType > ()
 Maximum number of elements in ActivationType enum. More...
 
template<>
constexpr int nvinfer1::EnumMax< DataType > ()
 Maximum number of elements in DataType enum. More...
 
template<>
constexpr int nvinfer1::EnumMax< DimensionType > ()
 Maximum number of elements in DimensionType enum. More...
 
template<>
constexpr int nvinfer1::EnumMax< TensorFormat > ()
 Maximum number of elements in TensorFormat enum. More...
 
template<>
constexpr int nvinfer1::EnumMax< TensorLocation > ()
 Maximum number of elements in TensorLocation enum. More...
 
template<>
constexpr int nvinfer1::EnumMax< ILogger::Severity > ()
 Maximum number of elements in ILogger::Severity enum. More...
 
template<>
constexpr int nvinfer1::EnumMax< ErrorCode > ()
 Maximum number of elements in ErrorCode enum. More...
 
nvinfer1::ILoggergetLogger ()
 Return the logger object.
 
int getInferLibVersion ()
 Return the library version number. More...
 
nvinfer1::IPluginRegistrygetPluginRegistry ()
 Return the plugin registry.
 

Detailed Description

This is the top-level API file for TensorRT core runtime library.

Function Documentation

int getInferLibVersion ( )

Return the library version number.

The format is as for TENSORRT_VERSION: (TENSORRT_MAJOR * 1000) + (TENSORRT_MINOR * 100) + TENSOR_PATCH.