Table of Contents

Class GpuDeviceInfo

Namespace
LMKit.Hardware.Gpu
Assembly
LM-Kit.NET.dll

Represents information about a GPU device.

public class GpuDeviceInfo
Inheritance
GpuDeviceInfo
Inherited Members

Properties

CurrentProcessGpuMemoryUsedBytes

VRAM (in bytes) currently allocated on this device by the current OS process, as reported by NVML (nvmlDeviceGetComputeRunningProcesses_v3). Returns 0 when the value can't be obtained (non-CUDA backend, NVML unavailable, or this process has not allocated GPU memory on this device).

CurrentProcessGpuUtilizationPercent

GPU compute (SM) utilization attributable to the current OS process on this device. 0-100 percentage averaged over the most recent NVML sampling window (~1-5 seconds depending on driver). Returns -1 when the value can't be obtained: non-CUDA backend, NVML unavailable, WSL2 / GRID where nvmlDeviceGetProcessUtilization is unsupported, insufficient permissions, or this process has had no GPU activity in the recent window. This is the per-process counterpart of GpuUtilizationPercent (which is device-wide).

DeviceDescription

Gets the description of the GPU device.

DeviceName

Gets the name of the GPU device.

DeviceNumber

Gets the device number of the GPU.

DeviceType

Gets the type of the GPU device.

Devices

Gets a read-only list of GPU devices available on the system.

FreeMemorySize

Gets the free memory size of the GPU in bytes.

GpuUtilizationPercent

Gets the current GPU compute utilization as a percentage (0-100), or -1 when utilization data is unavailable (non-NVIDIA backend or NVML query failure). On CUDA backends this maps to the NVML "gpu" utilization rate: the percent of time over the last sample period during which one or more kernels were executing.

TotalMemorySize

Gets the total memory size of the GPU in bytes.

Methods

GetDeviceFromNumber(int)

Retrieves a GpuDeviceInfo object by its deviceNumber from the static Devices list.

Share