This repository was archived by the owner on Nov 22, 2026. It is now read-only.
Repository navigation
mojo-amdgpu v0.1.0
mojo-amdgpu v0.1.0
Released: 2026-10-21 · Commit: 901d2d2 · Previous: first release
What it does
AMD GPU telemetry for Mojo read straight from sysfs, hwmon and KFD, with no ROCm and no rocm-smi: VRAM, GTT, busy, temperatures, power, clocks, fan, and KFD nodes, for every AMD card, picking the one with the most VRAM by default.
Highlights
- 17 metrics per sample in 7.4 to 8.6 µs, against 17.7 to 18.1 µs in Python with files kept open and 58 to 60 µs re-opening them.
- Files are opened once and re-read with one
preadeach into one 256-byte buffer: no allocation per sample. - Handles more than one card (a CPU's iGPU plus a discrete card) and odd sysfs layouts: swapped labels, two hwmon dirs, garbage values.
Changes
First public release, no earlier version.
Verified
| Check | Result |
|---|---|
scripts/check.sh: Python oracle on 3 trees (real snapshot of an RX 7900 XTX and a Raphael iGPU, a hand-made edge tree, an empty tree) |
PASS all |
scripts/ci.sh on a pristine Ubuntu 24.04.5 VM |
PASS all |
| a deliberately broken clock parser | fails the gate |
Known limits
- Linux amdgpu only.
- Values that change between two reads (power, busy, clocks) are checked on fixtures, not live.
- Python-only integer forms such as
1_0read as not available.
Upgrade / run
git clone https://github.com/amarbaro/mojo-amdgpu && cd mojo-amdgpu && uv sync
mojo run -I src examples/quickstart.mojo
Commits
901d2d2docs: CI badge75ffe1cbuild: uv.lock (mojo 1.1.0)a16d371docs: README, API, design, agent skill; ci: uv sync, build runner, gatefe0e72cfeat: Gpu telemetry from sysfs, hwmon and KFD7b5fc4ctest: sysfs fixture, edge fixture and Python oracle2a601e2chore: repo layout, Apache-2.0, mojo>=1.1