Pull requests / #1434
#1434 telemetry: GPU load, VRAM, temperature and power for AMD cards on Windows (#1380)
open · @gt50 · 0 コメント · GitHub で見る
Setup & installServer & APIAMD / HIPDocumentationWindowsLinux
本文
## Title
Issue: Resolves #1380
## Summary
On Windows, the Monitor shows no GPU load, VRAM, temperature or power for AMD cards: the AMD reader used the amdgpu driver's Linux sysfs files only. This adds a Windows reader that gets the same four values from what every Adrenalin install already has. It uses ctypes like the NVML reader, so there's no new dependency.
Checked on a Ryzen AI Max+ 395 / Radeon 8060S (Strix Halo), Windows 11 Pro 10.0.26300, driver 32.0.31041.1004, engine 0.1.40.2. The Monitor now shows load, VRAM `63.2 / 64 GB` with `24,576 experts cached`, temperature and power, all with sparklines.
## What changed
- **`serve/telemetry.py`:** new `_AmdWindows` reader with `_Nvml`'s interface. `gpu_reader(index, amd=True)` picks it when `WINDOWS`; on Linux it's still `_Amd` (sysfs).
| Value | Source |
| --- | --- |
| Load | ADL PMLog sensor 19 (`PMLOG_INFO_ACTIVITY_GFX`) |
| Temperature | First supported of 28 / 8 / 27 / 29 (GFX, edge, hotspot, SoC) |
| Power | 23 (`PMLOG_ASIC_POWER`), else 30 (GFX power) |
| VRAM size | `ADL2_Adapter_MemoryInfo2_Get` |
| VRAM in use | OS counter `\GPU Adapter Memory(<luid>)\Dedicated Usage` through `pdh.dll` (`PdhAddEnglishCounterW`, so any Windows language) |
- **Adapter match:** the counter's adapter is matched to ADL's card by PCI bus number, through `D3DKMTEnumAdapters2` + `KMTQAITYPE_ADAPTERADDRESS`. ADL's own `ADL2_Adapter_VRAMUsage_Get` returned 3,748,023 MB on the 8060S, so it isn't used.
- **Card numbering:** AMD cards in PCI bus order, one per bus (ADL lists one entry per display output).
- **Errors:** a missing ADL, or no such card, gives `ok() == False`, as before.
- **The #1380 note:** it now says why readings are missing ("AMD's ADL library … did not answer for this card", or "the amdgpu driver's sysfs files were not found"), instead of "not available on Windows AMD yet". `app.js` shows "not available" in the VRAM tile in that case.
- **`serve/test_server.py`:**
- `AmdTelemetry` pins `WINDOWS = False`, so the sysfs tests also pass when run on Windows.
- New `AmdWindowsTelemetry`: sensor choice, LUID instance names, and no-card behaviour (Windows only), including the note.
- The sysfs no-card case now checks its note.
- `serve.test_server`, `serve.test_monitor` and `serve.test_frontend` pass on Windows: 283 tests.
- **`docs/AMD_HIP.md`:** the Monitor line names the Windows sources.
## Extra Notes
- **Sensor check:** while a 14K-token prompt was read, activity went 6 → 85-96 %, GFX temperature 48 → 53-81 °C, ASIC power 45 → 80-110 W, and GFX power alone 4 → 22-31 W. On an APU, ASIC power is the whole chip (CPU, GPU and memory share the package). It's the counterpart of NVML's board power, so it's the one shown.
- **Power limit:** no power-limit sensor answers on the 8060S (47/48), so `power_limit` stays None, and the tile shows no "of … W limit".
- **Not tested on a discrete Radeon** (e.g. the 9070 XT in #1380). The sensor ids are ADL's standard ones and the code falls back across them, but a report from a discrete card would be good.
- **`free_vram_mib(amd=True)`** now also returns a value on Windows: total minus dedicated usage. So `min_free_vram_mib` works there too.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
関連リンク
インストール・モデル・リリースへの站内リンク。