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
IsPrecisionSet
Gets the Is Precision Set value. 获取 Is Precision Set 值。
public bool IsPrecisionSet { get; }
Property Value
Line
Gets or sets the Line value. 获取或设置 Line 值。
public TensorRtApiLine Line { get; }
Property Value
Name
Gets or sets the Name value. 获取或设置 Name 值。
public string Name { get; set; }
Property Value
OutputCount
Gets or sets the Output Count value. 获取或设置 Output Count 值。
public int OutputCount { get; }
Property Value
Precision
Gets or sets the Precision value. 获取或设置 Precision 值。
public TensorRtDataType Precision { get; set; }
Property Value
Type
Gets the Type value. 获取 Type 值。
public TensorRtLayerType Type { get; }
Property Value
Methods
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
GetActivationBeta()
Gets the Activation Beta value. 获取 Activation Beta 值。
public double GetActivationBeta()
Returns
GetActivationType()
Gets the Activation Type value. 获取 Activation Type 值。
public TensorRtActivationType GetActivationType()
Returns
GetAssertionMessage()
Gets the assertion message. 获取 assertion 层的断言消息。
public string GetAssertionMessage()
Returns
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
GetConcatenationAxis()
Gets the Concatenation Axis value. 获取 Concatenation Axis 值。
public int GetConcatenationAxis()
Returns
GetConstantLayerDimensions()
Gets the dimensions stored on a TensorRT constant layer. 获取 TensorRT constant 层中保存的常量维度。
public TensorRtDims GetConstantLayerDimensions()
Returns
GetConstantWeightsInfo()
Gets metadata for weights stored by a TensorRT constant layer. 获取 TensorRT constant 层保存的权重元数据。
public TensorRtWeightsInfo GetConstantWeightsInfo()
Returns
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
GetConvolutionDilation()
Gets the Convolution Dilation value. 获取 Convolution Dilation 值。
public TensorRtDims GetConvolutionDilation()
Returns
GetConvolutionDilation64()
Gets convolution dilation dimensions with TensorRT 11 64-bit extents. 获取 convolution dilation 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetConvolutionDilation64()
Returns
GetConvolutionGroups()
Gets the Convolution Groups value. 获取 Convolution Groups 值。
public int GetConvolutionGroups()
Returns
GetConvolutionKernelWeightsInfo()
Gets metadata for the kernel weights of a TensorRT convolution layer. 获取 TensorRT convolution 层 kernel 权重的元数据。
public TensorRtWeightsInfo GetConvolutionKernelWeightsInfo()
Returns
GetConvolutionOutputMaps()
Gets the Convolution Output Maps value. 获取 Convolution Output Maps 值。
public int GetConvolutionOutputMaps()
Returns
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
GetConvolutionPostPadding()
Gets the Convolution Post Padding value. 获取 Convolution Post Padding 值。
public TensorRtDims GetConvolutionPostPadding()
Returns
GetConvolutionPostPadding64()
Gets convolution post-padding dimensions with TensorRT 11 64-bit extents. 获取 convolution post-padding 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetConvolutionPostPadding64()
Returns
GetConvolutionPrePadding()
Gets the Convolution Pre Padding value. 获取 Convolution Pre Padding 值。
public TensorRtDims GetConvolutionPrePadding()
Returns
GetConvolutionPrePadding64()
Gets convolution pre-padding dimensions with TensorRT 11 64-bit extents. 获取 convolution pre-padding 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetConvolutionPrePadding64()
Returns
GetConvolutionStride()
Gets the Convolution Stride value. 获取 Convolution Stride 值。
public TensorRtDims GetConvolutionStride()
Returns
GetConvolutionStride64()
Gets convolution stride dimensions with TensorRT 11 64-bit extents. 获取 convolution stride 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetConvolutionStride64()
Returns
GetCumulativeExclusive()
Gets whether the cumulative layer uses exclusive accumulation. 获取 cumulative 层是否使用 exclusive 累计。
public bool GetCumulativeExclusive()
Returns
GetCumulativeOperation()
Gets the cumulative operation. 获取 cumulative 层的累计运算类型。
public TensorRtCumulativeOperation GetCumulativeOperation()
Returns
GetCumulativeReverse()
Gets whether the cumulative layer accumulates in reverse order. 获取 cumulative 层是否按反向顺序累计。
public bool GetCumulativeReverse()
Returns
GetDeconvolutionBiasWeightsInfo()
Gets metadata for the bias weights of a TensorRT deconvolution layer. 获取 TensorRT deconvolution 层 bias 权重的元数据。
public TensorRtWeightsInfo GetDeconvolutionBiasWeightsInfo()
Returns
GetDeconvolutionDilation()
Gets the Deconvolution Dilation value. 获取 Deconvolution Dilation 值。
public TensorRtDims GetDeconvolutionDilation()
Returns
GetDeconvolutionDilation64()
Gets deconvolution dilation dimensions with TensorRT 11 64-bit extents. 获取 deconvolution dilation 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetDeconvolutionDilation64()
Returns
GetDeconvolutionGroups()
Gets the Deconvolution Groups value. 获取 Deconvolution Groups 值。
public int GetDeconvolutionGroups()
Returns
GetDeconvolutionKernelSize()
Gets the Deconvolution Kernel Size value. 获取 Deconvolution Kernel Size 值。
public TensorRtDims GetDeconvolutionKernelSize()
Returns
GetDeconvolutionKernelSize64()
Gets deconvolution kernel dimensions with TensorRT 11 64-bit extents. 获取 deconvolution kernel 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetDeconvolutionKernelSize64()
Returns
GetDeconvolutionKernelWeightsInfo()
Gets metadata for the kernel weights of a TensorRT deconvolution layer. 获取 TensorRT deconvolution 层 kernel 权重的元数据。
public TensorRtWeightsInfo GetDeconvolutionKernelWeightsInfo()
Returns
GetDeconvolutionOutputMaps()
Gets the Deconvolution Output Maps value. 获取 Deconvolution Output Maps 值。
public int GetDeconvolutionOutputMaps()
Returns
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
GetDeconvolutionPostPadding()
Gets the Deconvolution Post Padding value. 获取 Deconvolution Post Padding 值。
public TensorRtDims GetDeconvolutionPostPadding()
Returns
GetDeconvolutionPostPadding64()
Gets deconvolution post-padding dimensions with TensorRT 11 64-bit extents. 获取 deconvolution post-padding 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetDeconvolutionPostPadding64()
Returns
GetDeconvolutionPrePadding()
Gets the Deconvolution Pre Padding value. 获取 Deconvolution Pre Padding 值。
public TensorRtDims GetDeconvolutionPrePadding()
Returns
GetDeconvolutionPrePadding64()
Gets deconvolution pre-padding dimensions with TensorRT 11 64-bit extents. 获取 deconvolution pre-padding 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetDeconvolutionPrePadding64()
Returns
GetDeconvolutionStride()
Gets the Deconvolution Stride value. 获取 Deconvolution Stride 值。
public TensorRtDims GetDeconvolutionStride()
Returns
GetDeconvolutionStride64()
Gets deconvolution stride dimensions with TensorRT 11 64-bit extents. 获取 deconvolution stride 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetDeconvolutionStride64()
Returns
GetDequantizeAxis()
Gets the Dequantize Axis value. 获取 Dequantize Axis 值。
public int GetDequantizeAxis()
Returns
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
GetDynamicQuantizeAxis()
Gets the compatibility quantization axis of a TensorRT 10/11 dynamic-quantize layer. 获取 TensorRT 10 dynamic-quantize 层的量化 axis。
public int GetDynamicQuantizeAxis()
Returns
GetDynamicQuantizeBlockShape()
Gets the quantization block shape of a dynamic-quantize layer. 获取 dynamic-quantize 层的量化 block shape。
public TensorRtDims GetDynamicQuantizeBlockShape()
Returns
GetDynamicQuantizeBlockShape64()
Gets dynamic-quantize block shape with TensorRT 11 64-bit extents. 获取 dynamic-quantize block shape,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetDynamicQuantizeBlockShape64()
Returns
GetDynamicQuantizeBlockSize()
Gets the compatibility block size of a TensorRT 10/11 dynamic-quantize layer. 获取 TensorRT 10 dynamic-quantize 层的 block size。
public int GetDynamicQuantizeBlockSize()
Returns
GetDynamicQuantizeScaleType()
Gets the scale tensor data type of a dynamic-quantize layer. 获取 dynamic-quantize 层的 scale 张量数据类型。
public TensorRtDataType GetDynamicQuantizeScaleType()
Returns
GetDynamicQuantizeToType()
Gets the output data type of a dynamic-quantize layer. 获取 dynamic-quantize 层的输出数据类型。
public TensorRtDataType GetDynamicQuantizeToType()
Returns
GetEinsumEquation()
Gets the equation string from a TensorRT einsum layer. 获取 TensorRT einsum 层的方程字符串。
public string GetEinsumEquation()
Returns
GetElementWiseOperation()
Gets the Element Wise Operation value. 获取 Element Wise Operation 值。
public TensorRtElementWiseOperation GetElementWiseOperation()
Returns
GetFillAlpha()
Gets the Fill Alpha value. 获取 Fill Alpha 值。
public double GetFillAlpha()
Returns
GetFillAlphaInt64()
Gets the int64 alpha value of a TensorRT fill layer. 获取 TensorRT fill 层的 int64 alpha 值。
public long GetFillAlphaInt64()
Returns
GetFillBeta()
Gets the Fill Beta value. 获取 Fill Beta 值。
public double GetFillBeta()
Returns
GetFillBetaInt64()
Gets the int64 beta value of a TensorRT fill layer. 获取 TensorRT fill 层的 int64 beta 值。
public long GetFillBetaInt64()
Returns
GetFillDimensions()
Gets the Fill Dimensions value. 获取 Fill Dimensions 值。
public TensorRtDims GetFillDimensions()
Returns
GetFillDimensions64()
Gets fill dimensions with TensorRT 11 64-bit extents. 获取 fill 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetFillDimensions64()
Returns
GetFillOperation()
Gets the Fill Operation value. 获取 Fill Operation 值。
public TensorRtFillOperation GetFillOperation()
Returns
GetFillToType()
Gets the output type of a TensorRT 11 fill layer. 获取 TensorRT 11 fill 层的输出类型。
public TensorRtDataType GetFillToType()
Returns
GetGatherAxis()
Gets the Gather Axis value. 获取 Gather Axis 值。
public int GetGatherAxis()
Returns
GetGatherElementWiseDimensions()
Gets the number of elementwise dimensions used by a gather layer. 获取 gather 层使用的 elementwise 维度数量。
public int GetGatherElementWiseDimensions()
Returns
GetGatherMode()
Gets the TensorRT gather mode. 获取 TensorRT gather 层模式。
public TensorRtGatherMode GetGatherMode()
Returns
GetGridSampleAlignCorners()
Gets whether a grid-sample layer aligns corners. 获取 grid-sample 层是否对齐角点。
public bool GetGridSampleAlignCorners()
Returns
GetGridSampleInterpolationMode()
Gets the interpolation mode of a grid-sample layer. 获取 grid-sample 层的插值模式。
public TensorRtInterpolationMode GetGridSampleInterpolationMode()
Returns
GetGridSampleMode()
Gets the out-of-bounds sample mode of a grid-sample layer. 获取 grid-sample 层的越界采样模式。
public TensorRtSampleMode GetGridSampleMode()
Returns
GetIfConditionalBoundaryName()
Gets the name of the if-conditional that owns this conditional-boundary layer. 获取拥有此 conditional-boundary 层的 if-conditional 名称。
public string GetIfConditionalBoundaryName()
Returns
GetInput(int)
Gets the Input value. 获取 Input 值。
public TensorRtTensor GetInput(int index)
Parameters
indexint
Returns
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
Returns
GetInputTensorMetadata(int)
Gets a deployment diagnostic snapshot for one TensorRT layer input tensor slot. 获取 TensorRT layer 指定输入 tensor 槽位的部署诊断快照。
public TensorRtLayerTensorMetadata GetInputTensorMetadata(int index)
Parameters
indexintThe 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
indexint
Returns
GetInputTensorSummary(int)
Gets the compact native diagnostic summary for one input tensor slot. 获取指定输入 tensor 槽位的原生紧凑诊断摘要。
public string GetInputTensorSummary(int index)
Parameters
indexintThe 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
GetIteratorReverse()
Gets whether an iterator layer iterates in reverse order. 获取 iterator 层是否按反向顺序迭代。
public bool GetIteratorReverse()
Returns
GetKvCacheUpdateForm()
Gets the update form of a TensorRT 11 KV-cache update layer. 获取 TensorRT 11 KV-cache update 层的 update form。
public TensorRtAttentionIoForm GetKvCacheUpdateForm()
Returns
GetKvCacheUpdateMode()
Gets the cache mode of a TensorRT 11 KV-cache update layer. 获取 TensorRT 11 KV-cache update 层的 cache mode。
public TensorRtKvCacheMode GetKvCacheUpdateMode()
Returns
GetLoopBoundaryLoopName()
Gets the name of the loop that owns this loop-boundary layer. 获取拥有此 loop-boundary 层的 loop 名称。
public string GetLoopBoundaryLoopName()
Returns
GetLoopOutputAxis()
Gets the loop-output concatenation axis. 获取 loop-output 的拼接轴。
public int GetLoopOutputAxis()
Returns
GetLoopOutputKind()
Gets the loop-output layer output kind. 获取 loop-output 层的输出类型。
public TensorRtLoopOutputKind GetLoopOutputKind()
Returns
GetLrnAlpha()
Gets the Lrn Alpha value. 获取 Lrn Alpha 值。
public float GetLrnAlpha()
Returns
GetLrnBeta()
Gets the Lrn Beta value. 获取 Lrn Beta 值。
public float GetLrnBeta()
Returns
GetLrnK()
Gets the Lrn K value. 获取 Lrn K 值。
public float GetLrnK()
Returns
GetLrnWindowSize()
Gets the Lrn Window Size value. 获取 Lrn Window Size 值。
public int GetLrnWindowSize()
Returns
GetMatrixMultiplyOperation(int)
Gets the Matrix Multiply Operation value. 获取 Matrix Multiply Operation 值。
public TensorRtMatrixOperation GetMatrixMultiplyOperation(int inputIndex)
Parameters
inputIndexint
Returns
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
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
GetMoEQuantizationBlockShape()
Gets the quantization block shape used for the MoE mul output. 获取 MoE mul 输出使用的量化 block shape。
public TensorRtDims GetMoEQuantizationBlockShape()
Returns
GetMoEQuantizationToType()
Gets the quantized type used for the MoE mul output. 获取 MoE mul 输出使用的量化类型。
public TensorRtDataType GetMoEQuantizationToType()
Returns
GetMoESwigluAlpha()
Gets the SwiGLU alpha parameter from a TensorRT 11 MoE layer. 获取 TensorRT 11 MoE 层的 SwiGLU alpha 参数。
public float GetMoESwigluAlpha()
Returns
GetMoESwigluBeta()
Gets the SwiGLU beta parameter from a TensorRT 11 MoE layer. 获取 TensorRT 11 MoE 层的 SwiGLU beta 参数。
public float GetMoESwigluBeta()
Returns
GetMoESwigluLimit()
Gets the SwiGLU limit parameter from a TensorRT 11 MoE layer. 获取 TensorRT 11 MoE 层的 SwiGLU limit 参数。
public float GetMoESwigluLimit()
Returns
GetNmsBoundingBoxFormat()
Gets the bounding-box format used by an NMS layer. 获取 NMS 层使用的边界框格式。
public TensorRtBoundingBoxFormat GetNmsBoundingBoxFormat()
Returns
GetNmsIndicesType()
Gets the indices output type for an NMS layer. 获取 NMS 层索引输出的数据类型。
public TensorRtDataType GetNmsIndicesType()
Returns
GetNmsTopKBoxLimit()
Gets the NMS TopK box limit. 获取 NMS TopK 候选框数量限制。
public int GetNmsTopKBoxLimit()
Returns
GetNonZeroIndicesType()
Gets the indices output type for a NonZero layer. 获取 NonZero 层索引输出的数据类型。
public TensorRtDataType GetNonZeroIndicesType()
Returns
GetNormalizationAxes()
Gets the axes bitmask of a normalization layer. 获取 normalization 层的 axes 位掩码。
public uint GetNormalizationAxes()
Returns
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
GetNormalizationGroupCount()
Gets the group count of a normalization layer. 获取 normalization 层的分组数量。
public long GetNormalizationGroupCount()
Returns
GetOneHotAxis()
Gets the axis used by a one-hot layer. 获取 one-hot 层使用的轴。
public int GetOneHotAxis()
Returns
GetOutput(int)
Gets the Output value. 获取 Output 值。
public TensorRtTensor GetOutput(int index)
Parameters
indexint
Returns
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
Returns
GetOutputTensorMetadata(int)
Gets a deployment diagnostic snapshot for one TensorRT layer output tensor slot. 获取 TensorRT layer 指定输出 tensor 槽位的部署诊断快照。
public TensorRtLayerTensorMetadata GetOutputTensorMetadata(int index)
Parameters
indexintThe 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
indexint
Returns
GetOutputTensorSummary(int)
Gets the compact native diagnostic summary for one output tensor slot. 获取指定输出 tensor 槽位的原生紧凑诊断摘要。
public string GetOutputTensorSummary(int index)
Parameters
indexintThe 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
indexint
Returns
GetPaddingPostPadding()
Gets the Padding Post Padding value. 获取 Padding Post Padding 值。
public TensorRtDims GetPaddingPostPadding()
Returns
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
GetPaddingPrePadding()
Gets the Padding Pre Padding value. 获取 Padding Pre Padding 值。
public TensorRtDims GetPaddingPrePadding()
Returns
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
GetPoolingAverageCountExcludesPadding()
Gets the Pooling Average Count Excludes Padding value. 获取 Pooling Average Count Excludes Padding 值。
public bool GetPoolingAverageCountExcludesPadding()
Returns
GetPoolingBlendFactor()
Gets the Pooling Blend Factor value. 获取 Pooling Blend Factor 值。
public double GetPoolingBlendFactor()
Returns
GetPoolingPadding()
Gets the Pooling Padding value. 获取 Pooling Padding 值。
public TensorRtDims GetPoolingPadding()
Returns
GetPoolingPadding64()
Gets pooling padding dimensions with TensorRT 11 64-bit extents. 获取 pooling padding 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetPoolingPadding64()
Returns
GetPoolingPaddingMode()
Gets the Pooling Padding Mode value. 获取 Pooling Padding Mode 值。
public TensorRtPaddingMode GetPoolingPaddingMode()
Returns
GetPoolingPostPadding()
Gets the Pooling Post Padding value. 获取 Pooling Post Padding 值。
public TensorRtDims GetPoolingPostPadding()
Returns
GetPoolingPostPadding64()
Gets pooling post-padding dimensions with TensorRT 11 64-bit extents. 获取 pooling post-padding 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetPoolingPostPadding64()
Returns
GetPoolingPrePadding()
Gets the Pooling Pre Padding value. 获取 Pooling Pre Padding 值。
public TensorRtDims GetPoolingPrePadding()
Returns
GetPoolingPrePadding64()
Gets pooling pre-padding dimensions with TensorRT 11 64-bit extents. 获取 pooling pre-padding 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetPoolingPrePadding64()
Returns
GetPoolingStride()
Gets the Pooling Stride value. 获取 Pooling Stride 值。
public TensorRtDims GetPoolingStride()
Returns
GetPoolingStride64()
Gets pooling stride dimensions with TensorRT 11 64-bit extents. 获取 pooling stride 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetPoolingStride64()
Returns
GetPoolingType()
Gets the Pooling Type value. 获取 Pooling Type 值。
public TensorRtPoolingType GetPoolingType()
Returns
GetPoolingWindowSize()
Gets the Pooling Window Size value. 获取 Pooling Window Size 值。
public TensorRtDims GetPoolingWindowSize()
Returns
GetPoolingWindowSize64()
Gets pooling window dimensions with TensorRT 11 64-bit extents. 获取 pooling window 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetPoolingWindowSize64()
Returns
GetQuantizeAxis()
Gets the Quantize Axis value. 获取 Quantize Axis 值。
public int GetQuantizeAxis()
Returns
GetRankCount()
Gets the multi-rank execution hint count configured on the layer. 获取层上配置的多 rank 执行提示数量。
public int GetRankCount()
Returns
GetReduceAxes()
Gets the Reduce Axes value. 获取 Reduce Axes 值。
public uint GetReduceAxes()
Returns
GetReduceKeepDimensions()
Gets the Reduce Keep Dimensions value. 获取 Reduce Keep Dimensions 值。
public bool GetReduceKeepDimensions()
Returns
GetReduceOperation()
Gets the Reduce Operation value. 获取 Reduce Operation 值。
public TensorRtReduceOperation GetReduceOperation()
Returns
GetResizeAlignCorners()
Gets the TensorRT 8 resize align-corners flag. 获取 TensorRT 8 resize 层的 align-corners 标志。
public bool GetResizeAlignCorners()
Returns
- bool
truewhen corner alignment is enabled. 启用 corner alignment 时返回true。
GetResizeCoordinateTransformation()
Gets the Resize Coordinate Transformation value. 获取 Resize Coordinate Transformation 值。
public TensorRtResizeCoordinateTransformation GetResizeCoordinateTransformation()
Returns
GetResizeCubicCoefficient()
Gets the Resize Cubic Coefficient value. 获取 Resize Cubic Coefficient 值。
public double GetResizeCubicCoefficient()
Returns
GetResizeExcludeOutside()
Gets the Resize Exclude Outside value. 获取 Resize Exclude Outside 值。
public bool GetResizeExcludeOutside()
Returns
GetResizeMode()
Gets the Resize Mode value. 获取 Resize Mode 值。
public TensorRtResizeMode GetResizeMode()
Returns
GetResizeNearestRounding()
Gets the Resize Nearest Rounding value. 获取 Resize Nearest Rounding 值。
public TensorRtResizeRoundMode GetResizeNearestRounding()
Returns
GetResizeOutputDimensions()
Gets the Resize Output Dimensions value. 获取 Resize Output Dimensions 值。
public TensorRtDims GetResizeOutputDimensions()
Returns
GetResizeOutputDimensions64()
Gets resize output dimensions with TensorRT 11 64-bit extents. 获取 resize output 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetResizeOutputDimensions64()
Returns
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
GetReverseSequenceBatchAxis()
Gets the batch axis configured on a ReverseSequence layer. 获取 ReverseSequence 层配置的 batch 轴。
public int GetReverseSequenceBatchAxis()
Returns
GetReverseSequenceSequenceAxis()
Gets the sequence axis configured on a ReverseSequence layer. 获取 ReverseSequence 层配置的 sequence 轴。
public int GetReverseSequenceSequenceAxis()
Returns
GetRotaryEmbeddingDimension()
Gets the rotary embedding dimension configured on a TensorRT 11 rotary-embedding layer. 获取 TensorRT 11 rotary-embedding 层配置的 rotary embedding 维度。
public int GetRotaryEmbeddingDimension()
Returns
GetRotaryEmbeddingInterleaved()
Gets whether a TensorRT 11 rotary-embedding layer uses interleaved RoPE layout. 获取 TensorRT 11 rotary-embedding 层是否使用 interleaved RoPE 布局。
public bool GetRotaryEmbeddingInterleaved()
Returns
GetScaleChannelAxis()
Gets the Scale Channel Axis value. 获取 Scale Channel Axis 值。
public int GetScaleChannelAxis()
Returns
GetScaleMode()
Gets the Scale Mode value. 获取 Scale Mode 值。
public TensorRtScaleMode GetScaleMode()
Returns
GetScalePowerWeightsInfo()
Gets metadata for the power weights of a TensorRT scale layer. 获取 TensorRT scale 层 power 权重的元数据。
public TensorRtWeightsInfo GetScalePowerWeightsInfo()
Returns
GetScaleScaleWeightsInfo()
Gets metadata for the scale weights of a TensorRT scale layer. 获取 TensorRT scale 层 scale 权重的元数据。
public TensorRtWeightsInfo GetScaleScaleWeightsInfo()
Returns
GetScaleShiftWeightsInfo()
Gets metadata for the shift weights of a TensorRT scale layer. 获取 TensorRT scale 层 shift 权重的元数据。
public TensorRtWeightsInfo GetScaleShiftWeightsInfo()
Returns
GetScatterAxis()
Gets the axis used by a scatter layer in element mode. 获取 scatter 层在 element 模式下使用的轴。
public int GetScatterAxis()
Returns
GetScatterMode()
Gets the TensorRT scatter mode. 获取 TensorRT scatter 层模式。
public TensorRtScatterMode GetScatterMode()
Returns
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
GetShuffleReshapeDimensions64()
Gets shuffle reshape dimensions with TensorRT 11 64-bit extents. 获取 shuffle reshape 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetShuffleReshapeDimensions64()
Returns
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
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
GetSliceSize()
Gets the Slice Size value. 获取 Slice Size 值。
public TensorRtDims GetSliceSize()
Returns
GetSliceSize64()
Gets slice size dimensions with TensorRT 11 64-bit extents. 获取 slice size 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetSliceSize64()
Returns
GetSliceStart()
Gets the Slice Start value. 获取 Slice Start 值。
public TensorRtDims GetSliceStart()
Returns
GetSliceStart64()
Gets slice start dimensions with TensorRT 11 64-bit extents. 获取 slice start 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetSliceStart64()
Returns
GetSliceStride()
Gets the Slice Stride value. 获取 Slice Stride 值。
public TensorRtDims GetSliceStride()
Returns
GetSliceStride64()
Gets slice stride dimensions with TensorRT 11 64-bit extents. 获取 slice stride 维度,并保留 TensorRT 11 的 64 位 extent。
public TensorRtDims64 GetSliceStride64()
Returns
GetSoftMaxAxes()
Gets the Soft Max Axes value. 获取 Soft Max Axes 值。
public uint GetSoftMaxAxes()
Returns
GetTopKAxes()
Gets the Top K Axes value. 获取 Top K Axes 值。
public uint GetTopKAxes()
Returns
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
GetTopKValue()
Gets the Top K Value value. 获取 Top K Value 值。
public int GetTopKValue()
Returns
GetTripLimitKind()
Gets the trip-limit kind for a trip-limit layer. 获取 trip-limit 层的限制方式。
public TensorRtTripLimitKind GetTripLimitKind()
Returns
GetUnaryOperation()
Gets the Unary Operation value. 获取 Unary Operation 值。
public TensorRtUnaryOperation GetUnaryOperation()
Returns
HasInputTensor(int)
Gets whether the specified TensorRT layer input slot contains a tensor. 获取指定 TensorRT layer 输入槽位是否包含 tensor。
public bool HasInputTensor(int index)
Parameters
indexintThe zero-based input slot index. 从零开始的输入槽位索引。
Returns
- bool
truewhen 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
indexintThe zero-based output slot index. 从零开始的输出槽位索引。
Returns
- bool
truewhen 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
IsNormalizationV2()
Gets whether a normalization layer is a TensorRT V2 normalization layer. 获取 normalization 层是否为 TensorRT V2 normalization 层。
public bool IsNormalizationV2()
Returns
IsOutputTypeSet(int)
Checks whether Output Type Set is true. 检查 Output Type Set 是否为 true。
public bool IsOutputTypeSet(int index)
Parameters
indexint
Returns
ResetOutputType(int)
Resets the Output Type setting. 重置 Output Type 设置。
public void ResetOutputType(int index)
Parameters
indexint
ResetPrecision()
Resets the Precision setting. 重置 Precision 设置。
public void ResetPrecision()
SetActivationAlpha(double)
Sets the Activation Alpha value. 设置 Activation Alpha 值。
public void SetActivationAlpha(double alpha)
Parameters
alphadouble
SetActivationBeta(double)
Sets the Activation Beta value. 设置 Activation Beta 值。
public void SetActivationBeta(double beta)
Parameters
betadouble
SetActivationType(TensorRtActivationType)
Sets the Activation Type value. 设置 Activation Type 值。
public void SetActivationType(TensorRtActivationType activationType)
Parameters
activationTypeTensorRtActivationType
SetAssertionMessage(string)
Sets the assertion message. 设置 assertion 层的断言消息。
public void SetAssertionMessage(string message)
Parameters
messagestring
SetCastToType(TensorRtDataType)
Sets the output data type for a Cast layer. 设置 Cast 层的输出数据类型。
public void SetCastToType(TensorRtDataType dataType)
Parameters
dataTypeTensorRtDataTypeDestination data type. / 目标数据类型。
SetConcatenationAxis(int)
Sets the Concatenation Axis value. 设置 Concatenation Axis 值。
public void SetConcatenationAxis(int axis)
Parameters
axisint
SetConstantLayerDimensions(TensorRtDims)
Sets the dimensions stored on a TensorRT constant layer. 设置 TensorRT constant 层中保存的常量维度。
public void SetConstantLayerDimensions(TensorRtDims dimensions)
Parameters
dimensionsTensorRtDimsThe constant dimensions. 常量维度。
SetConvolutionDilation(TensorRtDims)
Sets the Convolution Dilation value. 设置 Convolution Dilation 值。
public void SetConvolutionDilation(TensorRtDims dilation)
Parameters
dilationTensorRtDims
SetConvolutionGroups(int)
Sets the Convolution Groups value. 设置 Convolution Groups 值。
public void SetConvolutionGroups(int groups)
Parameters
groupsint
SetConvolutionOutputMaps(int)
Sets the Convolution Output Maps value. 设置 Convolution Output Maps 值。
public void SetConvolutionOutputMaps(int outputMaps)
Parameters
outputMapsint
SetConvolutionPadding(TensorRtDims)
Sets the explicit N-D padding of a convolution layer. 设置 convolution 层的显式 N-D padding。
public void SetConvolutionPadding(TensorRtDims padding)
Parameters
paddingTensorRtDimsThe padding dimensions to apply. 要应用的 padding 维度。
SetConvolutionPaddingMode(TensorRtPaddingMode)
Sets the Convolution Padding Mode value. 设置 Convolution Padding Mode 值。
public void SetConvolutionPaddingMode(TensorRtPaddingMode paddingMode)
Parameters
paddingModeTensorRtPaddingMode
SetConvolutionPostPadding(TensorRtDims)
Sets the Convolution Post Padding value. 设置 Convolution Post Padding 值。
public void SetConvolutionPostPadding(TensorRtDims padding)
Parameters
paddingTensorRtDims
SetConvolutionPrePadding(TensorRtDims)
Sets the Convolution Pre Padding value. 设置 Convolution Pre Padding 值。
public void SetConvolutionPrePadding(TensorRtDims padding)
Parameters
paddingTensorRtDims
SetConvolutionStride(TensorRtDims)
Sets the Convolution Stride value. 设置 Convolution Stride 值。
public void SetConvolutionStride(TensorRtDims stride)
Parameters
strideTensorRtDims
SetCumulativeExclusive(bool)
Sets whether the cumulative layer uses exclusive accumulation. 设置 cumulative 层是否使用 exclusive 累计。
public void SetCumulativeExclusive(bool exclusive)
Parameters
exclusivebool
SetCumulativeOperation(TensorRtCumulativeOperation)
Sets the cumulative operation. 设置 cumulative 层的累计运算类型。
public void SetCumulativeOperation(TensorRtCumulativeOperation operation)
Parameters
operationTensorRtCumulativeOperation
SetCumulativeReverse(bool)
Sets whether the cumulative layer accumulates in reverse order. 设置 cumulative 层是否按反向顺序累计。
public void SetCumulativeReverse(bool reverse)
Parameters
reversebool
SetDeconvolutionDilation(TensorRtDims)
Sets the Deconvolution Dilation value. 设置 Deconvolution Dilation 值。
public void SetDeconvolutionDilation(TensorRtDims dilation)
Parameters
dilationTensorRtDims
SetDeconvolutionGroups(int)
Sets the Deconvolution Groups value. 设置 Deconvolution Groups 值。
public void SetDeconvolutionGroups(int groups)
Parameters
groupsint
SetDeconvolutionKernelSize(TensorRtDims)
Sets the Deconvolution Kernel Size value. 设置 Deconvolution Kernel Size 值。
public void SetDeconvolutionKernelSize(TensorRtDims kernelSize)
Parameters
kernelSizeTensorRtDims
SetDeconvolutionOutputMaps(int)
Sets the Deconvolution Output Maps value. 设置 Deconvolution Output Maps 值。
public void SetDeconvolutionOutputMaps(int outputMaps)
Parameters
outputMapsint
SetDeconvolutionPadding(TensorRtDims)
Sets the explicit N-D padding of a deconvolution layer. 设置 deconvolution 层的显式 N-D padding。
public void SetDeconvolutionPadding(TensorRtDims padding)
Parameters
paddingTensorRtDimsThe padding dimensions to apply. 要应用的 padding 维度。
SetDeconvolutionPaddingMode(TensorRtPaddingMode)
Sets the Deconvolution Padding Mode value. 设置 Deconvolution Padding Mode 值。
public void SetDeconvolutionPaddingMode(TensorRtPaddingMode paddingMode)
Parameters
paddingModeTensorRtPaddingMode
SetDeconvolutionPostPadding(TensorRtDims)
Sets the Deconvolution Post Padding value. 设置 Deconvolution Post Padding 值。
public void SetDeconvolutionPostPadding(TensorRtDims padding)
Parameters
paddingTensorRtDims
SetDeconvolutionPrePadding(TensorRtDims)
Sets the Deconvolution Pre Padding value. 设置 Deconvolution Pre Padding 值。
public void SetDeconvolutionPrePadding(TensorRtDims padding)
Parameters
paddingTensorRtDims
SetDeconvolutionStride(TensorRtDims)
Sets the Deconvolution Stride value. 设置 Deconvolution Stride 值。
public void SetDeconvolutionStride(TensorRtDims stride)
Parameters
strideTensorRtDims
SetDequantizeAxis(int)
Sets the Dequantize Axis value. 设置 Dequantize Axis 值。
public void SetDequantizeAxis(int axis)
Parameters
axisint
SetDequantizeBlockShape(TensorRtDims)
Sets the TensorRT 11 quantization block shape on a dequantize layer. 设置 TensorRT 11 dequantize 层的量化 block shape。
public bool SetDequantizeBlockShape(TensorRtDims blockShape)
Parameters
blockShapeTensorRtDimsThe block shape dimensions to request. 请求设置的 block shape 维度。
Returns
- bool
truewhen TensorRT accepts the block shape; otherwisefalse. 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
dataTypeTensorRtDataType
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
axisint
SetDynamicQuantizeBlockShape(TensorRtDims)
Sets the quantization block shape of a dynamic-quantize layer. 设置 dynamic-quantize 层的量化 block shape。
public void SetDynamicQuantizeBlockShape(TensorRtDims blockShape)
Parameters
blockShapeTensorRtDims
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
blockSizeint
SetDynamicQuantizeScaleType(TensorRtDataType)
Sets the scale tensor data type of a dynamic-quantize layer. 设置 dynamic-quantize 层的 scale 张量数据类型。
public void SetDynamicQuantizeScaleType(TensorRtDataType dataType)
Parameters
dataTypeTensorRtDataType
SetDynamicQuantizeToType(TensorRtDataType)
Sets the output data type of a dynamic-quantize layer. 设置 dynamic-quantize 层的输出数据类型。
public void SetDynamicQuantizeToType(TensorRtDataType dataType)
Parameters
dataTypeTensorRtDataType
SetEinsumEquation(string)
Sets the equation string on a TensorRT einsum layer. 设置 TensorRT einsum 层的方程字符串。
public bool SetEinsumEquation(string equation)
Parameters
equationstringThe einsum equation, for example
"ij,jk->ik". Einsum 方程,例如"ij,jk->ik"。
Returns
SetElementWiseOperation(TensorRtElementWiseOperation)
Sets the Element Wise Operation value. 设置 Element Wise Operation 值。
public void SetElementWiseOperation(TensorRtElementWiseOperation operation)
Parameters
operationTensorRtElementWiseOperation
SetFillAlpha(double)
Sets the Fill Alpha value. 设置 Fill Alpha 值。
public void SetFillAlpha(double alpha)
Parameters
alphadouble
SetFillAlphaInt64(long)
Sets the int64 alpha value of a TensorRT fill layer. 设置 TensorRT fill 层的 int64 alpha 值。
public void SetFillAlphaInt64(long value)
Parameters
valuelong
SetFillBeta(double)
Sets the Fill Beta value. 设置 Fill Beta 值。
public void SetFillBeta(double beta)
Parameters
betadouble
SetFillBetaInt64(long)
Sets the int64 beta value of a TensorRT fill layer. 设置 TensorRT fill 层的 int64 beta 值。
public void SetFillBetaInt64(long value)
Parameters
valuelong
SetFillDimensions(TensorRtDims)
Sets the Fill Dimensions value. 设置 Fill Dimensions 值。
public void SetFillDimensions(TensorRtDims dimensions)
Parameters
dimensionsTensorRtDims
SetFillOperation(TensorRtFillOperation)
Sets the Fill Operation value. 设置 Fill Operation 值。
public void SetFillOperation(TensorRtFillOperation operation)
Parameters
operationTensorRtFillOperation
SetFillToType(TensorRtDataType)
Sets the output type of a TensorRT 11 fill layer. 设置 TensorRT 11 fill 层的输出类型。
public void SetFillToType(TensorRtDataType dataType)
Parameters
dataTypeTensorRtDataType
SetGatherAxis(int)
Sets the Gather Axis value. 设置 Gather Axis 值。
public void SetGatherAxis(int axis)
Parameters
axisint
SetGatherElementWiseDimensions(int)
Sets the number of elementwise dimensions used by a gather layer. 设置 gather 层使用的 elementwise 维度数量。
public void SetGatherElementWiseDimensions(int dimensions)
Parameters
dimensionsint
SetGatherMode(TensorRtGatherMode)
Sets the TensorRT gather mode. 设置 TensorRT gather 层模式。
public void SetGatherMode(TensorRtGatherMode mode)
Parameters
modeTensorRtGatherMode
SetGridSampleAlignCorners(bool)
Sets whether a grid-sample layer aligns corners. 设置 grid-sample 层是否对齐角点。
public void SetGridSampleAlignCorners(bool alignCorners)
Parameters
alignCornersbool
SetGridSampleInterpolationMode(TensorRtInterpolationMode)
Sets the interpolation mode of a grid-sample layer. 设置 grid-sample 层的插值模式。
public void SetGridSampleInterpolationMode(TensorRtInterpolationMode mode)
Parameters
SetGridSampleMode(TensorRtSampleMode)
Sets the out-of-bounds sample mode of a grid-sample layer. 设置 grid-sample 层的越界采样模式。
public void SetGridSampleMode(TensorRtSampleMode mode)
Parameters
modeTensorRtSampleMode
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
indexintInput index to replace, or the current input count to append. / 要替换的输入索引,或当前输入数量表示追加。
tensorTensorRtTensorTensor to assign. / 要设置的张量。
SetIteratorAxis(int)
Sets the iterator axis for an iterator layer. 设置 iterator 层的迭代轴。
public void SetIteratorAxis(int axis)
Parameters
axisintThe iterator axis. / 迭代轴。
SetIteratorReverse(bool)
Sets whether an iterator layer iterates in reverse order. 设置 iterator 层是否按反向顺序迭代。
public void SetIteratorReverse(bool reverse)
Parameters
reverseboolWhether 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
Returns
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
lengthsTensorRtTensor
Returns
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
modeTensorRtKvCacheMode
Returns
SetLoopOutputAxis(int)
Sets the loop-output concatenation axis. 设置 loop-output 的拼接轴。
public void SetLoopOutputAxis(int axis)
Parameters
axisintThe concatenation axis. / 拼接轴。
SetLrnAlpha(float)
Sets the Lrn Alpha value. 设置 Lrn Alpha 值。
public void SetLrnAlpha(float alpha)
Parameters
alphafloat
SetLrnBeta(float)
Sets the Lrn Beta value. 设置 Lrn Beta 值。
public void SetLrnBeta(float beta)
Parameters
betafloat
SetLrnK(float)
Sets the Lrn K value. 设置 Lrn K 值。
public void SetLrnK(float k)
Parameters
kfloat
SetLrnWindowSize(int)
Sets the Lrn Window Size value. 设置 Lrn Window Size 值。
public void SetLrnWindowSize(int windowSize)
Parameters
windowSizeint
SetMatrixMultiplyOperation(int, TensorRtMatrixOperation)
Sets the Matrix Multiply Operation value. 设置 Matrix Multiply Operation 值。
public void SetMatrixMultiplyOperation(int inputIndex, TensorRtMatrixOperation operation)
Parameters
inputIndexintoperationTensorRtMatrixOperation
SetMetadata(string)
Sets TensorRT layer metadata text. 设置 TensorRT 层的 metadata 文本。
public void SetMetadata(string metadata)
Parameters
metadatastringMetadata 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
activationTypeTensorRtMoEActivationType
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
dataTypeTensorRtDataType
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
fcGateBiasesTensorRtTensorfcUpBiasesTensorRtTensorfcDownBiasesTensorRtTensor
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
fcGateWeightsTensorRtTensorfcUpWeightsTensorRtTensorfcDownWeightsTensorRtTensoractivationTypeTensorRtMoEActivationType
SetMoEQuantizationBlockShape(TensorRtDims)
Sets the quantization block shape used for the MoE mul output. 设置 MoE mul 输出使用的量化 block shape。
public void SetMoEQuantizationBlockShape(TensorRtDims blockShape)
Parameters
blockShapeTensorRtDims
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
fcDownActivationDblQScaleTensorRtTensordataTypeTensorRtDataTypeblockShapeTensorRtDimsdynamicQuantizationOutputScaleTypeTensorRtDataType
SetMoEQuantizationStatic(TensorRtTensor, TensorRtDataType)
Configures static quantization after the MoE mul operation. 配置 MoE mul 操作后的静态量化。
public void SetMoEQuantizationStatic(TensorRtTensor fcDownActivationScale, TensorRtDataType dataType)
Parameters
fcDownActivationScaleTensorRtTensordataTypeTensorRtDataType
SetMoEQuantizationToType(TensorRtDataType)
Sets the quantized type used for the MoE mul output. 设置 MoE mul 输出使用的量化类型。
public void SetMoEQuantizationToType(TensorRtDataType dataType)
Parameters
dataTypeTensorRtDataType
SetMoESwigluAlpha(float)
Sets the SwiGLU alpha parameter on a TensorRT 11 MoE layer. 设置 TensorRT 11 MoE 层的 SwiGLU alpha 参数。
public void SetMoESwigluAlpha(float alpha)
Parameters
alphafloat
SetMoESwigluBeta(float)
Sets the SwiGLU beta parameter on a TensorRT 11 MoE layer. 设置 TensorRT 11 MoE 层的 SwiGLU beta 参数。
public void SetMoESwigluBeta(float beta)
Parameters
betafloat
SetMoESwigluLimit(float)
Sets the SwiGLU limit parameter on a TensorRT 11 MoE layer. 设置 TensorRT 11 MoE 层的 SwiGLU limit 参数。
public void SetMoESwigluLimit(float limit)
Parameters
limitfloat
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
SetNmsBoundingBoxFormat(TensorRtBoundingBoxFormat)
Sets the bounding-box format used by an NMS layer. 设置 NMS 层使用的边界框格式。
public void SetNmsBoundingBoxFormat(TensorRtBoundingBoxFormat format)
Parameters
formatTensorRtBoundingBoxFormatBounding-box coordinate format. / 边界框坐标格式。
SetNmsIndicesType(TensorRtDataType)
Sets the indices output type for an NMS layer. 设置 NMS 层索引输出的数据类型。
public bool SetNmsIndicesType(TensorRtDataType dataType)
Parameters
dataTypeTensorRtDataTypeIndices 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
tensorTensorRtTensorScalar IoU threshold tensor. / IoU 阈值标量张量。
SetNmsScoreThresholdTensor(TensorRtTensor)
Sets the optional score threshold tensor input for an NMS layer. 设置 NMS 层可选的分数阈值张量输入。
public void SetNmsScoreThresholdTensor(TensorRtTensor tensor)
Parameters
tensorTensorRtTensorScalar score threshold tensor. / 分数阈值标量张量。
SetNmsTopKBoxLimit(int)
Sets the NMS TopK box limit. 设置 NMS TopK 候选框数量限制。
public void SetNmsTopKBoxLimit(int limit)
Parameters
limitintPositive TopK limit. / 正数 TopK 限制。
SetNonZeroIndicesType(TensorRtDataType)
Sets the indices output type for a NonZero layer. 设置 NonZero 层索引输出的数据类型。
public bool SetNonZeroIndicesType(TensorRtDataType dataType)
Parameters
dataTypeTensorRtDataTypeIndices 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
axesuint
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
dataTypeTensorRtDataTypeThe compute precision data type. 计算精度的数据类型。
SetNormalizationEpsilon(double)
Sets the epsilon value of a normalization layer. 设置 normalization 层的 epsilon 参数。
public void SetNormalizationEpsilon(double epsilon)
Parameters
epsilondouble
SetNormalizationGroupCount(long)
Sets the group count of a normalization layer. 设置 normalization 层的分组数量。
public void SetNormalizationGroupCount(long groupCount)
Parameters
groupCountlong
SetOneHotAxis(int)
Sets the axis used by a one-hot layer. 设置 one-hot 层使用的轴。
public void SetOneHotAxis(int axis)
Parameters
axisint
SetOutputType(int, TensorRtDataType)
Sets the Output Type value. 设置 Output Type 值。
public void SetOutputType(int index, TensorRtDataType dataType)
Parameters
indexintdataTypeTensorRtDataType
SetPaddingPostPadding(TensorRtDims)
Sets the Padding Post Padding value. 设置 Padding Post Padding 值。
public void SetPaddingPostPadding(TensorRtDims padding)
Parameters
paddingTensorRtDims
SetPaddingPrePadding(TensorRtDims)
Sets the Padding Pre Padding value. 设置 Padding Pre Padding 值。
public void SetPaddingPrePadding(TensorRtDims padding)
Parameters
paddingTensorRtDims
SetPoolingAverageCountExcludesPadding(bool)
Sets the Pooling Average Count Excludes Padding value. 设置 Pooling Average Count Excludes Padding 值。
public void SetPoolingAverageCountExcludesPadding(bool excludesPadding)
Parameters
excludesPaddingbool
SetPoolingBlendFactor(double)
Sets the Pooling Blend Factor value. 设置 Pooling Blend Factor 值。
public void SetPoolingBlendFactor(double blendFactor)
Parameters
blendFactordouble
SetPoolingPadding(TensorRtDims)
Sets the Pooling Padding value. 设置 Pooling Padding 值。
public void SetPoolingPadding(TensorRtDims padding)
Parameters
paddingTensorRtDims
SetPoolingPaddingMode(TensorRtPaddingMode)
Sets the Pooling Padding Mode value. 设置 Pooling Padding Mode 值。
public void SetPoolingPaddingMode(TensorRtPaddingMode paddingMode)
Parameters
paddingModeTensorRtPaddingMode
SetPoolingPostPadding(TensorRtDims)
Sets the Pooling Post Padding value. 设置 Pooling Post Padding 值。
public void SetPoolingPostPadding(TensorRtDims padding)
Parameters
paddingTensorRtDims
SetPoolingPrePadding(TensorRtDims)
Sets the Pooling Pre Padding value. 设置 Pooling Pre Padding 值。
public void SetPoolingPrePadding(TensorRtDims padding)
Parameters
paddingTensorRtDims
SetPoolingStride(TensorRtDims)
Sets the Pooling Stride value. 设置 Pooling Stride 值。
public void SetPoolingStride(TensorRtDims stride)
Parameters
strideTensorRtDims
SetPoolingType(TensorRtPoolingType)
Sets the Pooling Type value. 设置 Pooling Type 值。
public void SetPoolingType(TensorRtPoolingType poolingType)
Parameters
poolingTypeTensorRtPoolingType
SetPoolingWindowSize(TensorRtDims)
Sets the Pooling Window Size value. 设置 Pooling Window Size 值。
public void SetPoolingWindowSize(TensorRtDims windowSize)
Parameters
windowSizeTensorRtDims
SetQuantizeAxis(int)
Sets the Quantize Axis value. 设置 Quantize Axis 值。
public void SetQuantizeAxis(int axis)
Parameters
axisint
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
rankCountintRank 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
axesuint
SetReduceKeepDimensions(bool)
Sets the Reduce Keep Dimensions value. 设置 Reduce Keep Dimensions 值。
public void SetReduceKeepDimensions(bool keepDimensions)
Parameters
keepDimensionsbool
SetReduceOperation(TensorRtReduceOperation)
Sets the Reduce Operation value. 设置 Reduce Operation 值。
public void SetReduceOperation(TensorRtReduceOperation operation)
Parameters
operationTensorRtReduceOperation
SetResizeAlignCorners(bool)
Sets the TensorRT 8 resize align-corners flag. 设置 TensorRT 8 resize 层的 align-corners 标志。
public void SetResizeAlignCorners(bool alignCorners)
Parameters
alignCornersboolWhether resize should align the corner pixels. resize 是否应对齐角点像素。
SetResizeCoordinateTransformation(TensorRtResizeCoordinateTransformation)
Sets the Resize Coordinate Transformation value. 设置 Resize Coordinate Transformation 值。
public void SetResizeCoordinateTransformation(TensorRtResizeCoordinateTransformation transformation)
Parameters
transformationTensorRtResizeCoordinateTransformation
SetResizeCubicCoefficient(double)
Sets the Resize Cubic Coefficient value. 设置 Resize Cubic Coefficient 值。
public void SetResizeCubicCoefficient(double value)
Parameters
valuedouble
SetResizeExcludeOutside(bool)
Sets the Resize Exclude Outside value. 设置 Resize Exclude Outside 值。
public void SetResizeExcludeOutside(bool value)
Parameters
valuebool
SetResizeMode(TensorRtResizeMode)
Sets the Resize Mode value. 设置 Resize Mode 值。
public void SetResizeMode(TensorRtResizeMode resizeMode)
Parameters
resizeModeTensorRtResizeMode
SetResizeNearestRounding(TensorRtResizeRoundMode)
Sets the Resize Nearest Rounding value. 设置 Resize Nearest Rounding 值。
public void SetResizeNearestRounding(TensorRtResizeRoundMode rounding)
Parameters
roundingTensorRtResizeRoundMode
SetResizeOutputDimensions(TensorRtDims)
Sets the Resize Output Dimensions value. 设置 Resize Output Dimensions 值。
public void SetResizeOutputDimensions(TensorRtDims dimensions)
Parameters
dimensionsTensorRtDims
SetResizeScales(float[])
Sets the Resize Scales value. 设置 Resize Scales 值。
public void SetResizeScales(float[] scales)
Parameters
scalesfloat[]
SetResizeSelectorForSinglePixel(TensorRtResizeSelector)
Sets the Resize Selector For Single Pixel value. 设置 Resize Selector For Single Pixel 值。
public void SetResizeSelectorForSinglePixel(TensorRtResizeSelector selector)
Parameters
selectorTensorRtResizeSelector
SetReverseSequenceBatchAxis(int)
Sets the batch axis configured on a ReverseSequence layer. 设置 ReverseSequence 层配置的 batch 轴。
public void SetReverseSequenceBatchAxis(int axis)
Parameters
axisintBatch axis. / batch 轴。
SetReverseSequenceSequenceAxis(int)
Sets the sequence axis configured on a ReverseSequence layer. 设置 ReverseSequence 层配置的 sequence 轴。
public void SetReverseSequenceSequenceAxis(int axis)
Parameters
axisintSequence axis. / sequence 轴。
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
rotaryEmbeddingDimensionint
Returns
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
interleavedbool
SetScaleChannelAxis(int)
Sets the Scale Channel Axis value. 设置 Scale Channel Axis 值。
public void SetScaleChannelAxis(int channelAxis)
Parameters
channelAxisint
SetScaleMode(TensorRtScaleMode)
Sets the Scale Mode value. 设置 Scale Mode 值。
public void SetScaleMode(TensorRtScaleMode mode)
Parameters
modeTensorRtScaleMode
SetScatterAxis(int)
Sets the axis used by a scatter layer in element mode. 设置 scatter 层在 element 模式下使用的轴。
public void SetScatterAxis(int axis)
Parameters
axisint
SetScatterMode(TensorRtScatterMode)
Sets the TensorRT scatter mode. 设置 TensorRT scatter 层模式。
public void SetScatterMode(TensorRtScatterMode mode)
Parameters
modeTensorRtScatterMode
SetShuffleFirstTranspose(TensorRtDims)
Sets the Shuffle layer permutation applied before reshaping. 设置 Shuffle 层在 reshape 之前应用的转置排列。
public void SetShuffleFirstTranspose(TensorRtDims permutation)
Parameters
permutationTensorRtDimsPermutation dimensions. 转置排列维度。
SetShuffleReshapeDimensions(TensorRtDims)
Sets the Shuffle Reshape Dimensions value. 设置 Shuffle Reshape Dimensions 值。
public void SetShuffleReshapeDimensions(TensorRtDims dims)
Parameters
dimsTensorRtDims
SetShuffleSecondTranspose(TensorRtDims)
Sets the Shuffle layer permutation applied after reshaping. 设置 Shuffle 层在 reshape 之后应用的转置排列。
public void SetShuffleSecondTranspose(TensorRtDims permutation)
Parameters
permutationTensorRtDimsPermutation dimensions. 转置排列维度。
SetShuffleZeroIsPlaceholder(bool)
Sets the Shuffle Zero Is Placeholder value. 设置 Shuffle Zero Is Placeholder 值。
public void SetShuffleZeroIsPlaceholder(bool zeroIsPlaceholder)
Parameters
zeroIsPlaceholderbool
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
axesTensorRtDimsThe axes dimensions to apply. 要应用的 axes 维度。
SetSliceMode(TensorRtSliceMode)
Sets the Slice Mode value. 设置 Slice Mode 值。
public void SetSliceMode(TensorRtSliceMode mode)
Parameters
modeTensorRtSliceMode
SetSliceSize(TensorRtDims)
Sets the Slice Size value. 设置 Slice Size 值。
public void SetSliceSize(TensorRtDims size)
Parameters
sizeTensorRtDims
SetSliceStart(TensorRtDims)
Sets the Slice Start value. 设置 Slice Start 值。
public void SetSliceStart(TensorRtDims start)
Parameters
startTensorRtDims
SetSliceStride(TensorRtDims)
Sets the Slice Stride value. 设置 Slice Stride 值。
public void SetSliceStride(TensorRtDims stride)
Parameters
strideTensorRtDims
SetSoftMaxAxes(uint)
Sets the Soft Max Axes value. 设置 Soft Max Axes 值。
public void SetSoftMaxAxes(uint axes)
Parameters
axesuint
SetTopKAxes(uint)
Sets the Top K Axes value. 设置 Top K Axes 值。
public void SetTopKAxes(uint axes)
Parameters
axesuint
SetTopKIndicesType(TensorRtDataType)
Sets the index output data type on a TensorRT 11 TopK layer. 设置 TensorRT 11 TopK 层索引输出的数据类型。
public bool SetTopKIndicesType(TensorRtDataType dataType)
Parameters
dataTypeTensorRtDataTypeThe requested indices data type. 请求设置的 indices 数据类型。
Returns
- bool
truewhen TensorRT accepts the value; otherwisefalse. TensorRT 接受该值时返回true,否则返回false。
SetTopKOperation(TensorRtTopKOperation)
Sets the Top K Operation value. 设置 Top K Operation 值。
public void SetTopKOperation(TensorRtTopKOperation operation)
Parameters
operationTensorRtTopKOperation
SetTopKValue(int)
Sets the Top K Value value. 设置 Top K Value 值。
public void SetTopKValue(int k)
Parameters
kint
SetUnaryOperation(TensorRtUnaryOperation)
Sets the Unary Operation value. 设置 Unary Operation 值。
public void SetUnaryOperation(TensorRtUnaryOperation operation)
Parameters
operationTensorRtUnaryOperation
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
lengthsTensorRtTensor