Table of Contents

Class TensorRtTensorBindingState

Namespace
JYPPX.TensorRtSharp
Assembly
JYPPX.TensorRtSharp.dll

Describes one engine tensor's binding state inside a TensorRT execution context. 描述 TensorRT execution context 中某个 engine tensor 的绑定状态。

public sealed class TensorRtTensorBindingState
Inheritance
TensorRtTensorBindingState
Inherited Members

Constructors

TensorRtTensorBindingState(int, string, TensorRtDataType, TensorRtIOMode, TensorRtDims, TensorRtDims?, TensorRtDims?, bool, long?, string?)

Creates a tensor binding state snapshot. 创建一个 tensor 绑定状态快照。

public TensorRtTensorBindingState(int index, string name, TensorRtDataType dataType, TensorRtIOMode ioMode, TensorRtDims engineShape, TensorRtDims? contextShape, TensorRtDims? contextStrides, bool isAddressBound, long? maxOutputSizeInBytes, string? diagnostic)

Parameters

index int
name string
dataType TensorRtDataType
ioMode TensorRtIOMode
engineShape TensorRtDims
contextShape TensorRtDims
contextStrides TensorRtDims
isAddressBound bool
maxOutputSizeInBytes long?
diagnostic string

Properties

ContextShape

Gets the currently resolved execution-context shape. 获取当前 execution context 已解析的形状。

public TensorRtDims? ContextShape { get; }

Property Value

TensorRtDims

ContextStrides

Gets the currently resolved execution-context strides. 获取当前 execution context 已解析的 strides。

public TensorRtDims? ContextStrides { get; }

Property Value

TensorRtDims

DataType

Gets the TensorRT data type. 获取 TensorRT 数据类型。

public TensorRtDataType DataType { get; }

Property Value

TensorRtDataType

Diagnostic

Gets a non-fatal diagnostic collected while reading this tensor state. 获取读取该 tensor 状态时收集到的非致命诊断信息。

public string? Diagnostic { get; }

Property Value

string

EngineShape

Gets the shape recorded by the engine. 获取 engine 中记录的形状。

public TensorRtDims EngineShape { get; }

Property Value

TensorRtDims

HasUnresolvedContextDimension

Gets whether the current context shape still contains unresolved dynamic dimensions. 获取当前 context shape 是否仍包含未解析的动态维度。

public bool HasUnresolvedContextDimension { get; }

Property Value

bool

IOMode

Gets whether the tensor is an input or output tensor. 获取该 tensor 是输入还是输出。

public TensorRtIOMode IOMode { get; }

Property Value

TensorRtIOMode

Index

Gets the engine tensor index. 获取 engine tensor 索引。

public int Index { get; }

Property Value

int

IsAddressBound

Gets whether a device address is bound for this tensor. 获取该 tensor 是否已经绑定设备地址。

public bool IsAddressBound { get; }

Property Value

bool

MaxOutputSizeInBytes

Gets TensorRT's reported maximum output size in bytes when available. 获取 TensorRT 可报告时的最大输出字节数。

public long? MaxOutputSizeInBytes { get; }

Property Value

long?

Name

Gets the engine tensor name. 获取 engine tensor 名称。

public string Name { get; }

Property Value

string

RequiresAddress

Gets whether this tensor needs a device address before enqueue. 获取该 tensor 在 enqueue 前是否需要绑定设备地址。

public bool RequiresAddress { get; }

Property Value

bool