Table of Contents

Class CudaDeviceGraphMemoryInfo

Namespace
JYPPX.CudaSharp
Assembly
JYPPX.CudaSharp.dll

Captures graph-memory allocator counters for one CUDA device. 捕获单个 CUDA 设备的 graph memory 分配器计数。

public sealed class CudaDeviceGraphMemoryInfo
Inheritance
CudaDeviceGraphMemoryInfo
Inherited Members

Constructors

CudaDeviceGraphMemoryInfo(int, ulong, ulong, ulong, ulong)

Creates a CUDA graph-memory snapshot. 创建 CUDA graph memory 快照。

public CudaDeviceGraphMemoryInfo(int deviceOrdinal, ulong usedMemoryCurrentBytes, ulong usedMemoryHighBytes, ulong reservedMemoryCurrentBytes, ulong reservedMemoryHighBytes)

Parameters

deviceOrdinal int
usedMemoryCurrentBytes ulong
usedMemoryHighBytes ulong
reservedMemoryCurrentBytes ulong
reservedMemoryHighBytes ulong

Properties

DeviceOrdinal

Gets the CUDA device ordinal. 获取 CUDA 设备序号。

public int DeviceOrdinal { get; }

Property Value

int

ReservedMemoryCurrentBytes

Gets bytes currently reserved by the CUDA graphs asynchronous allocator. 获取 CUDA graphs 异步分配器当前保留的字节数。

public ulong ReservedMemoryCurrentBytes { get; }

Property Value

ulong

ReservedMemoryHighBytes

Gets the high watermark of reserved graph-memory bytes. 获取 graph memory 保留字节数的峰值。

public ulong ReservedMemoryHighBytes { get; }

Property Value

ulong

UsedMemoryCurrentBytes

Gets bytes currently associated with CUDA graphs. 获取当前与 CUDA graphs 关联的字节数。

public ulong UsedMemoryCurrentBytes { get; }

Property Value

ulong

UsedMemoryHighBytes

Gets the high watermark of bytes associated with CUDA graphs. 获取与 CUDA graphs 关联字节数的峰值。

public ulong UsedMemoryHighBytes { get; }

Property Value

ulong

Methods

ToString()

Returns a compact graph-memory diagnostic string. 返回紧凑的 graph memory 诊断字符串。

public override string ToString()

Returns

string

ToSummary()

Converts this graph-memory snapshot into a compact pointer-free summary. 将当前 graph memory 快照转换为紧凑、无指针逃逸的摘要。

public CudaDeviceGraphMemorySummary ToSummary()

Returns

CudaDeviceGraphMemorySummary

Remarks

This method only reads copied scalar counters returned by cudaDeviceGetGraphMemAttribute. It does not expose native graph-memory allocator pointers and does not promote local diagnostics to runtime or package-consumer proof. 该方法只读取 cudaDeviceGetGraphMemAttribute 返回的已复制标量计数;不会暴露原生 graph memory allocator 指针,也不会将本地诊断晋级为 runtime 或 package-consumer proof。