mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4998] [CLOSED] [TUI] read AMD GPU utilization, VRAM, temp, and PCIe link on Windows #5281
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#5281
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/4998
Author: @YuukiReina2023
Created: 11/2/2026
Status: ❌ Closed
Base:
main← Head:win-amd-telemetry📝 Commits (1)
f49b206[TUI] read AMD GPU utilization, VRAM, temp, and PCIe link on Windows📊 Changes
3 files changed (+416 additions, -17 deletions)
View changed files
📝
serve/telemetry.py(+155 -5)📝
strata_cli/client.py(+64 -9)📝
strata_cli/overview.py(+197 -3)📄 Description
Problem and result
On Windows, Strata running with the AMD HIP backend displayed
--or0 %across the Overview dashboard tiles (GPU load, VRAM, GPU temp, Power, PCIe). Direct3D engine counters in Windows PDH do not track ROCm/HIP compute execution, AMD Linux sysfs paths do not exist on Windows, and the temp sparkline with fixed boundslo=20, hi=100rendered as an unbroken solid block in the console glyph set.After this change, the Overview TUI on Windows AMD correctly displays live GPU compute utilization (e.g. 74–99% under prompt evaluation and generation), VRAM usage and capacity (e.g. 30.9 / 32 GB), edge temperature and hotspot junction temperature with adaptive history scaling, ASIC power draw in watts, and the negotiated PCIe generation and link width (e.g.
Gen4 x16/Gen2 x16).Related discussion
none
Approach
_AmdWinsubclassing_Amdinserve/telemetry.py:atiadlxx.dll) viaADL2_New_QueryPMLogData_Get:Sensor 19 (PMLOG_INFO_ACTIVITY_GFX)for hardware compute/graphics utilization (falls back to Sensor 20 memory activity or PDH).Sensor 8 (PMLOG_TEMPERATURE_EDGE)for edge temperature andSensor 27 (PMLOG_TEMPERATURE_HOTSPOT)for hotspot junction temperature.Sensor 23 (PMLOG_ASIC_POWER)for live ASIC power draw in watts.Sensor 40 (PMLOG_BUS_SPEED)andSensor 41 (PMLOG_BUS_LANES)for PCIe link generation and lane width.\GPU Local Adapter Memory(*)\Local Usage._Amdsysfs logic wheneverself.devis set or when tests mockSYSFS != "/sys", ensuring no regressions in Linux/CI test fixtures.strata_cli/overview.py:_WinPdhfor client-side monitoring against uninstrumented servers._tile("GPU temp", ...)to display hotspot junction temperature in the subtitle and scales the sparkline dynamically across recent temperature history to reveal thermal rise and fall.Gen4 x16) in_tile("PCIe", ...).strata_cli/client.py:sanitize_telemetryandnormalize_legacyto ensure single-GPU and multi-card devices retain valid memory and sensor properties.Validation
Passed:
python -m unittest serve.test_server.AmdTelemetry -von Windows 11 (3/3 passed).python tools/test_windows_amd_gpu.py(5/5 passed).python -m unittest tests.terminal.test_tuiqa_monitor -v(18/18 passed).Launched
qwen3.8-flash-next-iq3_xxson HIP backend. Verified live Overview rendering:GPU load: 99% during prompt evaluationVRAM: 30.9 / 32 GBGPU temp: 56 °C, subtitlehotspot 62 °Cwith visible thermal curvePower: 62 WPCIe:Gen2 x16at idle,Gen4 x16under loadFailed:
none observed
Not run:
Physical hardware runs on macOS Metal and Linux ROCm (code path is guarded by
os.name == "nt"; sysfs mock tests passed).Limits
AMD does not expose an instantaneous PCIe bandwidth throughput counter (MB/s) through ADL PMLog or Windows PDH without kernel-mode ETW profiling;
pcie_rxtherefore displays--while generation and width (GenX xY) are fully resolved.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.