[PR #1434] [CLOSED] telemetry: GPU load, VRAM, temperature and power for AMD cards on Windows (#1380) #3452

Closed
opened 2026-11-07 14:41:35 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1434
Author: @gt50
Created: 10/7/2026
Status: ❌ Closed

Base: main ← Head: windows-amd-telemetry


📝 Commits (3)

  • 9aa2bc9 telemetry: GPU load, VRAM, temperature and power for AMD cards on Windows (#1380)
  • e818f0a telemetry: board power on discrete Radeons, and close the Windows AMD reader (#1434 review)
  • 1810d7b tests: the no-card telemetry test with #1587's registry fallback

📊 Changes

4 files changed (+330 additions, -17 deletions)

View changed files

📝 docs/AMD_HIP.md (+4 -1)
📝 serve/telemetry.py (+227 -15)
📝 serve/test_server.py (+98 -0)
📝 serve/web/app.js (+1 -1)

📄 Description

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.
    • All serve and setup test files pass on Windows, on main 61b3fb5d (1158 tests; rebased).
  • 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".
  • Discrete Radeon: tested by @crkva on an RX 7900 XTX (Windows 11). Board power there is ADL sensor 73, now tried first, and readers close their ADL/PDH handles; both fixed in c893147 after that test.
  • 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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1434 **Author:** [@gt50](https://github.com/gt50) **Created:** 10/7/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `windows-amd-telemetry` --- ### 📝 Commits (3) - [`9aa2bc9`](https://github.com/Niko1221/Strata/commit/9aa2bc99d645120a3dff34f4947c321808f592d9) telemetry: GPU load, VRAM, temperature and power for AMD cards on Windows (#1380) - [`e818f0a`](https://github.com/Niko1221/Strata/commit/e818f0a60626814edb8fa7cb63cdb272973b4635) telemetry: board power on discrete Radeons, and close the Windows AMD reader (#1434 review) - [`1810d7b`](https://github.com/Niko1221/Strata/commit/1810d7b72858d6f18d8802c64f6eaf24a00487af) tests: the no-card telemetry test with #1587's registry fallback ### 📊 Changes **4 files changed** (+330 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `docs/AMD_HIP.md` (+4 -1) 📝 `serve/telemetry.py` (+227 -15) 📝 `serve/test_server.py` (+98 -0) 📝 `serve/web/app.js` (+1 -1) </details> ### 📄 Description ## 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. - All `serve` and setup test files pass on Windows, on `main` 61b3fb5d (1158 tests; rebased). - **`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". - **Discrete Radeon:** tested by @crkva on an RX 7900 XTX (Windows 11). Board power there is ADL sensor 73, now tried first, and readers close their ADL/PDH handles; both fixed in c893147 after that test. - **`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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:41:35 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3452
No description provided.