Previously ATLAS-R-003
NeuroGenesis: A Self-Optimizing Compiler with Transformer IR Encoding and Reinforcement Learning
- Dhadi Sai Praneeth Reddy1
- 1 Atlas AI Labs
01
Brief
- Problem
- Compiler optimization passes are hand-written heuristics. Learned approaches such as MLGO and AutoPhase improve on them, but still choose among predefined passes.
- Approach
- NeuroGenesis encodes compiler IR with a Transformer and trains a reinforcement-learning policy to discover optimization rules autonomously.
- Contribution
- A 0.28 reduction in execution cost relative to the LLVM baseline (0.00), outperforming MLGO and AutoPhase.
02
Status
- Idea
- Experiments
- Drafting
- Review
- Released (current stage)
03
Abstract
Compiler optimization passes are hand-written heuristics. Learned approaches such as MLGO and AutoPhase improve on them, but still choose among predefined passes. NeuroGenesis encodes compiler IR with a Transformer and trains a reinforcement-learning policy to discover optimization rules autonomously. A 0.28 reduction in execution cost relative to the LLVM baseline (0.00), outperforming MLGO and AutoPhase.
04
Identifiers
05
Key results
0.28
+0.28 vs LLVM
Execution-cost reduction
Relative to the LLVM baseline (0.00).
0.00
LLVM baseline
Reference point for the reduction.
2
Learned optimizers outperformed
MLGO and AutoPhase.
| Method | Execution-cost reduction |
|---|---|
| LLVM (baseline) | 0.00 |
| NeuroGenesis | 0.28 |
Execution-cost reduction vs. LLVM
View as table
| LLVM baseline | 0 |
|---|---|
| NeuroGenesis | 0.28 |
Methodology and caveats
Reported as reduction in execution cost against the LLVM baseline. Benchmark suite, hardware and run count to be added. MLGO and AutoPhase values are in the paper and will be added to the table once published here.
06
Write-up
Approach
NeuroGenesis treats optimization as something the compiler can learn rather than something engineers must hand-write.
- Program IR
- Transformer encoder
- RL policy
- Optimization rules
- Optimized program
Results
Measured as reduction in execution cost against the LLVM baseline, NeuroGenesis achieves 0.28 (baseline: 0.00) and outperforms the learned-optimizer baselines MLGO and AutoPhase. See Key results above.
07
