Tool for fast GPU kernel generation via superoptimization
Top 26.3% on sourcepulse
Mirage is a tool that automatically generates highly-optimized GPU kernels for PyTorch programs using superoptimization, targeting researchers and engineers seeking to accelerate deep learning workloads without manual kernel programming. It enables users to describe computations in Python, which Mirage then transforms into fast, custom GPU kernels that can outperform expert-written ones.
How It Works
Mirage employs a multi-level superoptimization approach. It first translates a PyTorch program into an intermediate representation (IR) and then searches a vast space of functionally equivalent GPU kernels. By exploring various optimization strategies and low-level code generation techniques, it discovers kernels that achieve significant speedups, such as fusing operations like RMSNorm and Linear layers for Transformer models.
Quick Start & Requirements
pip install mirage-project
or install from pre-built wheels (e.g., pip install https://github.com/mirage-project/mirage/releases/download/v0.2.2/mirage_project-0.2.2+cu122-cp310-cp310-linux_x86_64.whl
). Source installation requires git clone --recursive https://www.github.com/mirage-project/mirage
and pip install -e . -v
.Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The project is associated with a 2025 OSDI publication, suggesting it may still be under active development or research. Specific CUDA and Python version compatibility might be tied to pre-built wheels or source compilation requirements.
1 day ago
1 day