Repository navigation
Description
Related to #7449 (same "recognizes the GPU, not the VRAM" symptom) and follows on from #7072, whose fix introduced the attribution this report is about.
On Windows + ROCm, Studio shows no used VRAM. The Train page's GPU Monitor shows a live Utilization figure next to -- for VRAM, and the System tab shows the card with Unknown used and an empty meter. Both read as "your GPU is idle."
Environment: Windows 11, AMD Radeon RX 9060 XT (gfx1200), ROCm 7.13, torch 2.11.0+rocm7.13.0.
Root cause
Windows ROCm has no amd-smi, and hipMemGetInfo does not see other processes, so used VRAM comes from the \GPU Adapter Memory(*)\Dedicated Usage performance counter (hardware.py:_rocm_windows_per_device_vram). Nothing keys a counter instance to a torch device, so _match_adapter_used_to_devices ranks usages against device capacities and emits a value only where capacity forces the pairing.
With more counters than visible devices, that rule is ranked_useds[rank] > ranked_totals[rank + 1], guarded by rank + 1 < n. With n == 1 the guard is always false, so the sole device is never assigned. Windows always has extra adapter instances -- Microsoft Basic Render Driver is on every install -- so the extra-counter branch is the normal path, and every single-GPU AMD Windows host lands on None.
_rocm_windows_aggregate_used_bytes declines on the same host for a different reason: it requires the counter list to be exactly as long as the visible set, and here it's 3 to 1.
Counters and device on this machine:
luid_0x00000000_0x00015369_phys_0 | 3105513472 # RX 9060 XT
luid_0x00000000_0x000183fe_phys_0 | 0 # Basic Render Driver
luid_0x00000000_0x0001842f_phys_0 | 0
torch: AMD Radeon RX 9060 XT, total_memory 17095983104
_match_adapter_used_to_devices([3105513472, 0, 0], [17095983104]) -> [None]
_rocm_windows_aggregate_used_bytes([3105513472, 0, 0], [17095983104]) -> None
The counter itself is correct and matches Task Manager (3105513472 B = 2.89 GiB). Only the attribution declines.
A second, unrelated way the UI overstates this
useSystemInfo starts on a placeholder that says device_backend: "cpu", gpu: { available: false, devices: [] }, zero cores, zero RAM, zero disk. resources-tab.tsx renders it verbatim as "No visible GPU detected. CPU-only resources are shown above." So opening Settings before /api/system answers, or after a failed request, states a CPU-only verdict as fact. That's the state where CPU reads Unknown, RAM 0 GiB / 0 GiB and Disk 0.00 GB / 0.00 GB.
Expected
A visible AMD GPU reports its real used VRAM on Windows, and the UI never asserts "no GPU / CPU-only" from data it hasn't read.
Out of scope
Temperature and power stay unavailable on Windows ROCm -- no amd-smi, and no performance counter for either -- so the Train page will still show -- for those two.
Activity
Studio: take the AMD APU total on Windows from the driver, not the ca…
Studio: take the AMD APU total on Windows from the driver, not the ca…