Skip to content
This repository was archived by the owner on Nov 22, 2026. It is now read-only.

mojo-amdgpu v0.1.0

Choose a tag to compare

@amarbarosys amarbarosys released this 21 Oct 07:18
· 26 commits to main since this release

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 pread each 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_0 read 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

  • 901d2d2 docs: CI badge
  • 75ffe1c build: uv.lock (mojo 1.1.0)
  • a16d371 docs: README, API, design, agent skill; ci: uv sync, build runner, gate
  • fe0e72c feat: Gpu telemetry from sysfs, hwmon and KFD
  • 7b5fc4c test: sysfs fixture, edge fixture and Python oracle
  • 2a601e2 chore: repo layout, Apache-2.0, mojo>=1.1