proomt

Search

Search posts, papers, and topics

All posts

Hacker News front page15 min readadvanced

Building a Linux GPU Driver for the M4 Mac Mini in One Month

Summary

Built a clean‑room OpenGL ES 3.0 Linux driver for Apple‑silicon M4/A18 Pro GPUs in ~4 weeks, covering reverse‑engineered firmware ABI, a Rust kernel driver, a custom IR/shader compiler, and user‑space Metal translation; achieved 200 fps Minecraft and WebGL demos, with heavy LLM assistance for debugging and code generation.

  • Reverse‑engineered the AGX firmware ABI using live hypervisor traces, without inspecting Apple binaries.
  • Implemented a full Linux kernel driver (Rust DRM shim) and user‑space driver (custom IR, command stream builder).
  • Used an LLM (Codex) to replay captured GPU state, reconstruct structs, and automate debugging of compute and partial‑render paths.
  • Achieved functional OpenGL ES 3.0 rendering (Chrome/Firefox WebGL) and 200 fps Minecraft on M4 Mac Mini.

Provides a rare, open‑source baseline for Linux graphics on Apple‑silicon GPUs, demonstrating that a full driver can be built in weeks with clean‑room RE and LLM‑assisted development—valuable for the Linux‑on‑Apple‑silicon community and for exploring GPU firmware interfaces.

8/10

Related reading

  1. Nvidia announces native GPU programming in Rust

    NVIDIA released CUDA‑Rust, letting you write GPU kernels directly in Rust and compile to PTX. Two programming models are supported: the traditional SIMT model via the `cuda-oxide` backend (nightly Rust, custom codegen) and the newer Tile model via `cutile‑rs` (stable Rust, JIT‑compiled Tile IR). Both provide Rust‑typed safety guarantees (e.g., `DisjointSlice`, tensor partitioning) and simple Carg…

    Hacker News front pagenvidia.com11 minHN961402
  2. M5 Ultra Mac Studio Review

    The M5 Ultra Mac Studio (256 GB RAM) uses a quad‑die M5 Max architecture with an 80‑core GPU and 1.2 TB/s memory bandwidth, delivering ~70 % faster prompt‑to‑first‑token and token‑generation rates than the M3 Ultra. In the author’s tests Qwen3.8‑Flash‑Next hits 100 tokens/s on short prompts and 60‑85 tokens/s with 64‑256 KB context, making local AI agents (Open Minis, Hermes, Codex) feel snappy a…

    Hacker News front pagemacstories.net39 minHN191174
  3. Accurate Models of AMD Matrix Cores

    The authors reverse‑engineer AMD’s CDNA matrix cores, build per‑architecture MATLAB models that match hardware bit‑for‑bit on 10 M random tests, and use them to compare AMD vs NVIDIA tensor‑core accuracy.

    Hacker News front pagearxiv.org2 minpaperHN7911
  4. SiliconBench: Speed, Memory, and Fidelity for LLM Serving on Unified-Memory Desktops

    SiliconBench benchmarks nine Apple‑Silicon LLM serving engines on unified‑memory desktops, measuring speed, memory usage, and output fidelity across Qwen3, Qwen3.5, and Gemma‑4 models. It finds vllm‑metal doubles throughput at modest concurrency, memory budgets often fail to preserve headroom, and only three stacks satisfy all fidelity and model‑coverage requirements, with tensor‑parallel scaling…

    Hugging Face Daily Papersarxiv.org1 minpaper