mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4884] [Other] Telemetry: Windows AMD ADL2 readings, per-card tiles, PCIe link #5231
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5231
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4884
Author: @lwYeo
Created: 11/1/2026
Status: 🔄 Open
Base:
main← Head:feature/amd-telemetry📝 Commits (2)
05febddtelemetry: Windows AMD ADL2 readings, per-card tiles, PCIe linkd0b8db9telemetry: no console window for the Device Manager query, off the first-read path📊 Changes
11 files changed (+966 additions, -140 deletions)
View changed files
📝
docs/DETAILS.md(+11 -0)📝
serve/prometheus.py(+17 -0)📝
serve/server.py(+95 -10)📝
serve/telemetry.py(+427 -22)📝
serve/test_monitor.py(+56 -0)📝
serve/test_prometheus.py(+19 -0)📝
serve/test_server.py(+55 -93)➕
serve/test_telemetry_adl.py(+186 -0)📝
serve/web/app.css(+5 -1)📝
serve/web/app.js(+76 -13)📝
serve/web/index.html(+19 -1)📄 Description
[Other] Telemetry: Windows AMD ADL2 readings, per-card tiles, PCIe link
Problem and result
On Windows the Web Monitor showed no AMD readings: the GPU tile said "no reading" and the PCIe line was blank, and a model split across two cards got one tile, not one per card.
After: the Monitor reads AMD cards on Windows through the driver's own AMD Display Library (ADL2 PMLog,
atiadlxx.dll) — the same interface HWInfo and LibreHardwareMonitor use, so no ROCm and no pip package — and shows one tile per card on a split, each with load, VRAM, temperature, power and the slot's PCIe generation and width. A reading the driver does not report is blank, never guessed.Related discussion
#2704 — this is the telemetry part of the split agreed there (the Windows multi-GPU setup part is a separate PR).
Approach
Ported from the telemetry part of #2704 (commits
d0dcf489— the AMD telemetry on Windows, on the closed PR's branchD4ve0s:feature/windows-amd-vision-telemetry— and3c615f4b— release every ADL2 handle a reader takes), squashed and hand-adapted to current main:serve/telemetry.py: the ADL2 ctypes bindings (structs built once, every call guarded — the ABI varies by Adrenalin version) and an_AmdWinreader with the same interface as_Nvml: util, mem_used, mem_total, temp, power, power_limit, and best-effortpcie_gen_max/pcie_widthfrom the card's Plug-and-Play record (ADL PMLog's BUS_SPEED reports the root complex, not the slot). The PMLog stream starts at setup and a stalled stream is restarted.gpu_readerbuilds it only on Windows with the AMD backend; the Linux sysfs and macOS IOKit paths are main's, untouched.serve/server.py: the payload hunks only (image-encoder card, the "reading N pictures" live line, per-request encoder stats, the Windows AMD vram-reserve floor, closing throwaway AMD reader handles), on top of main's server.py, so main's newer features (answer_room, model-card sampling, scrape-window gauges, kept prompts, chunk fields) stay.Service.__init__getsanswer_room=True(main set it only inmain(), so a Service built by hand — the Monitor tests, embedding — crashed on it).serve/test_server.pyloses theAmdTelemetryclass (it tested the reader code this commit replaces);serve/test_telemetry_adl.pyis its replacement.MacTelemetrystays.Review follow-up (
d0b8db9b): the Device Manager query flashed a console window on a server started without one (desktop app, tray helper,pythonw) —creationflags=CREATE_NO_WINDOWstops it. Its first query (~4.5 s measured) ran on the firstread(), which can be the free-VRAM admission check before a model load — it now runs in a daemon thread, the first read returns{}and the tiles fill a few seconds later. A failed query is retried at most every 60 s, not on every 1-second sample.Compatibility: Windows AMD only; NVIDIA, Linux AMD and macOS readers unchanged. Everything is best-effort — a missing driver or sensor leaves the tile blank and nothing here can stop the server.
Validation
Branch
feature/amd-telemetry@d0b8db9bon main146df3c4. Environment: Windows 11, Gigabyte X870E, AMD RX 6800 XT (gfx1030) + AI PRO R9700 (gfx1201), 48 GB RAM.Passed:
.venv\Scripts\python.exe -m unittest serve.test_telemetry_adl serve.test_prometheus serve.test_monitor serve.test_server→ Ran 404 tests, OK (skipped=3) on this PC (headd0b8db9bon main146df3c4).Failed: none observed.
Not run:
Limits
pcie_widthfrom the PnP record is the slot's maximum; the lanes the card runs at can be lower (motherboard bifurcation), as the code comment states.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.