Table of Contents

Class TensorRtPluginRegistryInventory

Namespace
JYPPX.TensorRtSharp
Assembly
JYPPX.TensorRtSharp.dll

Read-only snapshot of a TensorRT plugin registry. TensorRT plugin registry 的只读快照。

public sealed class TensorRtPluginRegistryInventory
Inheritance
TensorRtPluginRegistryInventory
Inherited Members

Properties

CreatorCount

Gets the number of plugin creators in the snapshot. 获取快照中的 plugin creator 数量。

public int CreatorCount { get; }

Property Value

int

Creators

Gets the plugin creators copied from the registry snapshot. 获取从 registry 快照复制出的 plugin creator 列表。

public IReadOnlyList<TensorRtPluginCreatorInfo> Creators { get; }

Property Value

IReadOnlyList<TensorRtPluginCreatorInfo>

HasErrorRecorder

Gets whether the registry has an error recorder. 获取 registry 是否绑定 error recorder。

public bool HasErrorRecorder { get; }

Property Value

bool

Line

Gets the TensorRT API line used to collect this inventory. 获取采集该 inventory 的 TensorRT API line。

public TensorRtApiLine Line { get; }

Property Value

TensorRtApiLine

ParentSearchEnabled

Gets whether parent registry search is enabled. 获取是否启用 parent registry search。

public bool ParentSearchEnabled { get; }

Property Value

bool

RecursiveCreatorCount

Gets the recursive creator count when the source supports a separate recursive query. 当 registry 来源支持单独递归查询时,获取递归 creator 数量。

public int? RecursiveCreatorCount { get; }

Property Value

int?

Source

Gets the registry source used to collect this inventory. 获取采集该 inventory 的 registry 来源。

public TensorRtPluginRegistrySource Source { get; }

Property Value

TensorRtPluginRegistrySource

Methods

FindCreator(string, string, string)

Finds the first creator in this managed snapshot matching the supplied identity. 在当前托管快照中查找第一个匹配给定标识的 creator。

public TensorRtPluginCreatorInfo? FindCreator(string pluginName, string pluginVersion, string pluginNamespace)

Parameters

pluginName string

The plugin creator name. plugin creator 名称。

pluginVersion string

The plugin creator version. plugin creator 版本。

pluginNamespace string

The plugin creator namespace. plugin creator 命名空间。

Returns

TensorRtPluginCreatorInfo

The matching creator metadata when found; otherwise null. 找到时返回匹配 creator 元数据,否则返回 null。

Remarks

This method only scans already-copied metadata. It does not call TensorRT, return native creator pointers, or change ownership. 该方法只扫描已经复制出的元数据;不会调用 TensorRT、返回 native creator 指针或改变所有权。

GetCreatorSummaries(int)

Returns pointer-free summaries for creators already copied into this managed snapshot. 返回当前托管快照中已复制 creator 的无指针摘要。

public IReadOnlyList<TensorRtPluginCreatorSummary> GetCreatorSummaries(int maxCreators = 2147483647)

Parameters

maxCreators int

Maximum number of creator summaries to return. 要返回的最大 creator 摘要数量。

Returns

IReadOnlyList<TensorRtPluginCreatorSummary>

Pointer-free creator summaries copied from the managed snapshot. 从托管快照复制出的无指针 creator 摘要。

Remarks

This method does not call TensorRT, expose native creator pointers, or copy plugin field data payloads. 该方法不会调用 TensorRT、暴露 native creator 指针,也不会复制 plugin 字段数据载荷。

GetDiagnostics()

Returns consistency diagnostics for metadata already copied into this managed snapshot. 返回当前托管快照中已复制元数据的一致性诊断。

public TensorRtPluginRegistryInventoryDiagnostics GetDiagnostics()

Returns

TensorRtPluginRegistryInventoryDiagnostics

Pointer-free consistency diagnostics for the copied inventory metadata. 已复制 inventory 元数据的无指针一致性诊断。

Remarks

This method only inspects already-copied metadata. It does not call TensorRT, expose native creator pointers, or copy plugin field data payloads. 该方法只检查已经复制出的元数据;不会调用 TensorRT、暴露 native creator 指针,也不会复制 plugin 字段数据载荷。

GetFieldSummaries(int, int)

Returns pointer-free field summaries for metadata already copied into this managed snapshot. 返回当前托管快照中已复制字段元数据的无指针摘要。

public IReadOnlyList<TensorRtPluginFieldSummary> GetFieldSummaries(int maxCreators = 2147483647, int maxFieldsPerCreator = 2147483647)

Parameters

maxCreators int

Maximum number of creators to scan. 要扫描的最大 creator 数量。

maxFieldsPerCreator int

Maximum number of fields to include for each creator. 每个 creator 最多包含的字段数量。

Returns

IReadOnlyList<TensorRtPluginFieldSummary>

Pointer-free field summaries copied from the managed snapshot. 从托管快照复制出的无指针字段摘要。

Remarks

This method scans the managed snapshot only. It does not call TensorRT, expose native creator pointers, or copy plugin field data payloads. 该方法只扫描托管快照;不会调用 TensorRT、暴露 native creator 指针,也不会复制 plugin 字段数据载荷。

ToString()

Returns a compact display string for the registry inventory. 返回该 registry inventory 的简短显示字符串。

public override string ToString()

Returns

string

A display string containing source, creator counts, and registry options. 包含来源、creator 数量和 registry 选项的显示字符串。

TryFindCreator(string, string, string, out TensorRtPluginCreatorInfo?)

Tries to find a creator in this managed snapshot matching the supplied identity. 尝试在当前托管快照中查找匹配给定标识的 creator。

public bool TryFindCreator(string pluginName, string pluginVersion, string pluginNamespace, out TensorRtPluginCreatorInfo? creator)

Parameters

pluginName string

The plugin creator name. plugin creator 名称。

pluginVersion string

The plugin creator version. plugin creator 版本。

pluginNamespace string

The plugin creator namespace. plugin creator 命名空间。

creator TensorRtPluginCreatorInfo

The matching creator metadata when found. 找到时返回匹配 creator 元数据。

Returns

bool

true when a matching creator exists in the snapshot. 快照中存在匹配 creator 时返回 true。

Remarks

This is a managed snapshot lookup. It does not expose borrowed TensorRT pointers or invoke plugin creation APIs. 这是托管快照查询;不会暴露 borrowed TensorRT 指针,也不会调用 plugin 创建 API。