mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1224] [CLOSED] serve: the Monitor's AMD GPU readings on Windows through ADLX (load, VRAM, temperature, power) #3321
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#3321
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/1224
Author: @tuandat3019
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:contrib-amd-windows-monitor📝 Commits (2)
bf6f8ffserve: the Monitor's GPU readings on Windows through AMD's ADLX (load, VRAM, temperature, power)c75e24cserve: match the ADLX GPU to the present-device walk by name alone📊 Changes
1 file changed (+168 additions, -3 deletions)
View changed files
📝
serve/telemetry.py(+168 -3)📄 Description
The Monitor tab (
/metrics,serve/telemetry.py) reads NVIDIA through NVML and AMD on Linux through theamdgpu sysfs files (#301). On Windows an AMD card read nothing - the load, VRAM, temperature and power
places stayed blank.
Reading them there needs ADLX, AMD's current library: the old ADL Overdrive calls answer not supported on
current Adrenalin (measured on 32.0.21045:
ADL2_Overdrive6_Temperature_Getrc=-9 for every one of the 13adapter entries of the two cards,
ADL2_Overdrive6_CurrentPower_Getanswers 0 W), and the raw ADLX entrypoints are not something a ctypes reader can hold - the 1.4 runtime's vtables close over internal objects and
the public headers' layout alone does not survive calling them (the calls fault). AMD's supported client is
the ADLXPybind wheel, so this reads through it as an optional import, in the same style as psutil: without
the wheel the AMD cards keep reading nothing, exactly as before.
With the wheel present it reports load, VRAM used/total, edge temperature and board power (from the same
IADLXGPUMetricsobject the fan, hotspot, clocks and shared memory are available; the Monitor's per-cardtable uses the four above).
free_vram_mib()- the server's admission check - answers for these cards too.Two details it gets right on Windows:
which is what the engine's GPU numbering,
gpu_indicesand the Monitor'sgpu_indexrefer to. (Verifiedagainst the engine's own "GPU 1: AMD Radeon RX 6800" line on a two-card PC: RX 6600 bus 3 = HIP 0, RX 6800
bus 6 = HIP 1.) The ADLX GPU is matched to that walk by name - the ADLX list's own order is the reverse
there - so a card the walk cannot name reports nothing rather than another card's numbers.
DIGCF_PRESENT; the registry'sEnum\PCIalso holds ghost instances of a re-seated card (the same name, a stale bus) and they must notenter the numbering.
Not included: the PCIe link. Windows' user-mode properties for it (
DEVPKEY_PciDevice_Current/MaxLinkSpeed/LinkWidth) report the slot rather than the negotiated link - on this PC an x8 card reads x16,against its own measured 13.6 GB/s host-to-device probe - and nothing else user-mode carries the link width
(the driver's registry keys, the GPU performance counters and ADLX all lack it). The Monitor's PCIe places
therefore stay empty for these cards, as they have been.
Verified live on that PC (ADLXPybind 1.4.6, RX 6800 + RX 6600): RX 6800 63 C / 178 W / 99 % / VRAM 16.0 of
16.4 GB while serving; RX 6600 53 C / 17 W; with the wheel uninstalled the readers report nothing and the
rest of the Monitor is unchanged.
Install:
pip install adlxpybind(wheels for cp310-cp312, win_amd64).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.