mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4980] [CLOSED] [TUI] read AMD GPU utilization, VRAM, temp, and power on Windows #5275
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#5275
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/4980
Author: @YuukiReina2023
Created: 11/2/2026
Status: ❌ Closed
Base:
main← Head:win-amd-telemetry📝 Commits (1)
7754f81[TUI] read AMD GPU utilization, VRAM, temp, and power on Windows📊 Changes
3 files changed (+354 additions, -13 deletions)
View changed files
📝
serve/telemetry.py(+126 -4)📝
strata_cli/client.py(+64 -9)📝
strata_cli/overview.py(+164 -0)📄 Description
Problem and result
On Windows, when running Strata with an AMD graphics card (HIP backend), the Overview dashboard tiles for
GPU load,VRAM,GPU temp, andPower(as well asstrata status) display--. This happens because_Amdinserve/telemetry.pyonly implements Linuxsysfs(/sys/class/drm/) readings, leavinggpu_reader(..., amd=True)returning unreadable on Windows (noted in #1380 / #1587).With this change, Windows AMD cards report active VRAM usage and compute/3D engine load via Windows PDH performance counters, and temperature and ASIC power via AMD's ADL library (
atiadlxx.dll). The Overview dashboard tiles andstrata statusrender live readings and sparkline histories instead of--.Related discussion
References the existing TODO notes in
serve/telemetry.pylines 555-574 (#1380,#1587). Otherwise none.Approach
serve/telemetry.py):_AmdWinas the Windows reader forgpu_reader(index, amd=True).atiadlxx.dll, available with standard AMD Windows drivers) to read edge/hotspot temperature (PMLOG_TEMPERATURE_EDGE/HOTSPOT) and current board power (PMLOG_ASIC_POWER).\GPU Local Adapter Memory(*)\Local Usageand\GPU Engine(*)\Utilization Percentage) to read dedicated video memory and compute load without external Python package dependencies.windows_amd_cards()for adapter names and total capacity.strata_cli/overview.py,strata_cli/client.py):overview.py, added_get_windows_gpu_sampleto feed VRAM, load, temp, and power into history deques (temp_hist,power_hist), enabling dynamic sparkline rendering.client.py, filled in device normalization fallbacks sostrata statusand the Hardware pane reflect active metrics.Validation
Passed:
python -c "from serve import telemetry; g = telemetry.gpu_reader(0, amd=True); print(g.ok(), g.read())"Environment: Windows 11 / AMD Radeon PRO W6800 (32 GB) / Python 3.10
Result:
True {'temp': 32.0, 'power': 12.0, 'mem_used': 33034072064, 'util': 0.0}python -c "from strata_cli import overview; ...; print(overview.render(model, 100, 30))"Result: Rendered Overview panel successfully, displaying
31 °C,12 W, and30.8 / 32 GBVRAM tiles with valid sparkline characters.python -c "from strata_cli import client; print(client.sanitize_telemetry(raw)['devices'])"Result: Correctly sanitized device list with populated
mem_used,temp, andpower.python -m unittest serve/test_prometheus.pyResult:
Ran 6 tests in 2.293s - OKFailed:
none observed
Not run:
Limits
--(not exposed by the queried PDH counters or basic PMLog).power_limit) is not parsed for Overdrive 8 on Windows yet; the tile displays current wattage without the limit subtitle.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.