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#5400
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/5356
Author: @james-martinez
Created: 11/5/2026
Status: 🔄 Open
Base:
main← Head:fix/5353-xe-monitor-in-container📝 Commits (1)
0a54826serve/telemetry.py: an Intel Arc (xe) sysfs reader so the SYCL container's Monitor has temp and power (#5353)📊 Changes
2 files changed (+283 additions, -7 deletions)
View changed files
📝
serve/telemetry.py(+125 -7)➕
tests/terminal/test_xe_monitor_5353.py(+158 -0)📄 Description
Problem and result
In the SYCL container the Monitor tab shows no GPU readings (#5353): the image ships no NVIDIA library, so
serve/telemetry.py'sgpu_readerfell back to the_Nvmlstub and the GPU panel stayed empty. The readings exist insycl/serve/xe_telemetry.py(the host install's Monitor plug), but the image cannot ship it:docker/build.shstages onlyserve/,scripts/andweb/into the build context, and its/run/gpustat.jsonsampler runs as a host systemd unit.This folds the xe sysfs reader into the shared telemetry as
_Xe, so any container or install that cannot load NVML gets the card from sysfs (the xe driver's files are world-readable): the pkg temperature, power as the delta of the hwmon energy counter (xe has no instantaneous power file), the power cap, and the PCIe link the card trained at (walking past the card's internal x1 switch, so the real Gen4 x16 shows instead of the internal x1). Load and VRAM still come from a root sampler's/run/gpustat.jsonwhen one runs - xe reports them only per client in/proc/*/fdinfo- and a stale reading (sampler died) is ignored so the sysfs fields keep answering. NVML still answers first everywhere it has a card, so NVIDIA hosts are untouched; the Intel card is picked by the 'tile0' folder the xe driver creates, not the vendor id, so an iGPU on i915 in front of the card cannot answer for it (the #2001 class of bug).On my B70 machine's container this fills the whole panel, measured live through the patched reader on the running pod:
Intel(R) Arc(TM) Pro B70 Graphics, temp 61 C, 45 W (cap 230 W, stable across two samples two seconds apart), VRAM 30.8 GiB of 32 GiB from the host's gpustat sampler, PCIe Gen3 x16 as the card trained.Related discussion
#5353
Approach
serve/telemetry.py: new_Xereader with_Nvml's interface;gpu_readertries NVML first, then the xe reader on Linux before falling back to the NVML stub. Reads/run/gpustat.json(the sampler's schema issycl/tools/gpustat.py's) for load/VRAM/power when fresh.tests/terminal/test_xe_monitor_5353.py: a fake sysfs tree (iGPU before the Arc card, the internal-x1-switch layout, hwmon sensors) for the card pick, pkg-label sensor, energy-delta power, cap, link walk, fresh-vs-stale sampler handling, and thegpu_readerwiring order.sycl/serve/xe_telemetry.pyandsycl/tools/gpustat.pyare unchanged: the host install keeps its richer reader (oneAPI name, per-client VRAM). The container shows temp/power/cap/link without any sampler at all; a host that runs the sampler also gets load and VRAM in the container.Validation
Passed:
tests.terminal.test_xe_monitor_5353(10 tests) on the patched tree; thetest_amd_four_card/test_monitor_bundleregression set has the same 6 pre-existing env import errors (missingtextualetc.) on pristine main as on the patch - zero new failures. End-to-end on a live Arc Pro B70 container (kubectl exec, the pod's bundled interpreter):gpu_reader(0)returns the_Xereader with nameIntel(R) Arc(TM) Pro B70 Graphics, temp/power/cap/VRAM/PCIe populated from the real card, the energy-delta power consistent across two samples.Failed: nothing.
Not run: the image rebuild (the fix is plain stdlib Python staged through the existing
serve/COPY - no Dockerfile change needed), and the browser UI check of the Monitor panel.Limits
The container's power is a delta between telemetry polls (one per second), so the first reading after start is None until a second sample exists; PCIe rx/tx throughput has no xe sysfs counter and stays None (the panel hides those tiles). Load and VRAM need a sampler (
sycl/tools/gpustat.py) whose JSON the reader consumes - with no sampler the panel shows temp/power/cap/link only, which is what the issue's screenshots lack.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.