13#ifndef NV_INFER_RUNTIME_BASE_H
14#define NV_INFER_RUNTIME_BASE_H
19#include <cuda_runtime_api.h>
22#if __cplusplus >= 201402L
23#define TRT_DEPRECATED [[deprecated]]
25#define TRT_DEPRECATED_ENUM
27#define TRT_DEPRECATED_ENUM TRT_DEPRECATED
30#define TRT_DEPRECATED_API __declspec(dllexport)
32#define TRT_DEPRECATED_API [[deprecated]] __attribute__((visibility("default")))
37#define TRT_DEPRECATED_ENUM
38#define TRT_DEPRECATED_API __declspec(dllexport)
40#define TRT_DEPRECATED __attribute__((deprecated))
41#define TRT_DEPRECATED_ENUM
42#define TRT_DEPRECATED_API __attribute__((deprecated, visibility("default")))
47#ifdef TENSORRT_BUILD_LIB
49#define TENSORRTAPI __declspec(dllexport)
51#define TENSORRTAPI __attribute__((visibility("default")))
76#define NV_TENSORRT_VERSION nvinfer1::kNV_TENSORRT_VERSION_IMPL
85static constexpr int32_t kNV_TENSORRT_VERSION_IMPL
164 static constexpr int32_t kVALUE = 7;
340 static constexpr int32_t kVALUE = 13;
355 static constexpr int32_t kVALUE = 1;
452 virtual void*
reallocate(
void* , uint64_t , uint64_t )
noexcept
559 static constexpr int32_t kVALUE = 5;
666 static constexpr int32_t kVALUE = 11;
901 static constexpr int32_t kVALUE = 3;
#define TENSORRTAPI
Definition: NvInferRuntimeBase.h:54
int32_t getInferLibVersion() noexcept
Return the library version number.
#define TRT_DEPRECATED
Definition: NvInferRuntimeBase.h:40
#define NV_TENSORRT_MINOR
TensorRT minor version.
Definition: NvInferVersion.h:22
#define NV_TENSORRT_MAJOR
TensorRT major version.
Definition: NvInferVersion.h:21
#define NV_TENSORRT_PATCH
TensorRT patch version.
Definition: NvInferVersion.h:23
Definition: NvInferRuntimeBase.h:179
int32_t nbDims
The rank (number of dimensions).
Definition: NvInferRuntimeBase.h:184
static constexpr int32_t MAX_DIMS
The maximum rank (number of dimensions) supported for a tensor.
Definition: NvInferRuntimeBase.h:182
int32_t d[MAX_DIMS]
The extent of each dimension.
Definition: NvInferRuntimeBase.h:186
Reference counted application-implemented error reporting interface for TensorRT objects.
Definition: NvInferRuntimeBase.h:694
virtual int32_t getNbErrors() const noexcept=0
Return the number of errors.
virtual void clear() noexcept=0
Clear the error stack on the error recorder.
virtual ~IErrorRecorder() noexcept=default
char const * ErrorDesc
Definition: NvInferRuntimeBase.h:699
virtual bool hasOverflowed() const noexcept=0
Determine if the error stack has overflowed.
static constexpr size_t kMAX_DESC_LENGTH
Definition: NvInferRuntimeBase.h:704
virtual ErrorCode getErrorCode(int32_t errorIdx) const noexcept=0
Returns the ErrorCode enumeration.
int32_t RefCount
Definition: NvInferRuntimeBase.h:709
virtual RefCount decRefCount() noexcept=0
Decrements the refcount for the current ErrorRecorder.
virtual RefCount incRefCount() noexcept=0
Increments the refcount for the current ErrorRecorder.
virtual bool reportError(ErrorCode val, ErrorDesc desc) noexcept=0
Report an error to the error recorder with the corresponding enum and description.
virtual ErrorDesc getErrorDesc(int32_t errorIdx) const noexcept=0
Returns a null-terminated C-style string description of the error.
Application-implemented class for controlling allocation on the GPU.
Definition: NvInferRuntimeBase.h:367
virtual bool deallocate(void *const memory) noexcept
Definition: NvInferRuntimeBase.h:477
virtual void * reallocate(void *, uint64_t, uint64_t) noexcept
Definition: NvInferRuntimeBase.h:452
virtual ~IGpuAllocator()=default
virtual void * allocate(uint64_t const size, uint64_t const alignment, AllocatorFlags const flags) noexcept=0
virtual TRT_DEPRECATED void free(void *const memory) noexcept=0
Application-implemented logging interface for the builder, refitter and runtime.
Definition: NvInferRuntimeBase.h:505
virtual ~ILogger()=default
Severity
Definition: NvInferRuntimeBase.h:513
@ kWARNING
An application error has been discovered, but TensorRT has recovered or fallen back to a default.
@ kERROR
An application error has occurred.
@ kINFO
Informational messages with instructional information.
@ kINTERNAL_ERROR
An internal error has occurred. Execution is unrecoverable.
@ kVERBOSE
Verbose messages with debugging information.
virtual void log(Severity severity, AsciiChar const *msg) noexcept=0
The TensorRT API version 1 namespace.
ErrorCode
Error codes that can be returned by TensorRT during execution.
Definition: NvInferRuntimeBase.h:569
TensorIOMode
Definition of tensor IO Mode.
Definition: NvInferRuntimeBase.h:883
char_t AsciiChar
Definition: NvInferRuntimeBase.h:94
char char_t
char_t is the type used by TensorRT to represent all valid characters.
Definition: NvInferRuntimeBase.h:89
@ kOUTPUT
Output gate (o).
DataType
The type of weights and tensors.
Definition: NvInferRuntimeBase.h:120
@ kFLOAT
32-bit floating point format.
@ kBOOL
8-bit boolean. 0 = false, 1 = true, other values undefined.
@ kHALF
IEEE 16-bit floating-point format.
@ kINT8
Signed 8-bit integer representing a quantized floating-point value.
@ kINT32
Signed 32-bit integer format.
TensorFormat
Format of the input/output tensors.
Definition: NvInferRuntimeBase.h:209
constexpr int32_t EnumMax() noexcept
Maximum number of elements in an enumeration type.
Definition: NvInferRuntimeBase.h:110
AllocatorFlag
Definition: NvInferRuntimeBase.h:345
@ kRESIZABLE
TensorRT may call realloc() on this allocation.
uint32_t AllocatorFlags
Definition: NvInferRuntimeBase.h:359
Declaration of EnumMaxImpl struct to store maximum number of elements in an enumeration type.
Definition: NvInferRuntimeBase.h:105