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
[Feature]: Per-process compute busy time for KFD queues (per-container GPU utilization) #14861
Projects: amdsmi, and amdkfd for the counter itself.
When one GPU is shared between containers, operators need utilization per container: for chargeback, for quotas, and to answer "is my fraction busy?". For ROCm compute work the kernel currently offers no per-process time:
gpu_busy_percent is device-wide;
/sys/class/kfd/kfd/proc/<pid>/stats_<gpuid>/ contains only evicted_ms on a Radeon PRO W7900 (gfx1100). cu_occupancy, an instantaneous sample where it exists, is not offered on this GPU;
the DRM fdinfo of a ROCm process running a busy kernel shows drm-memory-cpu/gtt/vram only, with no drm-engine-* line. Those lines cover graphics contexts on the render node, not KFD compute queues.
So amd-smi process and metrics exporters cannot say how much of the GPU's time a process used. Measured with ROCm 7.2.4 (rocm/dev-ubuntu-24.04:7.2.4) and kernel 7.0.0-38 while a busy kernel ran.
Expected. amdkfd accumulates the time a process's compute queues were active on each GPU and exposes it as a monotonic counter, for example stats_<gpuid>/busy_ns or a drm-engine-compute line in the fdinfo of /dev/kfd. amdsmi then returns it in the process list (amdsmi_get_gpu_process_list), the way drm-engine-gfx already works for graphics. A sampled exporter can then compute utilization per process, and so per container.
Operating System
Ubuntu 26.04.1 (host), Ubuntu 24.04 (container)
GPU
AMD Radeon PRO W7900 (gfx1100)
ROCm Component
amdsmi (counter in amdkfd)
Additional information
Reproduction: tests/lab/s8-amd-dmem.sh step D (reads the KFD sysfs files and fdinfo of a busy process). Output: s8-results-w7900.txt. Related: #12503 (cu_occupancy reported invalid when a GPU lacks the file).
Found while building Open Inference Fabric, an open-source installer that runs Run:ai/KAI with fractional NVIDIA and AMD GPUs side by side. NVIDIA's GPU-fractioning exporter reports per-pod utilization through NVML; for AMD fractions there is no equivalent source today. Happy to test on this GPU.
Activity