wave-compiler
Multi-language GPU kernel compiler targeting the WAVE ISA.
Compiles GPU kernels written in Python, Rust, C++, or TypeScript into WAVE binary files (.wbin). Includes an SSA-based intermediate representation, optimization passes, and a Chaitin-Briggs register allocator.
Build
Usage
Architecture
Source code passes through five stages:
- Frontend - Language-specific parser produces HIR (High-Level IR)
- HIR → MIR - Lowering to SSA form with phi nodes and CFG
- Optimization - DCE, CSE, SCCP, LICM, strength reduction, mem2reg, loop unrolling, CFG simplification
- MIR → LIR - Instruction selection with structured control flow emission
- Register Allocation + Emission - Chaitin-Briggs graph coloring, WAVE binary encoding
License
Apache 2.0 - see LICENSE