Table of Contents

Class TensorRtAllocatorLedgerSafetyGate

Namespace
JYPPX.TensorRtSharp
Assembly
JYPPX.TensorRtSharp.dll

Evaluates copied allocator owner ledger diagnostics before any real TensorRT allocator callback runtime proof. 在进入真实 TensorRT allocator callback runtime proof 之前,评估复制出的 allocator owner ledger 诊断。

public static class TensorRtAllocatorLedgerSafetyGate
Inheritance
TensorRtAllocatorLedgerSafetyGate
Inherited Members

Remarks

This gate combines the managed owner keep-alive prototype with the native owner state ledger dry-run. It never calls setGpuAllocator, never exposes a native owner handle, device pointer, or CUDA stream handle, and never proves that TensorRT invoked IGpuAllocator or IGpuAsyncAllocator callbacks. 该门禁组合托管 owner keep-alive prototype 与 native owner state ledger dry-run。它不会调用 setGpuAllocator,不会暴露 native owner handle、device pointer 或 CUDA stream handle,也不证明 TensorRT 已调用 IGpuAllocator 或 IGpuAsyncAllocator callback。

Methods

Evaluate(TensorRtAllocatorCallbackOwner, TensorRtApiLine, TensorRtAllocatorDryRunRequest, string, ulong)

Runs the allocator ledger safety gate using copied diagnostics only. 仅使用复制出的诊断运行 allocator ledger 安全门禁。

public static TensorRtAllocatorLedgerSafetyGateResult Evaluate(TensorRtAllocatorCallbackOwner owner, TensorRtApiLine line, TensorRtAllocatorDryRunRequest request, string targetKind = "IGpuAllocator", ulong streamValue = 0)

Parameters

owner TensorRtAllocatorCallbackOwner

The managed allocator callback owner. 托管 allocator callback owner。

line TensorRtApiLine

The TensorRT API line used for the native ledger dry-run. native ledger dry-run 使用的 TensorRT API line。

request TensorRtAllocatorDryRunRequest

The copied allocator request used by the diagnostic prototype. 诊断 prototype 使用的复制 allocator 请求。

targetKind string

The copied native owner target kind label. 复制的 native owner 目标类型标签。

streamValue ulong

The synthetic stream value copied into the ledger. 复制到 ledger 的合成 stream 值。

Returns

TensorRtAllocatorLedgerSafetyGateResult

A pointer-free safety gate result. 不含 pointer 的安全门禁结果。

GetSnapshot(TensorRtAllocatorCallbackOwner, TensorRtApiLine, string)

Copies the current managed owner lifecycle state for an explicit TensorRT API line. 为显式 TensorRT API 版本线复制当前托管 owner 生命周期状态。

public static TensorRtAllocatorLedgerSafetyGateResult GetSnapshot(TensorRtAllocatorCallbackOwner owner, TensorRtApiLine line, string operation = "snapshot")

Parameters

owner TensorRtAllocatorCallbackOwner

The managed allocator callback owner. 托管 allocator callback owner。

line TensorRtApiLine

The TensorRT API line represented by the snapshot. snapshot 表示的 TensorRT API 版本线。

operation string

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

Returns

TensorRtAllocatorLedgerSafetyGateResult

A pointer-free safety gate result with native ledger marked unavailable. native ledger 标为不可用的无 pointer 门禁结果。

GetSnapshot(TensorRtAllocatorCallbackOwner, string)

Copies the current managed owner lifecycle state without running native ledger diagnostics. 复制当前托管 owner 生命周期状态,不运行 native ledger 诊断。

public static TensorRtAllocatorLedgerSafetyGateResult GetSnapshot(TensorRtAllocatorCallbackOwner owner, string operation = "snapshot")

Parameters

owner TensorRtAllocatorCallbackOwner

The managed allocator callback owner. 托管 allocator callback owner。

operation string

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

Returns

TensorRtAllocatorLedgerSafetyGateResult

A pointer-free safety gate result with native ledger marked unavailable. native ledger 标为不可用的无 pointer 门禁结果。