Table of Contents

Class TensorRtRuntimeConfig

Namespace
JYPPX.TensorRtSharp
Assembly
JYPPX.TensorRtSharp.dll

Wraps TensorRT IRuntimeConfig for execution-context creation. 封装 TensorRT IRuntimeConfig,用于创建 execution context。

public sealed class TensorRtRuntimeConfig : IDisposable
Inheritance
TensorRtRuntimeConfig
Implements
Inherited Members

Remarks

This wrapper is currently supported for TensorRT 10 and TensorRT 11 runtime-config paths. 当前封装支持 TensorRT 10 和 TensorRT 11 的 runtime-config 路径。

Properties

AllocationStrategy

Gets or sets the execution-context allocation strategy. 获取或设置 execution context 的内存分配策略。

public TensorRtExecutionContextAllocationStrategy AllocationStrategy { get; set; }

Property Value

TensorRtExecutionContextAllocationStrategy

Line

Gets the TensorRT API line that owns this runtime config. 获取拥有当前 runtime config 的 TensorRT API 版本线。

public TensorRtApiLine Line { get; }

Property Value

TensorRtApiLine

Methods

Dispose()

Releases the native runtime config handle. 释放原生 runtime config 句柄。

public void Dispose()

ToSummary()

Gets a compact copied summary of this runtime config. 获取当前 runtime config 的紧凑复制型摘要。

public TensorRtRuntimeConfigSummary ToSummary()

Returns

TensorRtRuntimeConfigSummary

Remarks

This method reads scalar runtime-config state only. It does not expose the native config handle and does not promote runtime proof. 该方法只读取 runtime-config 标量状态;不暴露原生 config handle,也不会晋级 runtime proof。