Table of Contents

Class TensorRtLayer

Namespace
JYPPX.TensorRtSharp
Assembly
JYPPX.TensorRtSharp.dll

Represents a managed TensorRT Tensor Rt Layer wrapper. 表示托管 TensorRT Tensor Rt Layer 包装器。

public sealed class TensorRtLayer : IDisposable
Inheritance
TensorRtLayer
Implements
Inherited Members

Properties

InputCount

Gets or sets the Input Count value. 获取或设置 Input Count 值。

public int InputCount { get; }

Property Value

int

IsPrecisionSet

Gets the Is Precision Set value. 获取 Is Precision Set 值。

public bool IsPrecisionSet { get; }

Property Value

bool

Line

Gets or sets the Line value. 获取或设置 Line 值。

public TensorRtApiLine Line { get; }

Property Value

TensorRtApiLine

Name

Gets or sets the Name value. 获取或设置 Name 值。

public string Name { get; set; }

Property Value

string

OutputCount

Gets or sets the Output Count value. 获取或设置 Output Count 值。

public int OutputCount { get; }

Property Value

int

Precision

Gets or sets the Precision value. 获取或设置 Precision 值。

public TensorRtDataType Precision { get; set; }

Property Value

TensorRtDataType

Type

Gets the Type value. 获取 Type 值。

public TensorRtLayerType Type { get; }

Property Value

TensorRtLayerType

Methods

CanPluginV2BroadcastInputAcrossBatch(int)

Queries the deprecated implicit-batch input broadcast capability available on TensorRT 8 and 10. 查询 TensorRT 8/10 提供的旧版 implicit-batch 输入广播能力。

public bool CanPluginV2BroadcastInputAcrossBatch(int inputIndex)

Parameters

inputIndex int

Returns

bool

Dispose()

Releases the native TensorRT resources held by this object. 释放此对象持有的 native TensorRT 资源。

public void Dispose()

GetActivationAlpha()

Gets the Activation Alpha value. 获取 Activation Alpha 值。

public double GetActivationAlpha()

Returns

double

GetActivationBeta()

Gets the Activation Beta value. 获取 Activation Beta 值。

public double GetActivationBeta()

Returns

double

GetActivationType()

Gets the Activation Type value. 获取 Activation Type 值。

public TensorRtActivationType GetActivationType()

Returns

TensorRtActivationType

GetAssertionMessage()

Gets the assertion message. 获取 assertion 层的断言消息。

public string GetAssertionMessage()

Returns

string

GetAttentionFromBoundary()

Gets the TensorRT 11 attention object associated with an attention input/output boundary layer. 获取与 TensorRT 11 attention 输入/输出边界层关联的 attention 对象。

public TensorRtAttention GetAttentionFromBoundary()

Returns

TensorRtAttention

A network-owned attention reference wrapper. / 返回由网络持有生命周期的 attention 引用包装器。

GetCastToType()

Gets the output data type configured for a Cast layer. 获取 Cast 层配置的输出数据类型。

public TensorRtDataType GetCastToType()

Returns

TensorRtDataType

GetConcatenationAxis()

Gets the Concatenation Axis value. 获取 Concatenation Axis 值。

public int GetConcatenationAxis()

Returns

int

GetConstantLayerDimensions()

Gets the dimensions stored on a TensorRT constant layer. 获取 TensorRT constant 层中保存的常量维度。

public TensorRtDims GetConstantLayerDimensions()

Returns

TensorRtDims

GetConstantWeightsInfo()

Gets metadata for weights stored by a TensorRT constant layer. 获取 TensorRT constant 层保存的权重元数据。

public TensorRtWeightsInfo GetConstantWeightsInfo()

Returns

TensorRtWeightsInfo

Remarks

The returned object reports data type, element count, and whether TensorRT has a native value pointer; it does not expose the native pointer. 返回对象只报告数据类型、元素数量以及 TensorRT 是否持有原生 value 指针;不会暴露原生指针。

GetConvolutionBiasWeightsInfo()

Gets metadata for the bias weights of a TensorRT convolution layer. 获取 TensorRT convolution 层 bias 权重的元数据。

public TensorRtWeightsInfo GetConvolutionBiasWeightsInfo()

Returns

TensorRtWeightsInfo

GetConvolutionDilation()

Gets the Convolution Dilation value. 获取 Convolution Dilation 值。

public TensorRtDims GetConvolutionDilation()

Returns

TensorRtDims

GetConvolutionDilation64()

Gets convolution dilation dimensions with TensorRT 11 64-bit extents. 获取 convolution dilation 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetConvolutionDilation64()

Returns

TensorRtDims64

GetConvolutionGroups()

Gets the Convolution Groups value. 获取 Convolution Groups 值。

public int GetConvolutionGroups()

Returns

int

GetConvolutionKernelWeightsInfo()

Gets metadata for the kernel weights of a TensorRT convolution layer. 获取 TensorRT convolution 层 kernel 权重的元数据。

public TensorRtWeightsInfo GetConvolutionKernelWeightsInfo()

Returns

TensorRtWeightsInfo

GetConvolutionOutputMaps()

Gets the Convolution Output Maps value. 获取 Convolution Output Maps 值。

public int GetConvolutionOutputMaps()

Returns

int

GetConvolutionPadding()

Gets the explicit N-D padding of a convolution layer. 获取 convolution 层的显式 N-D padding。

public TensorRtDims GetConvolutionPadding()

Returns

TensorRtDims

The current convolution padding dimensions. 当前 convolution padding 维度。

GetConvolutionPaddingMode()

Gets the Convolution Padding Mode value. 获取 Convolution Padding Mode 值。

public TensorRtPaddingMode GetConvolutionPaddingMode()

Returns

TensorRtPaddingMode

GetConvolutionPostPadding()

Gets the Convolution Post Padding value. 获取 Convolution Post Padding 值。

public TensorRtDims GetConvolutionPostPadding()

Returns

TensorRtDims

GetConvolutionPostPadding64()

Gets convolution post-padding dimensions with TensorRT 11 64-bit extents. 获取 convolution post-padding 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetConvolutionPostPadding64()

Returns

TensorRtDims64

GetConvolutionPrePadding()

Gets the Convolution Pre Padding value. 获取 Convolution Pre Padding 值。

public TensorRtDims GetConvolutionPrePadding()

Returns

TensorRtDims

GetConvolutionPrePadding64()

Gets convolution pre-padding dimensions with TensorRT 11 64-bit extents. 获取 convolution pre-padding 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetConvolutionPrePadding64()

Returns

TensorRtDims64

GetConvolutionStride()

Gets the Convolution Stride value. 获取 Convolution Stride 值。

public TensorRtDims GetConvolutionStride()

Returns

TensorRtDims

GetConvolutionStride64()

Gets convolution stride dimensions with TensorRT 11 64-bit extents. 获取 convolution stride 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetConvolutionStride64()

Returns

TensorRtDims64

GetCumulativeExclusive()

Gets whether the cumulative layer uses exclusive accumulation. 获取 cumulative 层是否使用 exclusive 累计。

public bool GetCumulativeExclusive()

Returns

bool

GetCumulativeOperation()

Gets the cumulative operation. 获取 cumulative 层的累计运算类型。

public TensorRtCumulativeOperation GetCumulativeOperation()

Returns

TensorRtCumulativeOperation

GetCumulativeReverse()

Gets whether the cumulative layer accumulates in reverse order. 获取 cumulative 层是否按反向顺序累计。

public bool GetCumulativeReverse()

Returns

bool

GetDeconvolutionBiasWeightsInfo()

Gets metadata for the bias weights of a TensorRT deconvolution layer. 获取 TensorRT deconvolution 层 bias 权重的元数据。

public TensorRtWeightsInfo GetDeconvolutionBiasWeightsInfo()

Returns

TensorRtWeightsInfo

GetDeconvolutionDilation()

Gets the Deconvolution Dilation value. 获取 Deconvolution Dilation 值。

public TensorRtDims GetDeconvolutionDilation()

Returns

TensorRtDims

GetDeconvolutionDilation64()

Gets deconvolution dilation dimensions with TensorRT 11 64-bit extents. 获取 deconvolution dilation 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetDeconvolutionDilation64()

Returns

TensorRtDims64

GetDeconvolutionGroups()

Gets the Deconvolution Groups value. 获取 Deconvolution Groups 值。

public int GetDeconvolutionGroups()

Returns

int

GetDeconvolutionKernelSize()

Gets the Deconvolution Kernel Size value. 获取 Deconvolution Kernel Size 值。

public TensorRtDims GetDeconvolutionKernelSize()

Returns

TensorRtDims

GetDeconvolutionKernelSize64()

Gets deconvolution kernel dimensions with TensorRT 11 64-bit extents. 获取 deconvolution kernel 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetDeconvolutionKernelSize64()

Returns

TensorRtDims64

GetDeconvolutionKernelWeightsInfo()

Gets metadata for the kernel weights of a TensorRT deconvolution layer. 获取 TensorRT deconvolution 层 kernel 权重的元数据。

public TensorRtWeightsInfo GetDeconvolutionKernelWeightsInfo()

Returns

TensorRtWeightsInfo

GetDeconvolutionOutputMaps()

Gets the Deconvolution Output Maps value. 获取 Deconvolution Output Maps 值。

public int GetDeconvolutionOutputMaps()

Returns

int

GetDeconvolutionPadding()

Gets the explicit N-D padding of a deconvolution layer. 获取 deconvolution 层的显式 N-D padding。

public TensorRtDims GetDeconvolutionPadding()

Returns

TensorRtDims

The current deconvolution padding dimensions. 当前 deconvolution padding 维度。

GetDeconvolutionPaddingMode()

Gets the Deconvolution Padding Mode value. 获取 Deconvolution Padding Mode 值。

public TensorRtPaddingMode GetDeconvolutionPaddingMode()

Returns

TensorRtPaddingMode

GetDeconvolutionPostPadding()

Gets the Deconvolution Post Padding value. 获取 Deconvolution Post Padding 值。

public TensorRtDims GetDeconvolutionPostPadding()

Returns

TensorRtDims

GetDeconvolutionPostPadding64()

Gets deconvolution post-padding dimensions with TensorRT 11 64-bit extents. 获取 deconvolution post-padding 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetDeconvolutionPostPadding64()

Returns

TensorRtDims64

GetDeconvolutionPrePadding()

Gets the Deconvolution Pre Padding value. 获取 Deconvolution Pre Padding 值。

public TensorRtDims GetDeconvolutionPrePadding()

Returns

TensorRtDims

GetDeconvolutionPrePadding64()

Gets deconvolution pre-padding dimensions with TensorRT 11 64-bit extents. 获取 deconvolution pre-padding 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetDeconvolutionPrePadding64()

Returns

TensorRtDims64

GetDeconvolutionStride()

Gets the Deconvolution Stride value. 获取 Deconvolution Stride 值。

public TensorRtDims GetDeconvolutionStride()

Returns

TensorRtDims

GetDeconvolutionStride64()

Gets deconvolution stride dimensions with TensorRT 11 64-bit extents. 获取 deconvolution stride 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetDeconvolutionStride64()

Returns

TensorRtDims64

GetDequantizeAxis()

Gets the Dequantize Axis value. 获取 Dequantize Axis 值。

public int GetDequantizeAxis()

Returns

int

GetDequantizeBlockShape()

Gets the TensorRT 11 quantization block shape configured on a dequantize layer. 获取 TensorRT 11 dequantize 层配置的量化 block shape。

public TensorRtDims GetDequantizeBlockShape()

Returns

TensorRtDims

The current block shape, or an empty dimensions value when TensorRT uses the default. 当前 block shape;当 TensorRT 使用默认值时返回空维度值。

GetDequantizeToType()

Gets the target output type of a TensorRT 11 dequantize layer. 获取 TensorRT 11 dequantize 层的目标输出类型。

public TensorRtDataType GetDequantizeToType()

Returns

TensorRtDataType

GetDynamicQuantizeAxis()

Gets the compatibility quantization axis of a TensorRT 10/11 dynamic-quantize layer. 获取 TensorRT 10 dynamic-quantize 层的量化 axis。

public int GetDynamicQuantizeAxis()

Returns

int

GetDynamicQuantizeBlockShape()

Gets the quantization block shape of a dynamic-quantize layer. 获取 dynamic-quantize 层的量化 block shape。

public TensorRtDims GetDynamicQuantizeBlockShape()

Returns

TensorRtDims

GetDynamicQuantizeBlockShape64()

Gets dynamic-quantize block shape with TensorRT 11 64-bit extents. 获取 dynamic-quantize block shape,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetDynamicQuantizeBlockShape64()

Returns

TensorRtDims64

GetDynamicQuantizeBlockSize()

Gets the compatibility block size of a TensorRT 10/11 dynamic-quantize layer. 获取 TensorRT 10 dynamic-quantize 层的 block size。

public int GetDynamicQuantizeBlockSize()

Returns

int

GetDynamicQuantizeScaleType()

Gets the scale tensor data type of a dynamic-quantize layer. 获取 dynamic-quantize 层的 scale 张量数据类型。

public TensorRtDataType GetDynamicQuantizeScaleType()

Returns

TensorRtDataType

GetDynamicQuantizeToType()

Gets the output data type of a dynamic-quantize layer. 获取 dynamic-quantize 层的输出数据类型。

public TensorRtDataType GetDynamicQuantizeToType()

Returns

TensorRtDataType

GetEinsumEquation()

Gets the equation string from a TensorRT einsum layer. 获取 TensorRT einsum 层的方程字符串。

public string GetEinsumEquation()

Returns

string

GetElementWiseOperation()

Gets the Element Wise Operation value. 获取 Element Wise Operation 值。

public TensorRtElementWiseOperation GetElementWiseOperation()

Returns

TensorRtElementWiseOperation

GetFillAlpha()

Gets the Fill Alpha value. 获取 Fill Alpha 值。

public double GetFillAlpha()

Returns

double

GetFillAlphaInt64()

Gets the int64 alpha value of a TensorRT fill layer. 获取 TensorRT fill 层的 int64 alpha 值。

public long GetFillAlphaInt64()

Returns

long

GetFillBeta()

Gets the Fill Beta value. 获取 Fill Beta 值。

public double GetFillBeta()

Returns

double

GetFillBetaInt64()

Gets the int64 beta value of a TensorRT fill layer. 获取 TensorRT fill 层的 int64 beta 值。

public long GetFillBetaInt64()

Returns

long

GetFillDimensions()

Gets the Fill Dimensions value. 获取 Fill Dimensions 值。

public TensorRtDims GetFillDimensions()

Returns

TensorRtDims

GetFillDimensions64()

Gets fill dimensions with TensorRT 11 64-bit extents. 获取 fill 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetFillDimensions64()

Returns

TensorRtDims64

GetFillOperation()

Gets the Fill Operation value. 获取 Fill Operation 值。

public TensorRtFillOperation GetFillOperation()

Returns

TensorRtFillOperation

GetFillToType()

Gets the output type of a TensorRT 11 fill layer. 获取 TensorRT 11 fill 层的输出类型。

public TensorRtDataType GetFillToType()

Returns

TensorRtDataType

GetGatherAxis()

Gets the Gather Axis value. 获取 Gather Axis 值。

public int GetGatherAxis()

Returns

int

GetGatherElementWiseDimensions()

Gets the number of elementwise dimensions used by a gather layer. 获取 gather 层使用的 elementwise 维度数量。

public int GetGatherElementWiseDimensions()

Returns

int

GetGatherMode()

Gets the TensorRT gather mode. 获取 TensorRT gather 层模式。

public TensorRtGatherMode GetGatherMode()

Returns

TensorRtGatherMode

GetGridSampleAlignCorners()

Gets whether a grid-sample layer aligns corners. 获取 grid-sample 层是否对齐角点。

public bool GetGridSampleAlignCorners()

Returns

bool

GetGridSampleInterpolationMode()

Gets the interpolation mode of a grid-sample layer. 获取 grid-sample 层的插值模式。

public TensorRtInterpolationMode GetGridSampleInterpolationMode()

Returns

TensorRtInterpolationMode

GetGridSampleMode()

Gets the out-of-bounds sample mode of a grid-sample layer. 获取 grid-sample 层的越界采样模式。

public TensorRtSampleMode GetGridSampleMode()

Returns

TensorRtSampleMode

GetIfConditionalBoundaryName()

Gets the name of the if-conditional that owns this conditional-boundary layer. 获取拥有此 conditional-boundary 层的 if-conditional 名称。

public string GetIfConditionalBoundaryName()

Returns

string

GetInput(int)

Gets the Input value. 获取 Input 值。

public TensorRtTensor GetInput(int index)

Parameters

index int

Returns

TensorRtTensor

GetInputTensorDimensionExtent64(int, int)

Gets one input tensor slot dimension extent as a 64-bit value. 以 64 位整数获取输入 tensor 槽位的单个维度 extent。

public long GetInputTensorDimensionExtent64(int index, int dimensionIndex)

Parameters

index int
dimensionIndex int

Returns

long

GetInputTensorMetadata(int)

Gets a deployment diagnostic snapshot for one TensorRT layer input tensor slot. 获取 TensorRT layer 指定输入 tensor 槽位的部署诊断快照。

public TensorRtLayerTensorMetadata GetInputTensorMetadata(int index)

Parameters

index int

The zero-based input slot index. 从零开始的输入槽位索引。

Returns

TensorRtLayerTensorMetadata

A managed metadata snapshot. 托管元数据快照。

Remarks

The returned object is a snapshot and does not expose native ITensor* pointers. 返回对象是快照,不暴露原生 ITensor* 指针。

GetInputTensorShape64(int)

Gets one input tensor slot shape using TensorRT 11 64-bit dimension extents. 使用 TensorRT 11 的 64 位维度 extent 获取输入 tensor 槽位形状。

public TensorRtDims64 GetInputTensorShape64(int index)

Parameters

index int

Returns

TensorRtDims64

GetInputTensorSummary(int)

Gets the compact native diagnostic summary for one input tensor slot. 获取指定输入 tensor 槽位的原生紧凑诊断摘要。

public string GetInputTensorSummary(int index)

Parameters

index int

The zero-based input slot index. 从零开始的输入槽位索引。

Returns

string

A compact native summary string. 原生紧凑摘要字符串。

GetIteratorAxis()

Gets the iterator axis for an iterator layer. 获取 iterator 层的迭代轴。

public int GetIteratorAxis()

Returns

int

GetIteratorReverse()

Gets whether an iterator layer iterates in reverse order. 获取 iterator 层是否按反向顺序迭代。

public bool GetIteratorReverse()

Returns

bool

GetKvCacheUpdateForm()

Gets the update form of a TensorRT 11 KV-cache update layer. 获取 TensorRT 11 KV-cache update 层的 update form。

public TensorRtAttentionIoForm GetKvCacheUpdateForm()

Returns

TensorRtAttentionIoForm

GetKvCacheUpdateMode()

Gets the cache mode of a TensorRT 11 KV-cache update layer. 获取 TensorRT 11 KV-cache update 层的 cache mode。

public TensorRtKvCacheMode GetKvCacheUpdateMode()

Returns

TensorRtKvCacheMode

GetLoopBoundaryLoopName()

Gets the name of the loop that owns this loop-boundary layer. 获取拥有此 loop-boundary 层的 loop 名称。

public string GetLoopBoundaryLoopName()

Returns

string

GetLoopOutputAxis()

Gets the loop-output concatenation axis. 获取 loop-output 的拼接轴。

public int GetLoopOutputAxis()

Returns

int

GetLoopOutputKind()

Gets the loop-output layer output kind. 获取 loop-output 层的输出类型。

public TensorRtLoopOutputKind GetLoopOutputKind()

Returns

TensorRtLoopOutputKind

GetLrnAlpha()

Gets the Lrn Alpha value. 获取 Lrn Alpha 值。

public float GetLrnAlpha()

Returns

float

GetLrnBeta()

Gets the Lrn Beta value. 获取 Lrn Beta 值。

public float GetLrnBeta()

Returns

float

GetLrnK()

Gets the Lrn K value. 获取 Lrn K 值。

public float GetLrnK()

Returns

float

GetLrnWindowSize()

Gets the Lrn Window Size value. 获取 Lrn Window Size 值。

public int GetLrnWindowSize()

Returns

int

GetMatrixMultiplyOperation(int)

Gets the Matrix Multiply Operation value. 获取 Matrix Multiply Operation 值。

public TensorRtMatrixOperation GetMatrixMultiplyOperation(int inputIndex)

Parameters

inputIndex int

Returns

TensorRtMatrixOperation

GetMetadata()

Gets TensorRT layer metadata text. 获取 TensorRT 层的 metadata 文本。

public string GetMetadata()

Returns

string

The metadata string, or an empty string when unset. / 返回 metadata 字符串;未设置时返回空字符串。

GetMoEActivationType()

Gets the activation type configured on a TensorRT 11 MoE layer. 获取 TensorRT 11 MoE 层配置的激活类型。

public TensorRtMoEActivationType GetMoEActivationType()

Returns

TensorRtMoEActivationType

GetMoEDynamicQuantizationOutputScaleType()

Gets the data type of the dynamic-quantization output scale on a TensorRT 11 MoE layer. 获取 TensorRT 11 MoE 层动态量化输出 scale 的数据类型。

public TensorRtDataType GetMoEDynamicQuantizationOutputScaleType()

Returns

TensorRtDataType

GetMoEQuantizationBlockShape()

Gets the quantization block shape used for the MoE mul output. 获取 MoE mul 输出使用的量化 block shape。

public TensorRtDims GetMoEQuantizationBlockShape()

Returns

TensorRtDims

GetMoEQuantizationToType()

Gets the quantized type used for the MoE mul output. 获取 MoE mul 输出使用的量化类型。

public TensorRtDataType GetMoEQuantizationToType()

Returns

TensorRtDataType

GetMoESwigluAlpha()

Gets the SwiGLU alpha parameter from a TensorRT 11 MoE layer. 获取 TensorRT 11 MoE 层的 SwiGLU alpha 参数。

public float GetMoESwigluAlpha()

Returns

float

GetMoESwigluBeta()

Gets the SwiGLU beta parameter from a TensorRT 11 MoE layer. 获取 TensorRT 11 MoE 层的 SwiGLU beta 参数。

public float GetMoESwigluBeta()

Returns

float

GetMoESwigluLimit()

Gets the SwiGLU limit parameter from a TensorRT 11 MoE layer. 获取 TensorRT 11 MoE 层的 SwiGLU limit 参数。

public float GetMoESwigluLimit()

Returns

float

GetNmsBoundingBoxFormat()

Gets the bounding-box format used by an NMS layer. 获取 NMS 层使用的边界框格式。

public TensorRtBoundingBoxFormat GetNmsBoundingBoxFormat()

Returns

TensorRtBoundingBoxFormat

GetNmsIndicesType()

Gets the indices output type for an NMS layer. 获取 NMS 层索引输出的数据类型。

public TensorRtDataType GetNmsIndicesType()

Returns

TensorRtDataType

GetNmsTopKBoxLimit()

Gets the NMS TopK box limit. 获取 NMS TopK 候选框数量限制。

public int GetNmsTopKBoxLimit()

Returns

int

GetNonZeroIndicesType()

Gets the indices output type for a NonZero layer. 获取 NonZero 层索引输出的数据类型。

public TensorRtDataType GetNonZeroIndicesType()

Returns

TensorRtDataType

GetNormalizationAxes()

Gets the axes bitmask of a normalization layer. 获取 normalization 层的 axes 位掩码。

public uint GetNormalizationAxes()

Returns

uint

GetNormalizationComputePrecision()

Gets the compute precision used by a TensorRT 8 or TensorRT 10 normalization layer. 获取 TensorRT 8 或 TensorRT 10 normalization 层使用的计算精度。

public TensorRtDataType GetNormalizationComputePrecision()

Returns

TensorRtDataType

The normalization compute precision data type. normalization 计算精度的数据类型。

GetNormalizationEpsilon()

Gets the epsilon value of a normalization layer. 获取 normalization 层的 epsilon 参数。

public double GetNormalizationEpsilon()

Returns

double

GetNormalizationGroupCount()

Gets the group count of a normalization layer. 获取 normalization 层的分组数量。

public long GetNormalizationGroupCount()

Returns

long

GetOneHotAxis()

Gets the axis used by a one-hot layer. 获取 one-hot 层使用的轴。

public int GetOneHotAxis()

Returns

int

GetOutput(int)

Gets the Output value. 获取 Output 值。

public TensorRtTensor GetOutput(int index)

Parameters

index int

Returns

TensorRtTensor

GetOutputTensorDimensionExtent64(int, int)

Gets one output tensor slot dimension extent as a 64-bit value. 以 64 位整数获取输出 tensor 槽位的单个维度 extent。

public long GetOutputTensorDimensionExtent64(int index, int dimensionIndex)

Parameters

index int
dimensionIndex int

Returns

long

GetOutputTensorMetadata(int)

Gets a deployment diagnostic snapshot for one TensorRT layer output tensor slot. 获取 TensorRT layer 指定输出 tensor 槽位的部署诊断快照。

public TensorRtLayerTensorMetadata GetOutputTensorMetadata(int index)

Parameters

index int

The zero-based output slot index. 从零开始的输出槽位索引。

Returns

TensorRtLayerTensorMetadata

A managed metadata snapshot. 托管元数据快照。

Remarks

Use this method when validating direct network-construction flows and checking whether layer outputs are network outputs. 在验证直接构图流程以及检查 layer 输出是否为 network output 时使用此方法。

GetOutputTensorShape64(int)

Gets one output tensor slot shape using TensorRT 11 64-bit dimension extents. 使用 TensorRT 11 的 64 位维度 extent 获取输出 tensor 槽位形状。

public TensorRtDims64 GetOutputTensorShape64(int index)

Parameters

index int

Returns

TensorRtDims64

GetOutputTensorSummary(int)

Gets the compact native diagnostic summary for one output tensor slot. 获取指定输出 tensor 槽位的原生紧凑诊断摘要。

public string GetOutputTensorSummary(int index)

Parameters

index int

The zero-based output slot index. 从零开始的输出槽位索引。

Returns

string

A compact native summary string. 原生紧凑摘要字符串。

GetOutputType(int)

Gets the Output Type value. 获取 Output Type 值。

public TensorRtDataType GetOutputType(int index)

Parameters

index int

Returns

TensorRtDataType

GetPaddingPostPadding()

Gets the Padding Post Padding value. 获取 Padding Post Padding 值。

public TensorRtDims GetPaddingPostPadding()

Returns

TensorRtDims

GetPaddingPostPadding64()

Gets padding layer post-padding dimensions with TensorRT 11 64-bit extents. 获取 padding layer post-padding 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetPaddingPostPadding64()

Returns

TensorRtDims64

GetPaddingPrePadding()

Gets the Padding Pre Padding value. 获取 Padding Pre Padding 值。

public TensorRtDims GetPaddingPrePadding()

Returns

TensorRtDims

GetPaddingPrePadding64()

Gets padding layer pre-padding dimensions with TensorRT 11 64-bit extents. 获取 padding layer pre-padding 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetPaddingPrePadding64()

Returns

TensorRtDims64

GetPluginV2DynamicFormatSupportSnapshot()

Copies IPluginV2DynamicExt decisions for the layer's currently declared types and formats. 复制 layer 当前声明类型与格式的 IPluginV2DynamicExt 结果。

public TensorRtPluginFormatSupportSnapshot GetPluginV2DynamicFormatSupportSnapshot()

Returns

TensorRtPluginFormatSupportSnapshot

GetPluginV2IoExtFormatSupportSnapshot()

Copies IPluginV2IOExt decisions for the layer's currently declared types and formats. 复制 layer 当前声明类型与格式的 IPluginV2IOExt 结果。

public TensorRtPluginFormatSupportSnapshot GetPluginV2IoExtFormatSupportSnapshot()

Returns

TensorRtPluginFormatSupportSnapshot

GetPluginV2LegacyOutputDimensions(int)

Evaluates the legacy IPluginV2::getOutputDimensions callback using dimensions copied from this layer's inputs. 使用当前 layer 输入维度副本执行旧版 IPluginV2::getOutputDimensions 查询。

public TensorRtDims GetPluginV2LegacyOutputDimensions(int outputIndex)

Parameters

outputIndex int

Returns

TensorRtDims

GetPluginV2LegacyWorkspaceSize(int)

Gets the legacy workspace-size requirement for a positive maximum batch size without exposing device memory. 获取给定正数最大 batch size 的旧版 workspace 字节数,不暴露设备内存。

public ulong GetPluginV2LegacyWorkspaceSize(int maxBatchSize)

Parameters

maxBatchSize int

Returns

ulong

GetPluginV2Metadata()

Gets copied PluginV2 identity, serialization-size, and TensorRT-version metadata for this layer. 获取当前 layer 的 PluginV2 identity、serialization size 和 TensorRT version 元数据副本。

public TensorRtPluginV2LayerMetadata GetPluginV2Metadata()

Returns

TensorRtPluginV2LayerMetadata

Copied PluginV2 metadata. 已复制的 PluginV2 元数据。

Remarks

Retrieve the layer through GetLayer(int) so the network owner lease remains alive. The raw plugin pointer never crosses the native ABI. 必须通过 GetLayer(int) 获取 layer,以保持 network owner lease; 原始 plugin 指针不会跨越 native ABI。

GetPluginV2OutputDataType(int)

Gets the output data type reported by IPluginV2Ext using types copied from this layer's inputs. 使用当前 layer 输入类型副本获取 IPluginV2Ext 报告的输出类型。

public TensorRtDataType GetPluginV2OutputDataType(int outputIndex)

Parameters

outputIndex int

Returns

TensorRtDataType

GetPluginV3BuildIoSnapshot()

Copies PluginV3 output types, optional alias indices, and current format decisions. 复制 PluginV3 输出类型、可选 alias 索引与当前格式结果。

public TensorRtPluginV3BuildIoSnapshot GetPluginV3BuildIoSnapshot()

Returns

TensorRtPluginV3BuildIoSnapshot

GetPluginV3Metadata()

Gets copied PluginV3 core, build, runtime, and versioned-interface metadata for this layer. 获取当前 layer 的 PluginV3 core、build、runtime 和 versioned-interface 元数据副本。

public TensorRtPluginV3LayerMetadata GetPluginV3Metadata()

Returns

TensorRtPluginV3LayerMetadata

Remarks

Retrieve the layer through GetLayer(int) to retain the network owner. Raw plugin and capability pointers never cross the native ABI. 必须通过 GetLayer(int) 获取 layer 以保持 network owner; 原始 plugin 与 capability 指针不会跨越 native ABI。

GetPluginV3RuntimeSerializationFields()

Copies PluginV3 runtime serialization field metadata without reading field data pointers. 复制 PluginV3 runtime 序列化字段元数据,不读取 field data 指针。

public TensorRtPluginV3SerializationFieldInventory GetPluginV3RuntimeSerializationFields()

Returns

TensorRtPluginV3SerializationFieldInventory

GetPoolingAverageCountExcludesPadding()

Gets the Pooling Average Count Excludes Padding value. 获取 Pooling Average Count Excludes Padding 值。

public bool GetPoolingAverageCountExcludesPadding()

Returns

bool

GetPoolingBlendFactor()

Gets the Pooling Blend Factor value. 获取 Pooling Blend Factor 值。

public double GetPoolingBlendFactor()

Returns

double

GetPoolingPadding()

Gets the Pooling Padding value. 获取 Pooling Padding 值。

public TensorRtDims GetPoolingPadding()

Returns

TensorRtDims

GetPoolingPadding64()

Gets pooling padding dimensions with TensorRT 11 64-bit extents. 获取 pooling padding 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetPoolingPadding64()

Returns

TensorRtDims64

GetPoolingPaddingMode()

Gets the Pooling Padding Mode value. 获取 Pooling Padding Mode 值。

public TensorRtPaddingMode GetPoolingPaddingMode()

Returns

TensorRtPaddingMode

GetPoolingPostPadding()

Gets the Pooling Post Padding value. 获取 Pooling Post Padding 值。

public TensorRtDims GetPoolingPostPadding()

Returns

TensorRtDims

GetPoolingPostPadding64()

Gets pooling post-padding dimensions with TensorRT 11 64-bit extents. 获取 pooling post-padding 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetPoolingPostPadding64()

Returns

TensorRtDims64

GetPoolingPrePadding()

Gets the Pooling Pre Padding value. 获取 Pooling Pre Padding 值。

public TensorRtDims GetPoolingPrePadding()

Returns

TensorRtDims

GetPoolingPrePadding64()

Gets pooling pre-padding dimensions with TensorRT 11 64-bit extents. 获取 pooling pre-padding 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetPoolingPrePadding64()

Returns

TensorRtDims64

GetPoolingStride()

Gets the Pooling Stride value. 获取 Pooling Stride 值。

public TensorRtDims GetPoolingStride()

Returns

TensorRtDims

GetPoolingStride64()

Gets pooling stride dimensions with TensorRT 11 64-bit extents. 获取 pooling stride 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetPoolingStride64()

Returns

TensorRtDims64

GetPoolingType()

Gets the Pooling Type value. 获取 Pooling Type 值。

public TensorRtPoolingType GetPoolingType()

Returns

TensorRtPoolingType

GetPoolingWindowSize()

Gets the Pooling Window Size value. 获取 Pooling Window Size 值。

public TensorRtDims GetPoolingWindowSize()

Returns

TensorRtDims

GetPoolingWindowSize64()

Gets pooling window dimensions with TensorRT 11 64-bit extents. 获取 pooling window 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetPoolingWindowSize64()

Returns

TensorRtDims64

GetQuantizeAxis()

Gets the Quantize Axis value. 获取 Quantize Axis 值。

public int GetQuantizeAxis()

Returns

int

GetRankCount()

Gets the multi-rank execution hint count configured on the layer. 获取层上配置的多 rank 执行提示数量。

public int GetRankCount()

Returns

int

GetReduceAxes()

Gets the Reduce Axes value. 获取 Reduce Axes 值。

public uint GetReduceAxes()

Returns

uint

GetReduceKeepDimensions()

Gets the Reduce Keep Dimensions value. 获取 Reduce Keep Dimensions 值。

public bool GetReduceKeepDimensions()

Returns

bool

GetReduceOperation()

Gets the Reduce Operation value. 获取 Reduce Operation 值。

public TensorRtReduceOperation GetReduceOperation()

Returns

TensorRtReduceOperation

GetResizeAlignCorners()

Gets the TensorRT 8 resize align-corners flag. 获取 TensorRT 8 resize 层的 align-corners 标志。

public bool GetResizeAlignCorners()

Returns

bool

true when corner alignment is enabled. 启用 corner alignment 时返回 true。

GetResizeCoordinateTransformation()

Gets the Resize Coordinate Transformation value. 获取 Resize Coordinate Transformation 值。

public TensorRtResizeCoordinateTransformation GetResizeCoordinateTransformation()

Returns

TensorRtResizeCoordinateTransformation

GetResizeCubicCoefficient()

Gets the Resize Cubic Coefficient value. 获取 Resize Cubic Coefficient 值。

public double GetResizeCubicCoefficient()

Returns

double

GetResizeExcludeOutside()

Gets the Resize Exclude Outside value. 获取 Resize Exclude Outside 值。

public bool GetResizeExcludeOutside()

Returns

bool

GetResizeMode()

Gets the Resize Mode value. 获取 Resize Mode 值。

public TensorRtResizeMode GetResizeMode()

Returns

TensorRtResizeMode

GetResizeNearestRounding()

Gets the Resize Nearest Rounding value. 获取 Resize Nearest Rounding 值。

public TensorRtResizeRoundMode GetResizeNearestRounding()

Returns

TensorRtResizeRoundMode

GetResizeOutputDimensions()

Gets the Resize Output Dimensions value. 获取 Resize Output Dimensions 值。

public TensorRtDims GetResizeOutputDimensions()

Returns

TensorRtDims

GetResizeOutputDimensions64()

Gets resize output dimensions with TensorRT 11 64-bit extents. 获取 resize output 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetResizeOutputDimensions64()

Returns

TensorRtDims64

GetResizeScales()

Gets the Resize Scales value. 获取 Resize Scales 值。

public float[] GetResizeScales()

Returns

float[]

GetResizeSelectorForSinglePixel()

Gets the Resize Selector For Single Pixel value. 获取 Resize Selector For Single Pixel 值。

public TensorRtResizeSelector GetResizeSelectorForSinglePixel()

Returns

TensorRtResizeSelector

GetReverseSequenceBatchAxis()

Gets the batch axis configured on a ReverseSequence layer. 获取 ReverseSequence 层配置的 batch 轴。

public int GetReverseSequenceBatchAxis()

Returns

int

GetReverseSequenceSequenceAxis()

Gets the sequence axis configured on a ReverseSequence layer. 获取 ReverseSequence 层配置的 sequence 轴。

public int GetReverseSequenceSequenceAxis()

Returns

int

GetRnnV2BiasForGate(int, TensorRtRnnGateType, bool)

Copies one TensorRT 8 RNNv2 gate bias vector into managed storage. 将一个 TensorRT 8 RNNv2 gate bias vector 复制到托管存储。

public TensorRtRnnV2GateWeightsSnapshot GetRnnV2BiasForGate(int layerIndex, TensorRtRnnGateType gate, bool isInputWeights)

Parameters

layerIndex int
gate TensorRtRnnGateType
isInputWeights bool

Returns

TensorRtRnnV2GateWeightsSnapshot

GetRnnV2CellState()

Gets the optional TensorRT 8 RNNv2 initial cell state. 获取可选的 TensorRT 8 RNNv2 初始 cell state。

public TensorRtTensor? GetRnnV2CellState()

Returns

TensorRtTensor

An owner-bound borrowed tensor wrapper, or null when no cell state is configured. 绑定 owner 生命周期的 borrowed tensor 包装;未配置 cell state 时返回 null。

GetRnnV2DataLength()

Gets the TensorRT 8 RNNv2 per-step input data length. 获取 TensorRT 8 RNNv2 每个时间步的输入数据长度。

public int GetRnnV2DataLength()

Returns

int

Remarks

This is a copied scalar query. It does not expose TensorRT-owned tensor or weight pointers. 这是 copied scalar 查询,不会暴露 TensorRT-owned tensor 或 weights 指针。

GetRnnV2Direction()

Gets the TensorRT 8 RNNv2 direction. 获取 TensorRT 8 RNNv2 方向。

public TensorRtRnnDirection GetRnnV2Direction()

Returns

TensorRtRnnDirection

GetRnnV2HiddenSize()

Gets the TensorRT 8 RNNv2 hidden-state size. 获取 TensorRT 8 RNNv2 hidden-state 大小。

public int GetRnnV2HiddenSize()

Returns

int

GetRnnV2HiddenState()

Gets the optional TensorRT 8 RNNv2 initial hidden state. 获取可选的 TensorRT 8 RNNv2 初始 hidden state。

public TensorRtTensor? GetRnnV2HiddenState()

Returns

TensorRtTensor

GetRnnV2InputMode()

Gets the TensorRT 8 RNNv2 input mode. 获取 TensorRT 8 RNNv2 输入模式。

public TensorRtRnnInputMode GetRnnV2InputMode()

Returns

TensorRtRnnInputMode

GetRnnV2LayerCount()

Gets the TensorRT 8 RNNv2 stacked layer count. 获取 TensorRT 8 RNNv2 堆叠层数。

public int GetRnnV2LayerCount()

Returns

int

GetRnnV2MaxSequenceLength()

Gets the TensorRT 8 RNNv2 maximum sequence length. 获取 TensorRT 8 RNNv2 最大序列长度。

public int GetRnnV2MaxSequenceLength()

Returns

int

GetRnnV2Operation()

Gets the TensorRT 8 RNNv2 operation kind. 获取 TensorRT 8 RNNv2 运算类型。

public TensorRtRnnOperation GetRnnV2Operation()

Returns

TensorRtRnnOperation

GetRnnV2SequenceLengths()

Gets the optional TensorRT 8 RNNv2 sequence-length tensor. 获取可选的 TensorRT 8 RNNv2 sequence-length tensor。

public TensorRtTensor? GetRnnV2SequenceLengths()

Returns

TensorRtTensor

GetRnnV2WeightsForGate(int, TensorRtRnnGateType, bool)

Copies one TensorRT 8 RNNv2 gate weight matrix into managed storage. 将一个 TensorRT 8 RNNv2 gate weight matrix 复制到托管存储。

public TensorRtRnnV2GateWeightsSnapshot GetRnnV2WeightsForGate(int layerIndex, TensorRtRnnGateType gate, bool isInputWeights)

Parameters

layerIndex int
gate TensorRtRnnGateType
isInputWeights bool

Returns

TensorRtRnnV2GateWeightsSnapshot

GetRotaryEmbeddingDimension()

Gets the rotary embedding dimension configured on a TensorRT 11 rotary-embedding layer. 获取 TensorRT 11 rotary-embedding 层配置的 rotary embedding 维度。

public int GetRotaryEmbeddingDimension()

Returns

int

GetRotaryEmbeddingInterleaved()

Gets whether a TensorRT 11 rotary-embedding layer uses interleaved RoPE layout. 获取 TensorRT 11 rotary-embedding 层是否使用 interleaved RoPE 布局。

public bool GetRotaryEmbeddingInterleaved()

Returns

bool

GetScaleChannelAxis()

Gets the Scale Channel Axis value. 获取 Scale Channel Axis 值。

public int GetScaleChannelAxis()

Returns

int

GetScaleMode()

Gets the Scale Mode value. 获取 Scale Mode 值。

public TensorRtScaleMode GetScaleMode()

Returns

TensorRtScaleMode

GetScalePowerWeightsInfo()

Gets metadata for the power weights of a TensorRT scale layer. 获取 TensorRT scale 层 power 权重的元数据。

public TensorRtWeightsInfo GetScalePowerWeightsInfo()

Returns

TensorRtWeightsInfo

GetScaleScaleWeightsInfo()

Gets metadata for the scale weights of a TensorRT scale layer. 获取 TensorRT scale 层 scale 权重的元数据。

public TensorRtWeightsInfo GetScaleScaleWeightsInfo()

Returns

TensorRtWeightsInfo

GetScaleShiftWeightsInfo()

Gets metadata for the shift weights of a TensorRT scale layer. 获取 TensorRT scale 层 shift 权重的元数据。

public TensorRtWeightsInfo GetScaleShiftWeightsInfo()

Returns

TensorRtWeightsInfo

GetScatterAxis()

Gets the axis used by a scatter layer in element mode. 获取 scatter 层在 element 模式下使用的轴。

public int GetScatterAxis()

Returns

int

GetScatterMode()

Gets the TensorRT scatter mode. 获取 TensorRT scatter 层模式。

public TensorRtScatterMode GetScatterMode()

Returns

TensorRtScatterMode

GetShuffleFirstTranspose()

Gets the Shuffle layer permutation applied before reshaping. 获取 Shuffle 层在 reshape 之前应用的转置排列。

public TensorRtDims GetShuffleFirstTranspose()

Returns

TensorRtDims

The first transpose permutation. 第一段转置排列。

GetShuffleReshapeDimensions()

Gets the Shuffle Reshape Dimensions value. 获取 Shuffle Reshape Dimensions 值。

public TensorRtDims GetShuffleReshapeDimensions()

Returns

TensorRtDims

GetShuffleReshapeDimensions64()

Gets shuffle reshape dimensions with TensorRT 11 64-bit extents. 获取 shuffle reshape 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetShuffleReshapeDimensions64()

Returns

TensorRtDims64

GetShuffleSecondTranspose()

Gets the Shuffle layer permutation applied after reshaping. 获取 Shuffle 层在 reshape 之后应用的转置排列。

public TensorRtDims GetShuffleSecondTranspose()

Returns

TensorRtDims

The second transpose permutation. 第二段转置排列。

GetShuffleZeroIsPlaceholder()

Gets the Shuffle Zero Is Placeholder value. 获取 Shuffle Zero Is Placeholder 值。

public bool GetShuffleZeroIsPlaceholder()

Returns

bool

GetSliceAxes()

Gets the axes vector used by a TensorRT 10 or TensorRT 11 slice layer. 获取 TensorRT 10 或 TensorRT 11 slice 层使用的 axes 向量。

public TensorRtDims GetSliceAxes()

Returns

TensorRtDims

The current slice axes dimensions. 当前 slice axes 维度。

GetSliceMode()

Gets the Slice Mode value. 获取 Slice Mode 值。

public TensorRtSliceMode GetSliceMode()

Returns

TensorRtSliceMode

GetSliceSize()

Gets the Slice Size value. 获取 Slice Size 值。

public TensorRtDims GetSliceSize()

Returns

TensorRtDims

GetSliceSize64()

Gets slice size dimensions with TensorRT 11 64-bit extents. 获取 slice size 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetSliceSize64()

Returns

TensorRtDims64

GetSliceStart()

Gets the Slice Start value. 获取 Slice Start 值。

public TensorRtDims GetSliceStart()

Returns

TensorRtDims

GetSliceStart64()

Gets slice start dimensions with TensorRT 11 64-bit extents. 获取 slice start 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetSliceStart64()

Returns

TensorRtDims64

GetSliceStride()

Gets the Slice Stride value. 获取 Slice Stride 值。

public TensorRtDims GetSliceStride()

Returns

TensorRtDims

GetSliceStride64()

Gets slice stride dimensions with TensorRT 11 64-bit extents. 获取 slice stride 维度,并保留 TensorRT 11 的 64 位 extent。

public TensorRtDims64 GetSliceStride64()

Returns

TensorRtDims64

GetSoftMaxAxes()

Gets the Soft Max Axes value. 获取 Soft Max Axes 值。

public uint GetSoftMaxAxes()

Returns

uint

GetTopKAxes()

Gets the Top K Axes value. 获取 Top K Axes 值。

public uint GetTopKAxes()

Returns

uint

GetTopKIndicesType()

Gets the index output data type configured on a TensorRT 11 TopK layer. 获取 TensorRT 11 TopK 层索引输出的数据类型。

public TensorRtDataType GetTopKIndicesType()

Returns

TensorRtDataType

The configured TopK indices data type. 已配置的 TopK indices 数据类型。

GetTopKOperation()

Gets the Top K Operation value. 获取 Top K Operation 值。

public TensorRtTopKOperation GetTopKOperation()

Returns

TensorRtTopKOperation

GetTopKValue()

Gets the Top K Value value. 获取 Top K Value 值。

public int GetTopKValue()

Returns

int

GetTripLimitKind()

Gets the trip-limit kind for a trip-limit layer. 获取 trip-limit 层的限制方式。

public TensorRtTripLimitKind GetTripLimitKind()

Returns

TensorRtTripLimitKind

GetUnaryOperation()

Gets the Unary Operation value. 获取 Unary Operation 值。

public TensorRtUnaryOperation GetUnaryOperation()

Returns

TensorRtUnaryOperation

HasInputTensor(int)

Gets whether the specified TensorRT layer input slot contains a tensor. 获取指定 TensorRT layer 输入槽位是否包含 tensor。

public bool HasInputTensor(int index)

Parameters

index int

The zero-based input slot index. 从零开始的输入槽位索引。

Returns

bool

true when TensorRT reports a tensor at that slot. 当 TensorRT 在该槽位报告 tensor 时返回 true。

HasOutputTensor(int)

Gets whether the specified TensorRT layer output slot contains a tensor. 获取指定 TensorRT layer 输出槽位是否包含 tensor。

public bool HasOutputTensor(int index)

Parameters

index int

The zero-based output slot index. 从零开始的输出槽位索引。

Returns

bool

true when TensorRT reports a tensor at that slot. 当 TensorRT 在该槽位报告 tensor 时返回 true。

IsFillAlphaBetaInt64()

Gets whether a TensorRT fill layer currently stores alpha and beta as int64 values. 获取 TensorRT fill 层当前是否以 int64 形式保存 alpha 和 beta。

public bool IsFillAlphaBetaInt64()

Returns

bool

IsNormalizationV2()

Gets whether a normalization layer is a TensorRT V2 normalization layer. 获取 normalization 层是否为 TensorRT V2 normalization 层。

public bool IsNormalizationV2()

Returns

bool

IsOutputTypeSet(int)

Checks whether Output Type Set is true. 检查 Output Type Set 是否为 true。

public bool IsOutputTypeSet(int index)

Parameters

index int

Returns

bool

IsPluginV2OutputBroadcastAcrossBatch(int, IReadOnlyList<bool>)

Queries deprecated implicit-batch output broadcasting from caller-owned input broadcast flags on TensorRT 8 and 10. 使用 caller-owned 输入广播标志查询 TensorRT 8/10 的旧版输出广播行为。

public bool IsPluginV2OutputBroadcastAcrossBatch(int outputIndex, IReadOnlyList<bool> inputIsBroadcasted)

Parameters

outputIndex int
inputIsBroadcasted IReadOnlyList<bool>

Returns

bool

ResetOutputType(int)

Resets the Output Type setting. 重置 Output Type 设置。

public void ResetOutputType(int index)

Parameters

index int

ResetPrecision()

Resets the Precision setting. 重置 Precision 设置。

public void ResetPrecision()

SetActivationAlpha(double)

Sets the Activation Alpha value. 设置 Activation Alpha 值。

public void SetActivationAlpha(double alpha)

Parameters

alpha double

SetActivationBeta(double)

Sets the Activation Beta value. 设置 Activation Beta 值。

public void SetActivationBeta(double beta)

Parameters

beta double

SetActivationType(TensorRtActivationType)

Sets the Activation Type value. 设置 Activation Type 值。

public void SetActivationType(TensorRtActivationType activationType)

Parameters

activationType TensorRtActivationType

SetAssertionMessage(string)

Sets the assertion message. 设置 assertion 层的断言消息。

public void SetAssertionMessage(string message)

Parameters

message string

SetCastToType(TensorRtDataType)

Sets the output data type for a Cast layer. 设置 Cast 层的输出数据类型。

public void SetCastToType(TensorRtDataType dataType)

Parameters

dataType TensorRtDataType

Destination data type. / 目标数据类型。

SetConcatenationAxis(int)

Sets the Concatenation Axis value. 设置 Concatenation Axis 值。

public void SetConcatenationAxis(int axis)

Parameters

axis int

SetConstantLayerDimensions(TensorRtDims)

Sets the dimensions stored on a TensorRT constant layer. 设置 TensorRT constant 层中保存的常量维度。

public void SetConstantLayerDimensions(TensorRtDims dimensions)

Parameters

dimensions TensorRtDims

The constant dimensions. 常量维度。

SetConvolutionDilation(TensorRtDims)

Sets the Convolution Dilation value. 设置 Convolution Dilation 值。

public void SetConvolutionDilation(TensorRtDims dilation)

Parameters

dilation TensorRtDims

SetConvolutionGroups(int)

Sets the Convolution Groups value. 设置 Convolution Groups 值。

public void SetConvolutionGroups(int groups)

Parameters

groups int

SetConvolutionOutputMaps(int)

Sets the Convolution Output Maps value. 设置 Convolution Output Maps 值。

public void SetConvolutionOutputMaps(int outputMaps)

Parameters

outputMaps int

SetConvolutionPadding(TensorRtDims)

Sets the explicit N-D padding of a convolution layer. 设置 convolution 层的显式 N-D padding。

public void SetConvolutionPadding(TensorRtDims padding)

Parameters

padding TensorRtDims

The padding dimensions to apply. 要应用的 padding 维度。

SetConvolutionPaddingMode(TensorRtPaddingMode)

Sets the Convolution Padding Mode value. 设置 Convolution Padding Mode 值。

public void SetConvolutionPaddingMode(TensorRtPaddingMode paddingMode)

Parameters

paddingMode TensorRtPaddingMode

SetConvolutionPostPadding(TensorRtDims)

Sets the Convolution Post Padding value. 设置 Convolution Post Padding 值。

public void SetConvolutionPostPadding(TensorRtDims padding)

Parameters

padding TensorRtDims

SetConvolutionPrePadding(TensorRtDims)

Sets the Convolution Pre Padding value. 设置 Convolution Pre Padding 值。

public void SetConvolutionPrePadding(TensorRtDims padding)

Parameters

padding TensorRtDims

SetConvolutionStride(TensorRtDims)

Sets the Convolution Stride value. 设置 Convolution Stride 值。

public void SetConvolutionStride(TensorRtDims stride)

Parameters

stride TensorRtDims

SetCumulativeExclusive(bool)

Sets whether the cumulative layer uses exclusive accumulation. 设置 cumulative 层是否使用 exclusive 累计。

public void SetCumulativeExclusive(bool exclusive)

Parameters

exclusive bool

SetCumulativeOperation(TensorRtCumulativeOperation)

Sets the cumulative operation. 设置 cumulative 层的累计运算类型。

public void SetCumulativeOperation(TensorRtCumulativeOperation operation)

Parameters

operation TensorRtCumulativeOperation

SetCumulativeReverse(bool)

Sets whether the cumulative layer accumulates in reverse order. 设置 cumulative 层是否按反向顺序累计。

public void SetCumulativeReverse(bool reverse)

Parameters

reverse bool

SetDeconvolutionDilation(TensorRtDims)

Sets the Deconvolution Dilation value. 设置 Deconvolution Dilation 值。

public void SetDeconvolutionDilation(TensorRtDims dilation)

Parameters

dilation TensorRtDims

SetDeconvolutionGroups(int)

Sets the Deconvolution Groups value. 设置 Deconvolution Groups 值。

public void SetDeconvolutionGroups(int groups)

Parameters

groups int

SetDeconvolutionKernelSize(TensorRtDims)

Sets the Deconvolution Kernel Size value. 设置 Deconvolution Kernel Size 值。

public void SetDeconvolutionKernelSize(TensorRtDims kernelSize)

Parameters

kernelSize TensorRtDims

SetDeconvolutionOutputMaps(int)

Sets the Deconvolution Output Maps value. 设置 Deconvolution Output Maps 值。

public void SetDeconvolutionOutputMaps(int outputMaps)

Parameters

outputMaps int

SetDeconvolutionPadding(TensorRtDims)

Sets the explicit N-D padding of a deconvolution layer. 设置 deconvolution 层的显式 N-D padding。

public void SetDeconvolutionPadding(TensorRtDims padding)

Parameters

padding TensorRtDims

The padding dimensions to apply. 要应用的 padding 维度。

SetDeconvolutionPaddingMode(TensorRtPaddingMode)

Sets the Deconvolution Padding Mode value. 设置 Deconvolution Padding Mode 值。

public void SetDeconvolutionPaddingMode(TensorRtPaddingMode paddingMode)

Parameters

paddingMode TensorRtPaddingMode

SetDeconvolutionPostPadding(TensorRtDims)

Sets the Deconvolution Post Padding value. 设置 Deconvolution Post Padding 值。

public void SetDeconvolutionPostPadding(TensorRtDims padding)

Parameters

padding TensorRtDims

SetDeconvolutionPrePadding(TensorRtDims)

Sets the Deconvolution Pre Padding value. 设置 Deconvolution Pre Padding 值。

public void SetDeconvolutionPrePadding(TensorRtDims padding)

Parameters

padding TensorRtDims

SetDeconvolutionStride(TensorRtDims)

Sets the Deconvolution Stride value. 设置 Deconvolution Stride 值。

public void SetDeconvolutionStride(TensorRtDims stride)

Parameters

stride TensorRtDims

SetDequantizeAxis(int)

Sets the Dequantize Axis value. 设置 Dequantize Axis 值。

public void SetDequantizeAxis(int axis)

Parameters

axis int

SetDequantizeBlockShape(TensorRtDims)

Sets the TensorRT 11 quantization block shape on a dequantize layer. 设置 TensorRT 11 dequantize 层的量化 block shape。

public bool SetDequantizeBlockShape(TensorRtDims blockShape)

Parameters

blockShape TensorRtDims

The block shape dimensions to request. 请求设置的 block shape 维度。

Returns

bool

true when TensorRT accepts the block shape; otherwise false. TensorRT 接受该 block shape 时返回 true,否则返回 false。

SetDequantizeToType(TensorRtDataType)

Sets the target output type of a TensorRT 11 dequantize layer. 设置 TensorRT 11 dequantize 层的目标输出类型。

public void SetDequantizeToType(TensorRtDataType dataType)

Parameters

dataType TensorRtDataType

SetDynamicQuantizeAxis(int)

Sets the compatibility quantization axis of a TensorRT 10/11 dynamic-quantize layer. 设置 TensorRT 10 dynamic-quantize 层的量化 axis。

public void SetDynamicQuantizeAxis(int axis)

Parameters

axis int

SetDynamicQuantizeBlockShape(TensorRtDims)

Sets the quantization block shape of a dynamic-quantize layer. 设置 dynamic-quantize 层的量化 block shape。

public void SetDynamicQuantizeBlockShape(TensorRtDims blockShape)

Parameters

blockShape TensorRtDims

SetDynamicQuantizeBlockSize(int)

Sets the compatibility block size of a TensorRT 10/11 dynamic-quantize layer. 设置 TensorRT 10 dynamic-quantize 层的 block size。

public void SetDynamicQuantizeBlockSize(int blockSize)

Parameters

blockSize int

SetDynamicQuantizeScaleType(TensorRtDataType)

Sets the scale tensor data type of a dynamic-quantize layer. 设置 dynamic-quantize 层的 scale 张量数据类型。

public void SetDynamicQuantizeScaleType(TensorRtDataType dataType)

Parameters

dataType TensorRtDataType

SetDynamicQuantizeToType(TensorRtDataType)

Sets the output data type of a dynamic-quantize layer. 设置 dynamic-quantize 层的输出数据类型。

public void SetDynamicQuantizeToType(TensorRtDataType dataType)

Parameters

dataType TensorRtDataType

SetEinsumEquation(string)

Sets the equation string on a TensorRT einsum layer. 设置 TensorRT einsum 层的方程字符串。

public bool SetEinsumEquation(string equation)

Parameters

equation string

The einsum equation, for example "ij,jk->ik". Einsum 方程,例如 "ij,jk->ik"。

Returns

bool

true when TensorRT accepts the new equation. 当 TensorRT 接受新方程时返回 true。

SetElementWiseOperation(TensorRtElementWiseOperation)

Sets the Element Wise Operation value. 设置 Element Wise Operation 值。

public void SetElementWiseOperation(TensorRtElementWiseOperation operation)

Parameters

operation TensorRtElementWiseOperation

SetFillAlpha(double)

Sets the Fill Alpha value. 设置 Fill Alpha 值。

public void SetFillAlpha(double alpha)

Parameters

alpha double

SetFillAlphaInt64(long)

Sets the int64 alpha value of a TensorRT fill layer. 设置 TensorRT fill 层的 int64 alpha 值。

public void SetFillAlphaInt64(long value)

Parameters

value long

SetFillBeta(double)

Sets the Fill Beta value. 设置 Fill Beta 值。

public void SetFillBeta(double beta)

Parameters

beta double

SetFillBetaInt64(long)

Sets the int64 beta value of a TensorRT fill layer. 设置 TensorRT fill 层的 int64 beta 值。

public void SetFillBetaInt64(long value)

Parameters

value long

SetFillDimensions(TensorRtDims)

Sets the Fill Dimensions value. 设置 Fill Dimensions 值。

public void SetFillDimensions(TensorRtDims dimensions)

Parameters

dimensions TensorRtDims

SetFillOperation(TensorRtFillOperation)

Sets the Fill Operation value. 设置 Fill Operation 值。

public void SetFillOperation(TensorRtFillOperation operation)

Parameters

operation TensorRtFillOperation

SetFillToType(TensorRtDataType)

Sets the output type of a TensorRT 11 fill layer. 设置 TensorRT 11 fill 层的输出类型。

public void SetFillToType(TensorRtDataType dataType)

Parameters

dataType TensorRtDataType

SetGatherAxis(int)

Sets the Gather Axis value. 设置 Gather Axis 值。

public void SetGatherAxis(int axis)

Parameters

axis int

SetGatherElementWiseDimensions(int)

Sets the number of elementwise dimensions used by a gather layer. 设置 gather 层使用的 elementwise 维度数量。

public void SetGatherElementWiseDimensions(int dimensions)

Parameters

dimensions int

SetGatherMode(TensorRtGatherMode)

Sets the TensorRT gather mode. 设置 TensorRT gather 层模式。

public void SetGatherMode(TensorRtGatherMode mode)

Parameters

mode TensorRtGatherMode

SetGridSampleAlignCorners(bool)

Sets whether a grid-sample layer aligns corners. 设置 grid-sample 层是否对齐角点。

public void SetGridSampleAlignCorners(bool alignCorners)

Parameters

alignCorners bool

SetGridSampleInterpolationMode(TensorRtInterpolationMode)

Sets the interpolation mode of a grid-sample layer. 设置 grid-sample 层的插值模式。

public void SetGridSampleInterpolationMode(TensorRtInterpolationMode mode)

Parameters

mode TensorRtInterpolationMode

SetGridSampleMode(TensorRtSampleMode)

Sets the out-of-bounds sample mode of a grid-sample layer. 设置 grid-sample 层的越界采样模式。

public void SetGridSampleMode(TensorRtSampleMode mode)

Parameters

mode TensorRtSampleMode

SetInput(int, TensorRtTensor)

Replaces or appends an input tensor on TensorRT 11 layers that support dynamic input slots. 在支持动态输入槽位的 TensorRT 11 层上替换或追加输入张量。

public void SetInput(int index, TensorRtTensor tensor)

Parameters

index int

Input index to replace, or the current input count to append. / 要替换的输入索引,或当前输入数量表示追加。

tensor TensorRtTensor

Tensor to assign. / 要设置的张量。

SetIteratorAxis(int)

Sets the iterator axis for an iterator layer. 设置 iterator 层的迭代轴。

public void SetIteratorAxis(int axis)

Parameters

axis int

The iterator axis. / 迭代轴。

SetIteratorReverse(bool)

Sets whether an iterator layer iterates in reverse order. 设置 iterator 层是否按反向顺序迭代。

public void SetIteratorReverse(bool reverse)

Parameters

reverse bool

Whether iteration should be reversed. / 是否反向迭代。

SetKvCacheUpdateForm(TensorRtAttentionIoForm)

Sets the update form of a TensorRT 11 KV-cache update layer. 设置 TensorRT 11 KV-cache update 层的 update form。

public bool SetKvCacheUpdateForm(TensorRtAttentionIoForm form)

Parameters

form TensorRtAttentionIoForm

Returns

bool

true when TensorRT accepts the form. TensorRT 接受该排布时返回 true。

SetKvCacheUpdateLengths(TensorRtTensor)

Sets the update-lengths tensor of a TensorRT 11 KV-cache update layer. 设置 TensorRT 11 KV-cache update 层的 update-lengths 张量。

public bool SetKvCacheUpdateLengths(TensorRtTensor lengths)

Parameters

lengths TensorRtTensor

Returns

bool

true when TensorRT accepts the tensor. TensorRT 接受该张量时返回 true。

SetKvCacheUpdateMode(TensorRtKvCacheMode)

Sets the cache mode of a TensorRT 11 KV-cache update layer. 设置 TensorRT 11 KV-cache update 层的 cache mode。

public bool SetKvCacheUpdateMode(TensorRtKvCacheMode mode)

Parameters

mode TensorRtKvCacheMode

Returns

bool

true when TensorRT accepts the mode. TensorRT 接受该模式时返回 true。

SetLoopOutputAxis(int)

Sets the loop-output concatenation axis. 设置 loop-output 的拼接轴。

public void SetLoopOutputAxis(int axis)

Parameters

axis int

The concatenation axis. / 拼接轴。

SetLrnAlpha(float)

Sets the Lrn Alpha value. 设置 Lrn Alpha 值。

public void SetLrnAlpha(float alpha)

Parameters

alpha float

SetLrnBeta(float)

Sets the Lrn Beta value. 设置 Lrn Beta 值。

public void SetLrnBeta(float beta)

Parameters

beta float

SetLrnK(float)

Sets the Lrn K value. 设置 Lrn K 值。

public void SetLrnK(float k)

Parameters

k float

SetLrnWindowSize(int)

Sets the Lrn Window Size value. 设置 Lrn Window Size 值。

public void SetLrnWindowSize(int windowSize)

Parameters

windowSize int

SetMatrixMultiplyOperation(int, TensorRtMatrixOperation)

Sets the Matrix Multiply Operation value. 设置 Matrix Multiply Operation 值。

public void SetMatrixMultiplyOperation(int inputIndex, TensorRtMatrixOperation operation)

Parameters

inputIndex int
operation TensorRtMatrixOperation

SetMetadata(string)

Sets TensorRT layer metadata text. 设置 TensorRT 层的 metadata 文本。

public void SetMetadata(string metadata)

Parameters

metadata string

Metadata text. Use an empty string to clear. / metadata 文本;传入空字符串可清空。

SetMoEActivationType(TensorRtMoEActivationType)

Sets the activation type configured on a TensorRT 11 MoE layer. 设置 TensorRT 11 MoE 层配置的激活类型。

public void SetMoEActivationType(TensorRtMoEActivationType activationType)

Parameters

activationType TensorRtMoEActivationType

SetMoEDynamicQuantizationOutputScaleType(TensorRtDataType)

Sets the data type of the dynamic-quantization output scale on a TensorRT 11 MoE layer. 设置 TensorRT 11 MoE 层动态量化输出 scale 的数据类型。

public void SetMoEDynamicQuantizationOutputScaleType(TensorRtDataType dataType)

Parameters

dataType TensorRtDataType

SetMoEGatedBiases(TensorRtTensor, TensorRtTensor, TensorRtTensor)

Sets all optional gated expert bias tensors for a TensorRT 11 MoE layer. 设置 TensorRT 11 MoE 层的全部可选 gated expert bias 张量。

public void SetMoEGatedBiases(TensorRtTensor fcGateBiases, TensorRtTensor fcUpBiases, TensorRtTensor fcDownBiases)

Parameters

fcGateBiases TensorRtTensor
fcUpBiases TensorRtTensor
fcDownBiases TensorRtTensor

SetMoEGatedWeights(TensorRtTensor, TensorRtTensor, TensorRtTensor, TensorRtMoEActivationType)

Sets the gated expert weight tensors for a TensorRT 11 MoE layer. 设置 TensorRT 11 MoE 层的 gated expert 权重张量。

public void SetMoEGatedWeights(TensorRtTensor fcGateWeights, TensorRtTensor fcUpWeights, TensorRtTensor fcDownWeights, TensorRtMoEActivationType activationType)

Parameters

fcGateWeights TensorRtTensor
fcUpWeights TensorRtTensor
fcDownWeights TensorRtTensor
activationType TensorRtMoEActivationType

SetMoEQuantizationBlockShape(TensorRtDims)

Sets the quantization block shape used for the MoE mul output. 设置 MoE mul 输出使用的量化 block shape。

public void SetMoEQuantizationBlockShape(TensorRtDims blockShape)

Parameters

blockShape TensorRtDims

SetMoEQuantizationDynamicDblQ(TensorRtTensor, TensorRtDataType, TensorRtDims, TensorRtDataType)

Configures dynamic double quantization after the MoE mul operation. 配置 MoE mul 操作后的动态 double quantization。

public void SetMoEQuantizationDynamicDblQ(TensorRtTensor fcDownActivationDblQScale, TensorRtDataType dataType, TensorRtDims blockShape, TensorRtDataType dynamicQuantizationOutputScaleType)

Parameters

fcDownActivationDblQScale TensorRtTensor
dataType TensorRtDataType
blockShape TensorRtDims
dynamicQuantizationOutputScaleType TensorRtDataType

SetMoEQuantizationStatic(TensorRtTensor, TensorRtDataType)

Configures static quantization after the MoE mul operation. 配置 MoE mul 操作后的静态量化。

public void SetMoEQuantizationStatic(TensorRtTensor fcDownActivationScale, TensorRtDataType dataType)

Parameters

fcDownActivationScale TensorRtTensor
dataType TensorRtDataType

SetMoEQuantizationToType(TensorRtDataType)

Sets the quantized type used for the MoE mul output. 设置 MoE mul 输出使用的量化类型。

public void SetMoEQuantizationToType(TensorRtDataType dataType)

Parameters

dataType TensorRtDataType

SetMoESwigluAlpha(float)

Sets the SwiGLU alpha parameter on a TensorRT 11 MoE layer. 设置 TensorRT 11 MoE 层的 SwiGLU alpha 参数。

public void SetMoESwigluAlpha(float alpha)

Parameters

alpha float

SetMoESwigluBeta(float)

Sets the SwiGLU beta parameter on a TensorRT 11 MoE layer. 设置 TensorRT 11 MoE 层的 SwiGLU beta 参数。

public void SetMoESwigluBeta(float beta)

Parameters

beta float

SetMoESwigluLimit(float)

Sets the SwiGLU limit parameter on a TensorRT 11 MoE layer. 设置 TensorRT 11 MoE 层的 SwiGLU limit 参数。

public void SetMoESwigluLimit(float limit)

Parameters

limit float

SetMoESwigluParameters(float, float, float)

Sets all SwiGLU parameters on a TensorRT 11 MoE layer. 一次性设置 TensorRT 11 MoE 层的全部 SwiGLU 参数。

public void SetMoESwigluParameters(float limit, float alpha, float beta)

Parameters

limit float
alpha float
beta float

SetNmsBoundingBoxFormat(TensorRtBoundingBoxFormat)

Sets the bounding-box format used by an NMS layer. 设置 NMS 层使用的边界框格式。

public void SetNmsBoundingBoxFormat(TensorRtBoundingBoxFormat format)

Parameters

format TensorRtBoundingBoxFormat

Bounding-box coordinate format. / 边界框坐标格式。

SetNmsIndicesType(TensorRtDataType)

Sets the indices output type for an NMS layer. 设置 NMS 层索引输出的数据类型。

public bool SetNmsIndicesType(TensorRtDataType dataType)

Parameters

dataType TensorRtDataType

Indices type, usually Int32 or Int64. / 索引类型,通常为 Int32 或 Int64。

Returns

bool

True when TensorRT accepted the value. / 当 TensorRT 接受该值时返回 true。

SetNmsIouThresholdTensor(TensorRtTensor)

Sets the optional IoU threshold tensor input for an NMS layer. 设置 NMS 层可选的 IoU 阈值张量输入。

public void SetNmsIouThresholdTensor(TensorRtTensor tensor)

Parameters

tensor TensorRtTensor

Scalar IoU threshold tensor. / IoU 阈值标量张量。

SetNmsScoreThresholdTensor(TensorRtTensor)

Sets the optional score threshold tensor input for an NMS layer. 设置 NMS 层可选的分数阈值张量输入。

public void SetNmsScoreThresholdTensor(TensorRtTensor tensor)

Parameters

tensor TensorRtTensor

Scalar score threshold tensor. / 分数阈值标量张量。

SetNmsTopKBoxLimit(int)

Sets the NMS TopK box limit. 设置 NMS TopK 候选框数量限制。

public void SetNmsTopKBoxLimit(int limit)

Parameters

limit int

Positive TopK limit. / 正数 TopK 限制。

SetNonZeroIndicesType(TensorRtDataType)

Sets the indices output type for a NonZero layer. 设置 NonZero 层索引输出的数据类型。

public bool SetNonZeroIndicesType(TensorRtDataType dataType)

Parameters

dataType TensorRtDataType

Indices type, usually Int32 or Int64. / 索引类型,通常为 Int32 或 Int64。

Returns

bool

True when TensorRT accepted the value. / 当 TensorRT 接受该值时返回 true。

SetNormalizationAxes(uint)

Sets the axes bitmask of a normalization layer. 设置 normalization 层的 axes 位掩码。

public void SetNormalizationAxes(uint axes)

Parameters

axes uint

SetNormalizationComputePrecision(TensorRtDataType)

Sets the compute precision used by a TensorRT 8 or TensorRT 10 normalization layer. 设置 TensorRT 8 或 TensorRT 10 normalization 层使用的计算精度。

public void SetNormalizationComputePrecision(TensorRtDataType dataType)

Parameters

dataType TensorRtDataType

The compute precision data type. 计算精度的数据类型。

SetNormalizationEpsilon(double)

Sets the epsilon value of a normalization layer. 设置 normalization 层的 epsilon 参数。

public void SetNormalizationEpsilon(double epsilon)

Parameters

epsilon double

SetNormalizationGroupCount(long)

Sets the group count of a normalization layer. 设置 normalization 层的分组数量。

public void SetNormalizationGroupCount(long groupCount)

Parameters

groupCount long

SetOneHotAxis(int)

Sets the axis used by a one-hot layer. 设置 one-hot 层使用的轴。

public void SetOneHotAxis(int axis)

Parameters

axis int

SetOutputType(int, TensorRtDataType)

Sets the Output Type value. 设置 Output Type 值。

public void SetOutputType(int index, TensorRtDataType dataType)

Parameters

index int
dataType TensorRtDataType

SetPaddingPostPadding(TensorRtDims)

Sets the Padding Post Padding value. 设置 Padding Post Padding 值。

public void SetPaddingPostPadding(TensorRtDims padding)

Parameters

padding TensorRtDims

SetPaddingPrePadding(TensorRtDims)

Sets the Padding Pre Padding value. 设置 Padding Pre Padding 值。

public void SetPaddingPrePadding(TensorRtDims padding)

Parameters

padding TensorRtDims

SetPoolingAverageCountExcludesPadding(bool)

Sets the Pooling Average Count Excludes Padding value. 设置 Pooling Average Count Excludes Padding 值。

public void SetPoolingAverageCountExcludesPadding(bool excludesPadding)

Parameters

excludesPadding bool

SetPoolingBlendFactor(double)

Sets the Pooling Blend Factor value. 设置 Pooling Blend Factor 值。

public void SetPoolingBlendFactor(double blendFactor)

Parameters

blendFactor double

SetPoolingPadding(TensorRtDims)

Sets the Pooling Padding value. 设置 Pooling Padding 值。

public void SetPoolingPadding(TensorRtDims padding)

Parameters

padding TensorRtDims

SetPoolingPaddingMode(TensorRtPaddingMode)

Sets the Pooling Padding Mode value. 设置 Pooling Padding Mode 值。

public void SetPoolingPaddingMode(TensorRtPaddingMode paddingMode)

Parameters

paddingMode TensorRtPaddingMode

SetPoolingPostPadding(TensorRtDims)

Sets the Pooling Post Padding value. 设置 Pooling Post Padding 值。

public void SetPoolingPostPadding(TensorRtDims padding)

Parameters

padding TensorRtDims

SetPoolingPrePadding(TensorRtDims)

Sets the Pooling Pre Padding value. 设置 Pooling Pre Padding 值。

public void SetPoolingPrePadding(TensorRtDims padding)

Parameters

padding TensorRtDims

SetPoolingStride(TensorRtDims)

Sets the Pooling Stride value. 设置 Pooling Stride 值。

public void SetPoolingStride(TensorRtDims stride)

Parameters

stride TensorRtDims

SetPoolingType(TensorRtPoolingType)

Sets the Pooling Type value. 设置 Pooling Type 值。

public void SetPoolingType(TensorRtPoolingType poolingType)

Parameters

poolingType TensorRtPoolingType

SetPoolingWindowSize(TensorRtDims)

Sets the Pooling Window Size value. 设置 Pooling Window Size 值。

public void SetPoolingWindowSize(TensorRtDims windowSize)

Parameters

windowSize TensorRtDims

SetQuantizeAxis(int)

Sets the Quantize Axis value. 设置 Quantize Axis 值。

public void SetQuantizeAxis(int axis)

Parameters

axis int

SetRankCount(int)

Sets the multi-rank execution hint count when supported by TensorRT for this layer type. 当 TensorRT 对该层类型支持时,设置多 rank 执行提示数量。

public bool SetRankCount(int rankCount)

Parameters

rankCount int

Rank count. / rank 数量。

Returns

bool

True when TensorRT accepted the value. / 当 TensorRT 接受该值时返回 true。

SetReduceAxes(uint)

Sets the Reduce Axes value. 设置 Reduce Axes 值。

public void SetReduceAxes(uint axes)

Parameters

axes uint

SetReduceKeepDimensions(bool)

Sets the Reduce Keep Dimensions value. 设置 Reduce Keep Dimensions 值。

public void SetReduceKeepDimensions(bool keepDimensions)

Parameters

keepDimensions bool

SetReduceOperation(TensorRtReduceOperation)

Sets the Reduce Operation value. 设置 Reduce Operation 值。

public void SetReduceOperation(TensorRtReduceOperation operation)

Parameters

operation TensorRtReduceOperation

SetResizeAlignCorners(bool)

Sets the TensorRT 8 resize align-corners flag. 设置 TensorRT 8 resize 层的 align-corners 标志。

public void SetResizeAlignCorners(bool alignCorners)

Parameters

alignCorners bool

Whether resize should align the corner pixels. resize 是否应对齐角点像素。

SetResizeCoordinateTransformation(TensorRtResizeCoordinateTransformation)

Sets the Resize Coordinate Transformation value. 设置 Resize Coordinate Transformation 值。

public void SetResizeCoordinateTransformation(TensorRtResizeCoordinateTransformation transformation)

Parameters

transformation TensorRtResizeCoordinateTransformation

SetResizeCubicCoefficient(double)

Sets the Resize Cubic Coefficient value. 设置 Resize Cubic Coefficient 值。

public void SetResizeCubicCoefficient(double value)

Parameters

value double

SetResizeExcludeOutside(bool)

Sets the Resize Exclude Outside value. 设置 Resize Exclude Outside 值。

public void SetResizeExcludeOutside(bool value)

Parameters

value bool

SetResizeMode(TensorRtResizeMode)

Sets the Resize Mode value. 设置 Resize Mode 值。

public void SetResizeMode(TensorRtResizeMode resizeMode)

Parameters

resizeMode TensorRtResizeMode

SetResizeNearestRounding(TensorRtResizeRoundMode)

Sets the Resize Nearest Rounding value. 设置 Resize Nearest Rounding 值。

public void SetResizeNearestRounding(TensorRtResizeRoundMode rounding)

Parameters

rounding TensorRtResizeRoundMode

SetResizeOutputDimensions(TensorRtDims)

Sets the Resize Output Dimensions value. 设置 Resize Output Dimensions 值。

public void SetResizeOutputDimensions(TensorRtDims dimensions)

Parameters

dimensions TensorRtDims

SetResizeScales(float[])

Sets the Resize Scales value. 设置 Resize Scales 值。

public void SetResizeScales(float[] scales)

Parameters

scales float[]

SetResizeSelectorForSinglePixel(TensorRtResizeSelector)

Sets the Resize Selector For Single Pixel value. 设置 Resize Selector For Single Pixel 值。

public void SetResizeSelectorForSinglePixel(TensorRtResizeSelector selector)

Parameters

selector TensorRtResizeSelector

SetReverseSequenceBatchAxis(int)

Sets the batch axis configured on a ReverseSequence layer. 设置 ReverseSequence 层配置的 batch 轴。

public void SetReverseSequenceBatchAxis(int axis)

Parameters

axis int

Batch axis. / batch 轴。

SetReverseSequenceSequenceAxis(int)

Sets the sequence axis configured on a ReverseSequence layer. 设置 ReverseSequence 层配置的 sequence 轴。

public void SetReverseSequenceSequenceAxis(int axis)

Parameters

axis int

Sequence axis. / sequence 轴。

SetRnnV2CellState(TensorRtTensor)

Sets the TensorRT 8 RNNv2 initial cell-state tensor. 设置 TensorRT 8 RNNv2 初始 cell-state tensor。

public void SetRnnV2CellState(TensorRtTensor tensor)

Parameters

tensor TensorRtTensor

SetRnnV2Direction(TensorRtRnnDirection)

Sets the TensorRT 8 RNNv2 direction. 设置 TensorRT 8 RNNv2 方向。

public void SetRnnV2Direction(TensorRtRnnDirection direction)

Parameters

direction TensorRtRnnDirection

SetRnnV2HiddenState(TensorRtTensor)

Sets the TensorRT 8 RNNv2 initial hidden-state tensor. 设置 TensorRT 8 RNNv2 初始 hidden-state tensor。

public void SetRnnV2HiddenState(TensorRtTensor tensor)

Parameters

tensor TensorRtTensor

SetRnnV2InputMode(TensorRtRnnInputMode)

Sets the TensorRT 8 RNNv2 input mode. 设置 TensorRT 8 RNNv2 输入模式。

public void SetRnnV2InputMode(TensorRtRnnInputMode inputMode)

Parameters

inputMode TensorRtRnnInputMode

SetRnnV2Operation(TensorRtRnnOperation)

Sets the TensorRT 8 RNNv2 operation kind. 设置 TensorRT 8 RNNv2 运算类型。

public void SetRnnV2Operation(TensorRtRnnOperation operation)

Parameters

operation TensorRtRnnOperation

SetRnnV2SequenceLengths(TensorRtTensor)

Sets the TensorRT 8 RNNv2 sequence-length tensor. 设置 TensorRT 8 RNNv2 sequence-length tensor。

public void SetRnnV2SequenceLengths(TensorRtTensor tensor)

Parameters

tensor TensorRtTensor

SetRotaryEmbeddingDimension(int)

Sets the rotary embedding dimension configured on a TensorRT 11 rotary-embedding layer. 设置 TensorRT 11 rotary-embedding 层配置的 rotary embedding 维度。

public bool SetRotaryEmbeddingDimension(int rotaryEmbeddingDimension)

Parameters

rotaryEmbeddingDimension int

Returns

bool

true when TensorRT accepts the value. TensorRT 接受该值时返回 true。

SetRotaryEmbeddingInterleaved(bool)

Sets whether a TensorRT 11 rotary-embedding layer uses interleaved RoPE layout. 设置 TensorRT 11 rotary-embedding 层是否使用 interleaved RoPE 布局。

public void SetRotaryEmbeddingInterleaved(bool interleaved)

Parameters

interleaved bool

SetScaleChannelAxis(int)

Sets the Scale Channel Axis value. 设置 Scale Channel Axis 值。

public void SetScaleChannelAxis(int channelAxis)

Parameters

channelAxis int

SetScaleMode(TensorRtScaleMode)

Sets the Scale Mode value. 设置 Scale Mode 值。

public void SetScaleMode(TensorRtScaleMode mode)

Parameters

mode TensorRtScaleMode

SetScatterAxis(int)

Sets the axis used by a scatter layer in element mode. 设置 scatter 层在 element 模式下使用的轴。

public void SetScatterAxis(int axis)

Parameters

axis int

SetScatterMode(TensorRtScatterMode)

Sets the TensorRT scatter mode. 设置 TensorRT scatter 层模式。

public void SetScatterMode(TensorRtScatterMode mode)

Parameters

mode TensorRtScatterMode

SetShuffleFirstTranspose(TensorRtDims)

Sets the Shuffle layer permutation applied before reshaping. 设置 Shuffle 层在 reshape 之前应用的转置排列。

public void SetShuffleFirstTranspose(TensorRtDims permutation)

Parameters

permutation TensorRtDims

Permutation dimensions. 转置排列维度。

SetShuffleReshapeDimensions(TensorRtDims)

Sets the Shuffle Reshape Dimensions value. 设置 Shuffle Reshape Dimensions 值。

public void SetShuffleReshapeDimensions(TensorRtDims dims)

Parameters

dims TensorRtDims

SetShuffleSecondTranspose(TensorRtDims)

Sets the Shuffle layer permutation applied after reshaping. 设置 Shuffle 层在 reshape 之后应用的转置排列。

public void SetShuffleSecondTranspose(TensorRtDims permutation)

Parameters

permutation TensorRtDims

Permutation dimensions. 转置排列维度。

SetShuffleZeroIsPlaceholder(bool)

Sets the Shuffle Zero Is Placeholder value. 设置 Shuffle Zero Is Placeholder 值。

public void SetShuffleZeroIsPlaceholder(bool zeroIsPlaceholder)

Parameters

zeroIsPlaceholder bool

SetSliceAxes(TensorRtDims)

Sets the axes vector used by a TensorRT 10 or TensorRT 11 slice layer. 设置 TensorRT 10 或 TensorRT 11 slice 层使用的 axes 向量。

public void SetSliceAxes(TensorRtDims axes)

Parameters

axes TensorRtDims

The axes dimensions to apply. 要应用的 axes 维度。

SetSliceMode(TensorRtSliceMode)

Sets the Slice Mode value. 设置 Slice Mode 值。

public void SetSliceMode(TensorRtSliceMode mode)

Parameters

mode TensorRtSliceMode

SetSliceSize(TensorRtDims)

Sets the Slice Size value. 设置 Slice Size 值。

public void SetSliceSize(TensorRtDims size)

Parameters

size TensorRtDims

SetSliceStart(TensorRtDims)

Sets the Slice Start value. 设置 Slice Start 值。

public void SetSliceStart(TensorRtDims start)

Parameters

start TensorRtDims

SetSliceStride(TensorRtDims)

Sets the Slice Stride value. 设置 Slice Stride 值。

public void SetSliceStride(TensorRtDims stride)

Parameters

stride TensorRtDims

SetSoftMaxAxes(uint)

Sets the Soft Max Axes value. 设置 Soft Max Axes 值。

public void SetSoftMaxAxes(uint axes)

Parameters

axes uint

SetTopKAxes(uint)

Sets the Top K Axes value. 设置 Top K Axes 值。

public void SetTopKAxes(uint axes)

Parameters

axes uint

SetTopKIndicesType(TensorRtDataType)

Sets the index output data type on a TensorRT 11 TopK layer. 设置 TensorRT 11 TopK 层索引输出的数据类型。

public bool SetTopKIndicesType(TensorRtDataType dataType)

Parameters

dataType TensorRtDataType

The requested indices data type. 请求设置的 indices 数据类型。

Returns

bool

true when TensorRT accepts the value; otherwise false. TensorRT 接受该值时返回 true,否则返回 false。

SetTopKOperation(TensorRtTopKOperation)

Sets the Top K Operation value. 设置 Top K Operation 值。

public void SetTopKOperation(TensorRtTopKOperation operation)

Parameters

operation TensorRtTopKOperation

SetTopKValue(int)

Sets the Top K Value value. 设置 Top K Value 值。

public void SetTopKValue(int k)

Parameters

k int

SetUnaryOperation(TensorRtUnaryOperation)

Sets the Unary Operation value. 设置 Unary Operation 值。

public void SetUnaryOperation(TensorRtUnaryOperation operation)

Parameters

operation TensorRtUnaryOperation

SupportsPluginV2LegacyFormat(TensorRtDataType, TensorRtTensorFormat)

Evaluates legacy IPluginV2::supportsFormat for a copied data type and tensor format. 使用复制的 data type 与 tensor format 执行旧版 IPluginV2::supportsFormat 查询。

public bool SupportsPluginV2LegacyFormat(TensorRtDataType dataType, TensorRtTensorFormat tensorFormat)

Parameters

dataType TensorRtDataType
tensorFormat TensorRtTensorFormat

Returns

bool

TryGetKvCacheUpdateLengths(out TensorRtTensor?)

Tries to get the optional update-lengths tensor from a TensorRT 11 KV-cache update layer. 尝试获取 TensorRT 11 KV-cache update 层上的可选 update-lengths 张量。

public bool TryGetKvCacheUpdateLengths(out TensorRtTensor? lengths)

Parameters

lengths TensorRtTensor

Returns

bool

TryGetPluginV2DynamicFormatSupportSnapshot(out TensorRtPluginFormatSupportSnapshot?, out string)

Tries to copy IPluginV2DynamicExt current format decisions. 尝试复制 IPluginV2DynamicExt 当前格式结果。

public bool TryGetPluginV2DynamicFormatSupportSnapshot(out TensorRtPluginFormatSupportSnapshot? snapshot, out string diagnostic)

Parameters

snapshot TensorRtPluginFormatSupportSnapshot
diagnostic string

Returns

bool

TryGetPluginV2IoExtFormatSupportSnapshot(out TensorRtPluginFormatSupportSnapshot?, out string)

Tries to copy IPluginV2IOExt current format decisions. 尝试复制 IPluginV2IOExt 当前格式结果。

public bool TryGetPluginV2IoExtFormatSupportSnapshot(out TensorRtPluginFormatSupportSnapshot? snapshot, out string diagnostic)

Parameters

snapshot TensorRtPluginFormatSupportSnapshot
diagnostic string

Returns

bool

TryGetPluginV2Metadata(out TensorRtPluginV2LayerMetadata?, out string)

Tries to get copied PluginV2 metadata without exposing the borrowed plugin pointer. 尝试获取 PluginV2 元数据副本,不暴露 borrowed plugin 指针。

public bool TryGetPluginV2Metadata(out TensorRtPluginV2LayerMetadata? metadata, out string diagnostic)

Parameters

metadata TensorRtPluginV2LayerMetadata

Copied metadata when the layer is PluginV2. 当 layer 为 PluginV2 时返回元数据副本。

diagnostic string

Success or rejection diagnostic. 成功或拒绝原因。

Returns

bool

true when metadata was copied. 成功复制元数据时返回 true。

TryGetPluginV3BuildIoSnapshot(out TensorRtPluginV3BuildIoSnapshot?, out string)

Tries to copy PluginV3 build IO metadata. 尝试复制 PluginV3 build IO 元数据。

public bool TryGetPluginV3BuildIoSnapshot(out TensorRtPluginV3BuildIoSnapshot? snapshot, out string diagnostic)

Parameters

snapshot TensorRtPluginV3BuildIoSnapshot
diagnostic string

Returns

bool

TryGetPluginV3Metadata(out TensorRtPluginV3LayerMetadata?, out string)

Tries to get copied PluginV3 metadata without exposing borrowed plugin or capability pointers. 尝试获取 PluginV3 元数据副本,不暴露 borrowed plugin 或 capability 指针。

public bool TryGetPluginV3Metadata(out TensorRtPluginV3LayerMetadata? metadata, out string diagnostic)

Parameters

metadata TensorRtPluginV3LayerMetadata

Copied metadata on success. 成功时返回元数据副本。

diagnostic string

Success or rejection diagnostic. 成功或拒绝诊断。

Returns

bool

true when metadata was copied. 成功复制元数据时返回 true。

TryGetPluginV3RuntimeSerializationFields(out TensorRtPluginV3SerializationFieldInventory?, out string)

Tries to copy PluginV3 runtime serialization fields. 尝试复制 PluginV3 runtime 序列化字段。

public bool TryGetPluginV3RuntimeSerializationFields(out TensorRtPluginV3SerializationFieldInventory? inventory, out string diagnostic)

Parameters

inventory TensorRtPluginV3SerializationFieldInventory
diagnostic string

Returns

bool