A Reinforcement Learning Environment for Polyhedral Optimizations
Not on the map. Why?
Abstract (arXiv)
The polyhedral model allows a structured way of defining semantics-preserving transformations to improve the performance of a large class of loops. Finding profitable points in this space is a hard problem which is usually approached by heuristics that generalize from domain-expert knowledge. Existing problem formulations in state-of-the-art heuristics depend on the shape of particular loops, making it hard to leverage generic and more powerful optimization techniques from the machine learning domain. In this paper, we propose PolyGym, a shape-agnostic formulation for the space of legal transformations in the polyhedral model as a Markov Decision Process (MDP). Instead of using transformations, the formulation is based on an abstract space of possible schedules. In this formulation, states model partial schedules, which are constructed by actions that are reusable across different loops. With a simple heuristic to traverse the space, we demonstrate that our formulation is powerful enough to match and outperform state-of-the-art heuristics. On the Polybench benchmark suite, we found transformations that led to a speedup of 3.39x over LLVM O3, which is 1.83x better than the speedup achieved by ISL. Our generic MDP formulation enables using reinforcement learning to learn optimization policies over a wide range of loops. This also contributes to the emerging field of machine learning in compilers, as it exposes a novel problem formulation that can push the limits of existing methods.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Builds on 11 of its 37 references that are in the map. First posted on arXiv 28 Apr 2021.
Builds on
11 of 37 references.
References · 11
- 2016OpenAI Gymcited by 1,736
- 2018Tensor Comprehensions: Framework-Agnostic High-Performance Machine Learning Abstractionscited by 85
- 2018TVM: An Automated End-to-End Optimizing Compiler for Deep Learningcited by 62
- 2018Tiramisu: A Polyhedral Compiler for Expressing Fast and Portable Codecited by 53
- 2021MLGO: a Machine Learning Guided Compiler Optimizations Frameworkcited by 40
- 2019NeuroVectorizer: End-to-End Vectorization with Deep Reinforcement Learningcited by 37
- 2021A Deep Learning Based Cost Model for Automatic Code Optimizationcited by 33
- 2020ProGraML: Graph-based Deep Learning for Program Optimization and Analysiscited by 23
- 2020Static Neural Compiler Optimization via Deep Reinforcement Learningcited by 14
- 2018Machine Learning in Compiler Optimisationcited by 13
- 2020TDO-CIM: Transparent Detection and Offloading for Computation In-memorycited by 3
Built on by
Citing papers per year: 2021: 1; 2022: 0; 2023: 2; 2024: 0; 2025: 1; 2026: 1.
5 papers.
- 2021CompilerGym: Robust, Performant Compiler Optimization Environments for AI Researchcited by 41
- 2023Target-independent XLA optimization using Reinforcement Learningcited by 1
- 2023LoopTune: Optimizing Tensor Computations with Reinforcement Learningcited by 1
- 2026CHEHAB RL: Learning to Optimize Fully Homomorphic Encryption Computationscited by 1
- 2025DRIVE: Dynamic Rule Inference and Verified Evaluation for Constraint-Aware Autonomous Drivingcited by 0
- 2026CHEHAB RL: Learning to Optimize Fully Homomorphic Encryption Computations27 Jan 2026
- 2025DRIVE: Dynamic Rule Inference and Verified Evaluation for Constraint-Aware Autonomous Driving6 Aug 2025
- 2023LoopTune: Optimizing Tensor Computations with Reinforcement Learning4 Sep 2023
- 2023Target-independent XLA optimization using Reinforcement Learning28 Aug 2023
- 2021CompilerGym: Robust, Performant Compiler Optimization Environments for AI Research17 Sep 2021