Booth
community★ featuredAn open-source CUDA, HIP, and Triton compiler with no LLVM anywhere in the path. Takes the same sources you would hand to nvcc, ROCm, or Triton's JIT and emits AMD RDNA 2/3/4 binaries, NVIDIA PTX, Tenstorrent Metalium C++, native RV32IM, or plain x86-64 — so a Triton matmul can run on a laptop that has never seen a GPU. Also reads a deliberate subset of MLIR (`func.func` plus the `arith` dialect) and Fortran `do concurrent` kernels via LFortran. Formerly BarraCUDA; renamed to honour Kathleen Booth.
Links
📦
Repo
Releases
See all releases on GitHub ↗
📋 Changelog
Booth — Changelog ================= ## Unreleased ### Frontend - `kath --mlir` reads MLIR text, no LLVM in the path. Čertík's pure-C reader vendored under `src/mlir/vendor` (mlir 826b69c9, corec a160199d), reached only through `src/mlir/mlir_fe.c` (Zane Hambly, 2026-08-11) - `src/mlir/lower.c` walks the parsed module into BIR: `func.func`, `return`, `arith.constant` and every arith binop, compare and conversion the reader classifies. From there it is the pipeline CUDA and Triton already use, and MLIR reaches all four backends. `--mlir --pp` reprints instead (Zane Hambly, 2026-08-11) - an op outside the subset stops the lowering and names itself. Skipping it would leave a function that compiles and computes something else (Zane Hambly, 2026-08-11) - five fixes to the vendored reader, all worth upstreaming, and four of them are `func.func` being unfinished where `tt.func` is not: `parser_init` renamed off Booth's own, `parser_error`'s `exit(1)` replaced by a `mlir_parse_fail()` the linker supplies, `func.func` binding its arguments before parsing the body rather than after, `func.func` accepting the `attributes` clause where MLIR actually writes it, and `arith.xori`, `shli` and `shrsi` added to `op_string_to_type`, which the printer could already write but the parser could not read back (Zane Hambly, 2026-08-11) - `ml_parse` resets the reader's process-wide type interning, which upstream assumes one context per process. Without it a closed context left the next parse in freed memory (Zane Hambly, 2026-08-11) - the Triton lowering records pool overflow through `bir_pfull`, which the C99 one already did and it never has. It answered a full block pool with index 0, a live block, so `bir_pchk` could not see a Triton arena exhaustion at all (Zane Hambly, 2026-08-11) - Triton blocks are named. String offset 0 is a live string, so a nameless block printed as whatever went into the table first, and all four blocks of a loop kernel were labelled with the kernel's own name (Zane Hambly, 2026-08-11) - `kath --bir-in` reads BIR text and skips the frontend entirely, so a compiler outside this tree can target Booth without linking against it. `src/build/` parses and builds modules, `src/ocaml/` emits them from OCaml, and `kcomp` lowers an ordinary OCaml function from its .cmt, leaving ocamlc to do the type checking and refusing anything outside the kernel subset by source location. Immediates parse as well as print, so a module holding a constant reads back. The PTX from an OCaml-written vadd runs on an RTX 4060 Ti (Zane Hambly, 2026-08-18) - The kernel language grows device functions, shared memory, loops, division and the transcendentals, enough to price an Asian option on the GPU, which turned up four bugs now fixed: sin and cos took turns rather than radians, float constants printed to six digits, the BIR lexer clamped integers above INT32_MAX because long is 32 bits on Windows,
Works on
blackhole