Table of Contents

Class TensorRtExecutionContextReadiness

Namespace
JYPPX.TensorRtSharp
Assembly
JYPPX.TensorRtSharp.dll

Summarizes whether a TensorRT execution context has enough shape and address state for enqueue. 汇总 TensorRT execution context 是否已经具备 enqueue 所需的 shape 与地址绑定状态。

public sealed class TensorRtExecutionContextReadiness
Inheritance
TensorRtExecutionContextReadiness
Inherited Members

Constructors

TensorRtExecutionContextReadiness(bool, bool, int, int?, IReadOnlyList<TensorRtTensorBindingState>)

Creates an execution-context readiness snapshot. 创建 execution context 就绪状态快照。

public TensorRtExecutionContextReadiness(bool allInputDimensionsSpecified, bool allInputShapesSpecified, int activeOptimizationProfile, int? shapeInferenceMissingTensorCount, IReadOnlyList<TensorRtTensorBindingState> tensors)

Parameters

allInputDimensionsSpecified bool
allInputShapesSpecified bool
activeOptimizationProfile int
shapeInferenceMissingTensorCount int?
tensors IReadOnlyList<TensorRtTensorBindingState>

Properties

ActiveOptimizationProfile

Gets the currently active optimization profile index. 获取当前激活的 optimization profile 索引。

public int ActiveOptimizationProfile { get; }

Property Value

int

AllInputDimensionsSpecified

Gets whether TensorRT reports all input dimensions as specified. 获取 TensorRT 是否报告所有输入维度都已指定。

public bool AllInputDimensionsSpecified { get; }

Property Value

bool

AllInputShapesSpecified

Gets whether TensorRT reports all input shape tensors as specified. 获取 TensorRT 是否报告所有输入 shape tensor 都已指定。

public bool AllInputShapesSpecified { get; }

Property Value

bool

AllTensorAddressesBound

Gets whether every input/output tensor has a bound device address. 获取所有输入/输出 tensor 是否都已经绑定设备地址。

public bool AllTensorAddressesBound { get; }

Property Value

bool

IsReadyForEnqueue

Gets whether the snapshot indicates the context is ready for enqueue. 获取该快照是否表示 context 已经可以执行 enqueue。

public bool IsReadyForEnqueue { get; }

Property Value

bool

ShapeInferenceMissingTensorCount

Gets the missing tensor count returned by inferShapes when explicitly requested. 获取显式请求 inferShapes 时返回的缺失 tensor 数量。

public int? ShapeInferenceMissingTensorCount { get; }

Property Value

int?

Tensors

Gets the per-tensor binding state snapshots. 获取逐 tensor 的绑定状态快照。

public IReadOnlyList<TensorRtTensorBindingState> Tensors { get; }

Property Value

IReadOnlyList<TensorRtTensorBindingState>