Table of Contents

Class GpuMemoryInfo

Namespace
Orleans.GpuBridge.Abstractions.Models
Assembly
Orleans.GpuBridge.Abstractions.dll

Represents GPU memory information and statistics

[GenerateSerializer]
[Immutable]
public sealed record GpuMemoryInfo : IEquatable<GpuMemoryInfo>
Inheritance
GpuMemoryInfo
Implements
Inherited Members

Properties

AllocatedMemoryBytes

Gets the currently allocated memory on the GPU in bytes

[Id(1)]
public long AllocatedMemoryBytes { get; init; }

Property Value

long

BufferMemoryBytes

Gets the memory used by buffers in bytes

[Id(5)]
public long BufferMemoryBytes { get; init; }

Property Value

long

DeviceIndex

Gets the device index this memory info belongs to

[Id(10)]
public int DeviceIndex { get; init; }

Property Value

int

DeviceName

Gets the device name

[Id(11)]
public string DeviceName { get; init; }

Property Value

string

Empty

Creates an empty GpuMemoryInfo instance

public static GpuMemoryInfo Empty { get; }

Property Value

GpuMemoryInfo

FragmentationPercentage

Gets the memory fragmentation percentage (0-100)

[Id(7)]
public double FragmentationPercentage { get; init; }

Property Value

double

FreeMemoryBytes

Gets the free memory available on the GPU in bytes

[Id(2)]
public long FreeMemoryBytes { get; init; }

Property Value

long

PersistentKernelMemoryBytes

Gets the memory used by persistent kernels in bytes

[Id(4)]
public long PersistentKernelMemoryBytes { get; init; }

Property Value

long

ReservedMemoryBytes

Gets the reserved memory on the GPU in bytes

[Id(3)]
public long ReservedMemoryBytes { get; init; }

Property Value

long

TextureMemoryBytes

Gets the memory used by textures in bytes

[Id(6)]
public long TextureMemoryBytes { get; init; }

Property Value

long

Timestamp

Gets the timestamp when this information was captured

[Id(9)]
public DateTime Timestamp { get; init; }

Property Value

DateTime

TotalMemoryBytes

Gets the total memory available on the GPU in bytes

[Id(0)]
public long TotalMemoryBytes { get; init; }

Property Value

long

UtilizationPercentage

Gets the memory utilization percentage (0-100)

[Id(8)]
public double UtilizationPercentage { get; init; }

Property Value

double

Methods

Create(long, long, int, string)

Creates a new instance of GpuMemoryInfo with calculated derived values

public static GpuMemoryInfo Create(long totalBytes, long allocatedBytes, int deviceIndex = 0, string deviceName = "")

Parameters

totalBytes long
allocatedBytes long
deviceIndex int
deviceName string

Returns

GpuMemoryInfo