You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Idle GPU check: nvidia-smi failure reads as 0% (idle), and Neuron/Gaudi/AMD accelerators are never measured #954
Found while auditing idle signals for #937. Verified by reading the code only.
getGPUUtilization (pkg/agent/agent.go) returns 0 in three different cases, and the idle check takes 0 as a measured "GPU idle":
nvidia-smi is not on PATH. This is correct for a host without an NVIDIA GPU.
nvidia-smi is present but fails, for example when the driver and kernel modules do not match after a kernel update, the GPU has fallen off the bus, or it reports "No devices were found". The code reads this as idle, though it should be unknown, with the cpuUsage/networkBytes/diskIOBytes semantics: assume active, show "unknown" in status, warn once.
Lines that do not parse ([N/A], [Not Supported]) are skipped silently. If every line is like that, the result is 0.
Separately, non-NVIDIA accelerators are never checked. Trainium/Inferentia (neuron-top/neuron-monitor, see #205), Gaudi (hl-smi, dl1/dl2q) and AMD (amd-smi/rocm-smi, g4ad) all read as GPU 0. A trn/inf job runs mostly on the device with little host CPU or network, so it could be idle-stopped mid-run. That would come from the CPU and network checks passing, not from this function returning a wrong number. Whether it actually happens depends on how much host CPU the Neuron runtime uses, which I have not measured.
The GPU signal is an instantaneous utilisation, not a counter, so it does not have #937's cumulative-vs-delta bug. A one-shot sample can miss a bursty kernel, but that errs towards idle only for very spiky loads.
Suggested fix: return (value, measured, why) like the other signals. Treat "tool present but failed" as unknown. Decide on, and document, what spored does on Neuron/Gaudi/AMD hosts: either measure them, or warn once that accelerator activity is not measured.
Activity
Measure idle disk I/O as a per-tick delta over whole disks found by s…
Measure idle disk I/O as a per-tick delta over whole disks found by s…
Treat an unreadable accelerator as active, and measure Neuron, Gaudi …
Portable accelerator fixtures, and skip the sh-script test on Windows (…
Treat an unreadable accelerator as active, and measure Neuron, Gaudi …
Portable accelerator fixtures, and skip the sh-script test on Windows (…
Treat an unreadable accelerator as active, and measure Neuron, Gaudi …
Portable accelerator fixtures, and skip the sh-script test on Windows (…
Treat an unreadable accelerator as active, and measure Neuron, Gaudi …
Portable accelerator fixtures, and skip the sh-script test on Windows (…
Justify the accelerator tool exec for Semgrep: literal tool names only (
Name the right function in the accelerator exec comment (#954)
Treat an unreadable accelerator as active, and measure Neuron, Gaudi …