TensorRT 10.8.0
NvInferRuntime.h 文件参考
#include "NvInferImpl.h"
#include "NvInferPluginBase.h"
#include "NvInferRuntimeCommon.h"

转到此文件的源代码。

class  nvinfer1::INoCopy
 IEngineInspector 的前向声明,供其他接口使用。 更多...
 
struct  nvinfer1::impl::EnumMaxImpl< EngineCapability >
 EngineCapability 枚举中元素的最大数量。 更多...
 
class  nvinfer1::Weights
 用作层参数的权重数组。 更多...
 
class  nvinfer1::IHostMemory
 用于处理库分配的、用户可访问内存的类。 更多...
 
struct  nvinfer1::impl::EnumMaxImpl< TensorLocation >
 TensorLocation 枚举中元素的最大数量。 更多...
 
class  nvinfer1::IDimensionExpr
 IDimensionExpr 表示从常量、输入维度和二元运算构造的整数表达式。 这些表达式可以用于重写 IPluginV2DynamicExt::getOutputDimensionsIPluginV3OneBuild::getOutputShapes(),以根据输入维度定义输出维度。 更多...
 
class  nvinfer1::IExprBuilder
 用于构造 IDimensionExpr 的对象。 更多...
 
class  nvinfer1::DimsExprs
 类似于类 Dims,但维度使用表达式而不是常量。 更多...
 
struct  nvinfer1::DynamicPluginTensorDesc
 总结插件可能看到的输入或输出张量。 更多...
 
class  nvinfer1::IPluginV2DynamicExt
 类似于 IPluginV2Ext,但支持动态形状。 更多...
 
class  nvinfer1::v_1_0::IStreamReader
 
class  nvinfer1::v_1_0::IStreamReaderV2
 
class  nvinfer1::IPluginResourceContext
 插件访问 TensorRT 提供的每个上下文资源的接口。 更多...
 
class  nvinfer1::v_1_0::IPluginV3OneCore
 
class  nvinfer1::v_1_0::IPluginV3OneBuild
 
class  nvinfer1::v_1_0::IPluginV3OneRuntime
 
class  nvinfer1::v_2_0::IPluginV3OneBuild
 
class  nvinfer1::v_1_0::IProfiler
 
struct  nvinfer1::impl::EnumMaxImpl< TensorFormat >
 TensorFormat 枚举中元素的最大数量。 更多...
 
struct  nvinfer1::impl::EnumMaxImpl< AllocatorFlag >
 AllocatorFlag 枚举中元素的最大数量。 更多...
 
class  nvinfer1::ILogger
 应用程序实现的用于构建器、重拟合器和运行时的日志记录接口。 更多...
 
struct  nvinfer1::impl::EnumMaxImpl< ILogger::Severity >
 ILogger::Severity 枚举中元素的最大数量。 更多...
 
class  nvinfer1::v_1_0::IGpuAllocator
 
class  nvinfer1::IRuntime
 允许反序列化功能上不安全的引擎。 更多...
 
class  nvinfer1::IRefitter
 更新引擎中的权重。 更多...
 
class  nvinfer1::IOptimizationProfile
 用于动态输入维度和形状张量的优化配置文件。 更多...
 
class  nvinfer1::ISerializationConfig
 保存用于配置引擎以序列化二进制文件的属性。 更多...
 
class  nvinfer1::ICudaEngine
 用于在构建的网络上执行推理的引擎,具有功能上不安全的功能。 更多...
 
class  nvinfer1::v_1_0::IOutputAllocator
 
class  nvinfer1::v_1_0::IDebugListener
 
class  nvinfer1::IExecutionContext
 使用引擎执行推理的上下文,具有功能上不安全的功能。 更多...
 
class  nvinfer1::IEngineInspector
 引擎检查器,用于打印引擎或执行上下文的层信息。 更多...
 
class  nvinfer1::PluginRegistrar< T >
 将插件创建器注册到注册表。当插件库加载时,将实例化静态注册表对象。此静态对象会将库中所有可用的创建器注册到注册表。 更多...
 
class  nvinfer1::ILoggerFinder
 用于查找记录器的虚拟基类。 允许插件在需要发出日志消息时查找记录器的实例。 当插件作为版本兼容计划的一部分进行序列化时,指向此类的实例的指针将在初始化时传递给插件共享库。 有关详细信息,请参阅开发者指南中的插件章节。 更多...
 
class  nvinfer1::v_1_0::IGpuAsyncAllocator
 
class  nvinfer1::v_1_0::IPluginCreatorV3One
 

命名空间

namespace  nvinfer1
 TensorRT API 版本 1 命名空间。
 
namespace  nvinfer1::impl
 
namespace  nvinfer1::v_1_0
 前向声明 IErrorRecorder,以便在其他接口中使用。
 
namespace  nvinfer1::v_2_0
 
namespace  nvinfer1::anonymous_namespace{NvInferRuntime.h}
 

#define NV_INFER_INTERNAL_INCLUDE   1
 
#define REGISTER_TENSORRT_PLUGIN(name)    static nvinfer1::PluginRegistrar<name> pluginRegistrar##name {}
 

类型定义

using nvinfer1::IStreamReader = v_1_0::IStreamReader
 
using nvinfer1::IStreamReaderV2 = v_1_0::IStreamReaderV2
 
using nvinfer1::IPluginV3OneCore = v_1_0::IPluginV3OneCore
 
using nvinfer1::IPluginV3OneBuild = v_1_0::IPluginV3OneBuild
 
using nvinfer1::IPluginV3OneRuntime = v_1_0::IPluginV3OneRuntime
 
using nvinfer1::IPluginV3OneBuildV2 = v_2_0::IPluginV3OneBuild
 
using nvinfer1::IProfiler = v_1_0::IProfiler
 
using nvinfer1::TempfileControlFlags = uint32_t
 表示使用按位 OR 运算组合的一个或多个 TempfileControlFlag 值的集合。 更多...
 
using nvinfer1::AllocatorFlags = uint32_t
 
using nvinfer1::IGpuAllocator = v_1_0::IGpuAllocator
 
using nvinfer1::TacticSources = uint32_t
 表示使用按位 OR 运算组合的一个或多个 TacticSource 值的集合。 更多...
 
using nvinfer1::SerializationFlags = uint32_t
 表示使用二进制 OR 运算的一个或多个 SerializationFlag 值,例如,1U << SerializationFlag::kEXCLUDE_LEAN_RUNTIME更多...
 
using nvinfer1::IOutputAllocator = v_1_0::IOutputAllocator
 
using nvinfer1::IDebugListener = v_1_0::IDebugListener
 
using nvinfer1::IGpuAsyncAllocator = v_1_0::IGpuAsyncAllocator
 
using nvinfer1::IPluginCreatorV3One = v_1_0::IPluginCreatorV3One
 

枚举

enum class  nvinfer1::EngineCapability : int32_t { nvinfer1::kSTANDARD = 0 , nvinfer1::kSAFETY = 1 , nvinfer1::kDLA_STANDALONE = 2 }
 支持的引擎能力流程列表。 更多...
 
enum class  nvinfer1::DimensionOperation : int32_t {
  nvinfer1::kSUM = 0 , nvinfer1::kPROD = 1 , nvinfer1::kMAX = 2 , nvinfer1::kMIN = 3 ,
  nvinfer1::kSUB = 4 , nvinfer1::kEQUAL = 5 , nvinfer1::kLESS = 6 , nvinfer1::kFLOOR_DIV = 7 ,
  nvinfer1::kCEIL_DIV = 8
}
 对两个 IDimensionExpr 的运算,它们表示维度计算中使用的整数表达式。 更多...
 
enum class  nvinfer1::TensorLocation : int32_t { nvinfer1::kDEVICE = 0 , nvinfer1::kHOST = 1 }
 张量数据存储的位置,设备或主机。 更多...
 
enum class  nvinfer1::SeekPosition : int32_t { nvinfer1::kSET = 0 , nvinfer1::kCUR = 1 , nvinfer1::kEND = 2 }
 控制 IStreamReaderV2 的查找模式。 更多...
 
enum class  nvinfer1::WeightsRole : int32_t {
  nvinfer1::kKERNEL = 0 , nvinfer1::kBIAS = 1 , nvinfer1::kSHIFT = 2 , nvinfer1::kSCALE = 3 ,
  nvinfer1::kCONSTANT = 4 , nvinfer1::kANY = 5
}
 层如何使用特定的权重。 更多...
 
enum class  nvinfer1::DeviceType : int32_t { nvinfer1::kGPU = 0 , nvinfer1::kDLA = 1 }
 此层/网络将在其上执行的设备。 更多...
 
enum class  nvinfer1::TempfileControlFlag : int32_t { nvinfer1::kALLOW_IN_MEMORY_FILES = 0 , nvinfer1::kALLOW_TEMPORARY_FILES = 1 }
 用于控制 TensorRT 在创建可执行临时文件时的行为的标志。 更多...
 
enum class  nvinfer1::TensorFormat : int32_t {
  nvinfer1::kLINEAR = 0 , nvinfer1::kCHW2 = 1 , nvinfer1::kHWC8 = 2 , nvinfer1::kCHW4 = 3 ,
  nvinfer1::kCHW16 = 4 , nvinfer1::kCHW32 = 5 , nvinfer1::kDHWC8 = 6 , nvinfer1::kCDHW32 = 7 ,
  nvinfer1::kHWC = 8 , nvinfer1::kDLA_LINEAR = 9 , nvinfer1::kDLA_HWC4 = 10 , nvinfer1::kHWC16 = 11 ,
  nvinfer1::kDHWC = 12
}
 输入/输出张量的格式。 更多...
 
enum class  nvinfer1::AllocatorFlag : int32_t { nvinfer1::kRESIZABLE = 0 }
 允许的内存分配类型。 更多...
 
enum class  nvinfer1::OptProfileSelector : int32_t { nvinfer1::kMIN = 0 , nvinfer1::kOPT = 1 , nvinfer1::kMAX = 2 }
 当设置或查询优化配置文件参数(例如形状张量输入或动态维度)时,选择我们感兴趣的是这些参数的最小值、最佳值还是最大值。 最小值和最大值指定运行时支持的允许范围,而最佳值用于内核选择。 这应该是运行时预期发生的“典型”值。 更多...
 
enum class  nvinfer1::TacticSource : int32_t {
  nvinfer1::kCUBLAS = 0 , nvinfer1::kCUBLAS_LT = 1 , nvinfer1::kCUDNN = 2 , nvinfer1::kEDGE_MASK_CONVOLUTIONS = 3 ,
  nvinfer1::kJIT_CONVOLUTIONS = 4
}
 TensorRT 的策略来源列表。 更多...
 
enum class  nvinfer1::ProfilingVerbosity : int32_t { nvinfer1::kLAYER_NAMES_ONLY = 0 , nvinfer1::kNONE = 1 , nvinfer1::kDETAILED = 2 }
 NVTX 注释和 IEngineInspector 中公开的层信息的详细程度级别列表。 更多...
 
enum class  nvinfer1::SerializationFlag : int32_t { nvinfer1::kEXCLUDE_WEIGHTS = 0 , nvinfer1::kEXCLUDE_LEAN_RUNTIME = 1 }
 引擎在序列化字节时可以启用的有效标志列表。 更多...
 
enum class  nvinfer1::ExecutionContextAllocationStrategy : int32_t { nvinfer1::kSTATIC = 0 , nvinfer1::kON_PROFILE_CHANGE = 1 , nvinfer1::kUSER_MANAGED = 2 }
 IExecutionContext 的不同内存分配行为。 更多...
 
enum class  nvinfer1::LayerInformationFormat : int32_t { nvinfer1::kONELINE = 0 , nvinfer1::kJSON = 1 }
 IEngineInspector 打印层信息的格式。 更多...
 

函数

template<>
constexpr int32_t nvinfer1::EnumMax< DimensionOperation > () noexcept
 DimensionOperation 枚举中元素的最大数量。 更多...
 
template<>
constexpr int32_t nvinfer1::EnumMax< WeightsRole > () noexcept
 WeightsRole 枚举中元素的最大数量。 更多...
 
template<>
constexpr int32_t nvinfer1::EnumMax< DeviceType > () noexcept
 DeviceType 枚举中元素的最大数量。 更多...
 
template<>
constexpr int32_t nvinfer1::EnumMax< TempfileControlFlag > () noexcept
 TempfileControlFlag 枚举中元素的最大数量。 更多...
 
template<>
constexpr int32_t nvinfer1::EnumMax< OptProfileSelector > () noexcept
 OptProfileSelector 枚举的不同值的数量。 更多...
 
template<>
constexpr int32_t nvinfer1::EnumMax< TacticSource > () noexcept
 TacticSource 枚举中策略来源的最大数量。 更多...
 
template<>
constexpr int32_t nvinfer1::EnumMax< ProfilingVerbosity > () noexcept
 ProfilingVerbosity 枚举中配置文件详细程度级别的最大数量。 更多...
 
template<>
constexpr int32_t nvinfer1::EnumMax< SerializationFlag > () noexcept
 SerializationFlag 枚举中序列化标志的最大数量。 更多...
 
template<>
constexpr int32_t nvinfer1::EnumMax< ExecutionContextAllocationStrategy > () noexcept
 ExecutionContextAllocationStrategy 枚举中内存分配策略的最大数量。 更多...
 
template<>
constexpr int32_t nvinfer1::EnumMax< LayerInformationFormat > () noexcept
 
nvinfer1::IPluginRegistrygetPluginRegistry () noexcept
 返回插件注册表。 更多...
 
nvinfer1::ILoggergetLogger () noexcept
 返回 logger 对象。 更多...
 
IRuntime * nvinfer1::anonymous_namespace{NvInferRuntime.h}::createInferRuntime (ILogger &logger) noexcept
 创建 IRuntime 类的实例。 更多...
 
IRefitter * nvinfer1::anonymous_namespace{NvInferRuntime.h}::createInferRefitter (ICudaEngine &engine, ILogger &logger) noexcept
 创建 IRefitter 类的实例。 更多...
 
int32_t getInferLibMajorVersion () noexcept
 返回库主版本号。 更多...
 
int32_t getInferLibMinorVersion () noexcept
 返回库次版本号。 更多...
 
int32_t getInferLibPatchVersion () noexcept
 返回库补丁版本号。 更多...
 
int32_t getInferLibBuildVersion () noexcept
 返回库构建版本号。 更多...
 

详细描述

这是 TensorRT 扩展运行时库的顶层 API 文件。

宏定义文档

◆ NV_INFER_INTERNAL_INCLUDE

#define NV_INFER_INTERNAL_INCLUDE   1

◆ REGISTER_TENSORRT_PLUGIN

#define REGISTER_TENSORRT_PLUGIN (   name)     static nvinfer1::PluginRegistrar<name> pluginRegistrar##name {}

函数文档

◆ getInferLibBuildVersion()

int32_t getInferLibBuildVersion ( )
noexcept

返回库构建版本号。

◆ getInferLibMajorVersion()

int32_t getInferLibMajorVersion ( )
noexcept

返回库主版本号。

◆ getInferLibMinorVersion()

int32_t getInferLibMinorVersion ( )
noexcept

返回库次版本号。

◆ getInferLibPatchVersion()

int32_t getInferLibPatchVersion ( )
noexcept

返回库补丁版本号。

◆ getLogger()

nvinfer1::ILogger * getLogger ( )
noexcept

返回 logger 对象。

注意
全局 logger 仅供没有关联构建器、运行时或重拟合器的独立函数使用。

◆ getPluginRegistry()

nvinfer1::IPluginRegistry * getPluginRegistry ( )
noexcept

返回插件注册表。

  Copyright © 2024 NVIDIA Corporation
  隐私政策 | 管理我的隐私 | 请勿出售或分享我的数据 | 服务条款 | 辅助功能 | 公司政策 | 产品安全 | 联系我们