Table of Contents

Property AverageGpuUtilizationPercent

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

AverageGpuUtilizationPercent

Mean device-wide GPU compute utilization (0-100) over the interval since this member was last read for this device, or -1 when unavailable (non-CUDA backend or NVML query failure).

GpuUtilizationPercent point-samples NVML's short internal window, so reading it at a slow cadence aliases bursty workloads (such as token-by-token LLM decoding) far below their true load. This member instead averages every utilization sample the driver buffered since the previous read, giving a faithful time-weighted figure regardless of how fast it is polled.

Each read advances an internal per-device cursor, so it is meant to be driven by a single periodic poller (for example a 1 Hz metrics sampler). When the driver has produced no new samples since the last read, or the buffered-sample API is unsupported, it falls back to the instantaneous GpuUtilizationPercent value.

public int AverageGpuUtilizationPercent { get; }

Property Value

int
Share