mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#4748
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/3682
Author: @JordanDWalters
Created: 10/22/2026
Status: 🔄 Open
Base:
main← Head:amd-win-telemetry📝 Commits (4)
a13ac42telemetry: GPU load, VRAM, temperature and power for AMD cards on Windows (#1380)1aa632ftelemetry: board power on discrete Radeons, and close the Windows AMD reader (#1434 review)db05b11tests: the no-card telemetry test with #1587's registry fallbackf1a95ectelemetry: PCIe link for AMD cards on Windows: the OS values first, PMLog backup (#1380)📊 Changes
4 files changed (+461 additions, -17 deletions)
View changed files
📝
docs/AMD_HIP.md(+6 -1)📝
serve/telemetry.py(+310 -15)📝
serve/test_server.py(+144 -0)📝
serve/web/app.js(+1 -1)📄 Description
Problem and result
On Windows with an AMD card the Monitor shows nothing for the GPU:
serve/telemetry.py's AMD reader could only read the amdgpu driver's Linux sysfs files, so every GPU tile stayed empty ("–") on the released 0.2.2 (#1380, #1587). After this change the tiles are live on Windows too: load, VRAM used/total, temperature, power (board power where the card reports it, else ASIC power) and the PCIe link (generation, maximum generation, width).free_vram_mib(amd=True)also returns a value there again, so the free-VRAM admission check works on Windows. Verified on two Radeon AI PRO R9700 (details under Validation).Related discussion
close()gives back the ADL/PDH handles), plus the no-card test updated for #1587's registry fallback. I cannot/reopen#1434 from this account, so this PR carries it forward.Approach
ctypes against DLLs Windows or the Adrenalin driver already provide: no new dependency, no admin rights. The
_Nvmlreader interface is unchanged, the NVIDIA / Linux-AMD / macOS paths are untouched, anything that cannot be read staysNone, and the #1380gpu_notestill says why (ADL did not answer, no amdgpu sysfs).atiadlxx.dll(activity 19; temperature 28/8/27/29 first supported; power 73/23/30, board power preferred where present).MemoryInfo2; in use from the OS counter\GPU Adapter Memory(<luid>)\Dedicated Usage(pdh.dll), its adapter matched to ADL's card by PCI bus through D3DKMT (ADL's own usage call read 3,748,023 MB on a Strix Halo per #1434).CM_Get_DevNode_PropertyWwithDEVPKEY_PciDevice_CurrentLinkSpeed/_CurrentLinkWidth/_MaxLinkSpeed(pids 9/10/11, GUID verified againstGet-PnpDeviceProperty) — on the devnode ADL names by its PnP instance string, so a disconnected phantom instance of the same card model cannot be picked. The OS values come first: #2614's RX 7900 XTX and our RDNA4 PC have both seen ADL's PMLogBUS_SPEEDsit generations under the real link. ADL's PMLog 40/41 fill gaps only. A current speed above the card's own maximum is clamped to it. For the width the smaller of the device property and PMLog's lanes wins, following #1733's conservative rule, because #2614 saw a device property report the wiring (x16) over a real x4 link.docs/AMD_HIP.mdnames the Windows sources.Validation
Passed — all at this PR's head
f1a95ecc, Windows 11, two Radeon AI PRO R9700 (device 7551, driver 32.0.32015.2008) on a Gigabyte B850 AI TOP (Ryzen 7 9850X3D), Python 3.12.10:python -m unittest serve.test_server serve.test_monitor serve.test_frontend→Ran 393 tests ... OK (skipped=3). New tests:AmdWindowsTelemetry.test_link_choice(our Gen4-stale case, #2614's x4-slot case, PMLog-only fallback, clamp, out-of-range drop, nothing-at-all) andtest_read_carries_the_link; faked sources, run on any OS.Live reader, before this commit (branch head before it) vs after:
(both cards; VRAM in use follows the model: 27.6 GB on the card holding it, 3.1 GB on the other).
Link cross-check on this PC: PMLog reads Gen4 x8 (speed stale), the device property reads Gen5 x16 (the board's spec says the two full-length slots run x8/x8 when both are filled), and the shown value is Gen5 x8 — each source's known trap caught by the other.
Handles over 40
free_vram_mib(0, amd=True)calls: 196 → 196 (the cfgmgr32 reads keep nothing open; also re-checks #1434's review fix).Failed: none observed.
Not run / not re-run here (kept separate per CONTRIBUTING):
src/,include/,metal/orsycl/is touched — this PR changesserve/telemetry.py,serve/test_server.pyand one doc line.Limits
power_limitstaysNoneon Windows AMD: sensor 47 reads 0 (= no limit set) on both our cards and the legacy Overdrive calls fail (-8) on RDNA4, so the power tile shows no "of … W limit" there.pcie_own_gen/pcie_path(#1733) stay Linux-only.gpus.🤖 Partly prepared with an AI assistant; the human contributor ran every command quoted and verified the claims.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.