Record Compiler Speedups from RL Agents

The Pearl framework, a novel deep Reinforcement Learning system, has achieved significant performance gains in automated compiler code optimization, demonstrating a geometric mean speedup of 2.02x compared to Tiramisu and 3.36x compared to Pluto for general loop nest optimizations.

The top 3

  1. DeepMind AlphaTensor: Beating 50-Year-Old Matrix Algorithms: DeepMind's AlphaTensor, an RL agent, discovered matrix multiplication algorithms surpassing human-designed benchmarks, including a 4x4 binary matrix algorithm requiring 47 multiplications, an improvement over Strassen's 49 (unchanged since 1969). It also achieved hardware-tailored speedups of 8.5% on Nvidia V100 GPUs and 10.3% on Google TPUs for large matrix multiplications.
  2. Google's RL Agents Boost Compiler Performance by Up to 60%: Google Research's graph optimization (GO) has achieved significant speedups, ranging from 33% to 60% on three graph optimization tasks, outperforming TensorFlow's default. Furthermore, MLGO, an RL-powered framework for LLVM, delivered up to a 13.3% reduction in operation count for XLA HLO pass ordering on models like GPT-2, BERT, and ResNet. Other RL agents, such as Pearl, have shown a geometric mean speedup of 3.16x over unoptimized code.
  3. RL's Edge: PPO, GRPO, and Hardware-Tailored Code: Reinforcement Learning algorithms, including PPO, DPO, and GRPO, are pivotal in compiler tuning, enabling agents to discover hardware-specific code optimizations. These optimizations encompass crucial techniques like native instruction scheduling, memory access optimization, and loop pipelining, essential for maximizing performance on diverse hardware platforms such as Nvidia GPUs and Google TPUs.

Sources

Open the full topic