gtopt/gpu_monitor.hpp file

GPU (NVML) resource monitoring — sibling of CPUMonitor/MemoryMonitor.

GPU-side member of the work-pool monitor family. Mirrors CPUMonitor / MemoryMonitor: a background jthread on the same cadence with cheap cached getters. The concrete monitor loads NVML at runtime via dlopen("libnvidia-ml.so.1") — NEVER a link-time dependency — so a GPU-less host or build behaves exactly as before (has_gpu() == false, device_count() == 0, no admission tokens minted).

The abstract GpuMonitorBase lets tests inject a scripted fake with no NVML and no device (see test_gpu_monitor / test_resource_governor).

Namespaces

namespace gtopt

Classes

struct gtopt::GpuDeviceState
class gtopt::GpuMonitor
class gtopt::GpuMonitorBase