Expand description
GPU device enumeration for NVDEC/NVENC scheduling.
NVIDIA detection loads libcuda via dlopen, calls cuInit +
cuDeviceGetCount + cuDeviceGetName. This works on minimal container
images where the nvidia-smi binary may be absent but the driver’s
user-mode libraries are bind-mounted by the NVIDIA Container Toolkit.
AMD/Intel detection scans /sys/bus/pci/devices on Linux.
Structs§
- GpuDevice
- GpuUtilization
- Per-GPU live utilisation snapshot. Read on every load tick (5 s
cadence) by the Phase 2 (2026-05-07)
worker_loadreporter and folded into theWsGpuLeaseEntryfor the wire. NVIDIA values come from NVML; Intel values come from sysfsgt_cur_freq_mhz/gt_max_freq_mhzfor a coarse “busy” proxy +mem_info_vram_*for memory; AMD is currently a no-op (returns all zeros) — radeontop /amdsmiintegration is the proper fix and is deferred per the brief’s “Phase 1 stand-in for Intel; AMD skipped” guidance. - GpuUtilization
Reader - One-shot accumulator that opens NVML once and reads per-GPU utilisation for every NVIDIA device on each load tick. Holding the NVML handle across reads avoids the init cost (microseconds) on every tick and is the documented pattern.
Enums§
Functions§
- detect_
gpus - has_
nvidia - manufacturer_
label - Human-readable manufacturer label. Used by the WS hello frame’s
WsGpuInfo.manufacturerfield and by the admin inventory page’s “by manufacturer” rollup. Stays in lockstep withvendor_labelintranscoder/src/capabilities.rsso the registration POST + the hello frame agree on the spelling. - supports_
av1_ encode