Table of Contents

Class TensorRtDebugListenerCallbackOwner

Namespace
JYPPX.TensorRtSharp
Assembly
JYPPX.TensorRtSharp.dll

Owns a TensorRT 10/11 debug-listener callback and its managed lifetime. 管理 TensorRT 10/11 debug-listener callback 及其托管生命周期。

public sealed class TensorRtDebugListenerCallbackOwner : IDisposable
Inheritance
TensorRtDebugListenerCallbackOwner
Implements
Inherited Members

Remarks

The line-and-handler constructor creates a native IDebugListener implementation. TensorRT-owned tensor data and the CUDA stream remain borrowed inside the native callback; only copied name/type/location/shape metadata reaches managed code. The parameterless constructor remains available for the repository's historical design diagnostics. 带版本线与 handler 的构造函数会创建真实 native IDebugListener 实现。TensorRT 拥有的 tensor 数据与 CUDA stream 始终留在 native callback 内,只把复制后的名称、类型、位置和 shape 元数据传到托管侧。无参构造函数继续供 仓库既有设计诊断使用。

Constructors

TensorRtDebugListenerCallbackOwner()

Creates a debug-listener callback owner design gate. 创建 debug-listener callback owner 设计门禁。

public TensorRtDebugListenerCallbackOwner()

TensorRtDebugListenerCallbackOwner(TensorRtApiLine, TensorRtDebugListenerHandler)

Creates a real TensorRT debug-listener callback owner. 创建真实 TensorRT debug-listener callback owner。

public TensorRtDebugListenerCallbackOwner(TensorRtApiLine line, TensorRtDebugListenerHandler handler)

Parameters

line TensorRtApiLine

TensorRT 10 or TensorRT 11. TensorRT 10 或 TensorRT 11。

handler TensorRtDebugListenerHandler

The managed copied-metadata handler. 托管复制元数据处理器。

Properties

HasNativeListener

Gets whether this instance owns a real native IDebugListener. 获取当前实例是否拥有真实 native IDebugListener。

public bool HasNativeListener { get; }

Property Value

bool

IsAttached

Gets whether this owner is attached to a TensorRT execution context. 获取该 owner 是否已绑定到 TensorRT execution context。

public bool IsAttached { get; }

Property Value

bool

IsDisposed

Gets whether dispose has been requested. 获取是否已请求释放。

public bool IsDisposed { get; }

Property Value

bool

RuntimeLine

Gets the runtime TensorRT line, or null for a design-only owner. 获取 runtime TensorRT 版本线;纯设计 owner 返回 null。

public TensorRtApiLine? RuntimeLine { get; }

Property Value

TensorRtApiLine?

Methods

Dispose()

Releases managed keep-alive handles owned by the design gate. 释放该设计门禁持有的托管 keep-alive 句柄。

public void Dispose()

~TensorRtDebugListenerCallbackOwner()

Releases an undisposed runtime callback owner. 释放未显式 Dispose 的 runtime callback owner。

protected ~TensorRtDebugListenerCallbackOwner()

GetRuntimeSnapshot()

Gets a pointer-free snapshot from the real native debug-listener owner. 获取真实 native debug-listener owner 的无指针快照。

public TensorRtDebugListenerRuntimeSnapshot GetRuntimeSnapshot()

Returns

TensorRtDebugListenerRuntimeSnapshot

GetSnapshot(string)

Gets a copied snapshot of the current design gate state. 获取当前设计门禁状态的复制快照。

public TensorRtDebugListenerCallbackOwnerSnapshot GetSnapshot(string operation = "snapshot")

Parameters

operation string

A copied operation label. 复制出的操作标签。

Returns

TensorRtDebugListenerCallbackOwnerSnapshot

A pointer-free copied diagnostic snapshot. 不含 pointer 的复制诊断快照。

RunDesignDiagnostic(TensorRtApiLine, TensorRtDebugListenerCallbackRequest)

Runs the debug-listener owner design diagnostic. 执行 debug-listener owner 设计诊断。

public TensorRtDebugListenerCallbackOwnerSnapshot RunDesignDiagnostic(TensorRtApiLine line, TensorRtDebugListenerCallbackRequest request)

Parameters

line TensorRtApiLine

The TensorRT API line represented by this diagnostic. 该诊断代表的 TensorRT API line。

request TensorRtDebugListenerCallbackRequest

The copied debug tensor diagnostic request. 复制出的 debug tensor 诊断请求。

Returns

TensorRtDebugListenerCallbackOwnerSnapshot

A pointer-free copied diagnostic snapshot. 不含 pointer 的复制诊断快照。