改动 / #2943

#2943 Monitor: opt-in rootless Apple Silicon GPU charts

open · @mjhagen · 0 评论 · 去 GitHub 看

Setup & installServer & APIAMD / HIPNVIDIA / CUDAWindows

说明

Closes #2942. Follow-up to the basic macOS IORegistry support in #2360.

## Summary

The Mac Monitor can read GPU load and memory, but temperature, power and PCIe remain empty. Add opt-in Apple Silicon charts with rootless temperature/power readings and GPU frequency in place of the discrete-GPU PCIe card.

Enable with `STRATA_MACOS_TELEMETRY=1`; install optional `macmon` with `brew install macmon` for temperature, power and clock readings.

## What changed

- Read GPU driver allocations from IORegistry and label them as shared memory across all apps. Model sizing keeps using the existing Metal reader and working-set budget.
- Run one background `macmon pipe` process, discard readings after five seconds, recover from stopped/stalled helpers, and close the helper with telemetry.
- Adapt Apple dashboard labels, show unavailable samples as gaps, and label strata-mlx's expert-cache budget accurately.
- Document setup, metric meanings and limitations; add hardware-independent sensor, lifecycle, HTTP and chart tests.

## Extra Notes

The feature is off by default. Existing macOS `_Metal`, NVIDIA/AMD readers, Windows AMD notes and the default spark renderer are preserved; the original spark function is unchanged. Tests cover default reader selection, AMD precedence on macOS, unchanged default chart behavior, missing helpers and stale/invalid data.

Validation on upstream main `477ac13c`:

- `python -m unittest serve.test_server serve.test_monitor serve.test_apple_telemetry` — **356 tests passed**.
- `node serve/test_charts.cjs`, `node --check serve/web/app.js`, and `git diff --check` — passed.
- M3 Pro, 18 GPU cores, 36 GiB, macmon 0.10.0: real GPU load/allocation/temperature/power/frequency through the current-main mock HTTP server; browser rendering checked with no console errors. A streamed Flash Next generation was also verified in the earlier v0.1.40-based deployment.

No native engine sources or build files changed. Native Metal/CUDA/HIP/SYCL builds and physical NVIDIA/AMD/Intel Mac hardware were not tested. The extra sensors use OS-dependent IORegistry/IOReport/SMC interfaces and remain optional.

本站相关内容

相关页面的快捷入口。