Zaneham/Booth
Open-source CUDA, Triton and HIP compiler targeting multiple GPU and CPU architectures.
What it solves
Booth is a compiler designed to break the lock-in of GPU-specific languages. It allows developers to write kernels in CUDA C, HIP, or Triton and compile them for a wide variety of hardware targets, including AMD GPUs (RDNA 2/3/4), NVIDIA GPUs (via PTX or native SASS/cubin), Tenstorrent Metalium, and even standard x86-64 CPUs for those without a GPU.
How it works
Booth acts as a cross-compiler that takes source code from CUDA, HIP, or Triton and lowers it into its own internal representation (IR). From there, it can emit machine code or low-level instructions for the target architecture. It supports multiple frontends, including LFortran for Fortran do concurrent kernels and OCaml functions, and it implements advanced compiler techniques like SSA register allocation and divergence analysis to optimize GPU execution.
Who it’s for
It is built for GPU developers, researchers, and hobbyists who want to target multiple GPU architectures from a single codebase or run GPU-style kernels on CPU hardware for testing and development.
Highlights
- Multi-GPU Target: Supports NVIDIA, AMD, and Tenstorrent hardware.
- Triton-to-CPU: Ability to compile Triton kernels directly to native x86-64 code without needing LLVM.
- Native NVIDIA Backend: Can write cubin files that the GPU loads directly, bypassing the driver's JIT.
- Broad Language Support: Accepts CUDA C, HIP, Triton, Fortran (via LFortran), and OCaml.
- Mainframe-style Debugging: Includes structured crash dumps and parameter snapshots for kernel faults.
Related
- Project
- Project
- Project
- Dispatch
- Project