source/gpu_monitor.cpp file

NVML-backed GpuMonitor implementation (runtime dlopen).

Loads NVML at runtime from libnvidia-ml.so.1 (the versioned SONAME the driver ships — some installs omit the bare libnvidia-ml.so symlink) and dlsyms just the handful of symbols needed for device count + per-device VRAM / utilisation. There is NO link-time NVML dependency and NO CUDA-toolkit header dependency, so a GPU-less host or build compiles and runs unchanged: a failed dlopen leaves device_count() == 0 and every query returns nullopt. We deliberately mirror the discipline in solver_registry.cpp (dlopen the plugin, dlsym optional symbols, degrade gracefully).

Namespaces

namespace gtopt

Classes

struct gtopt::GpuMonitor::Nvml
dlopen'd NVML function table + cached per-device handles (pimpl).