A Reinforcement Learning Environment for Polyhedral Optimizations

04/28/2021
by   Alexander Brauckmann, et al.
0

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.

READ FULL TEXT

page 1

page 10

page 11

research
06/13/2023

Unified Off-Policy Learning to Rank: a Reinforcement Learning Perspective

Off-policy Learning to Rank (LTR) aims to optimize a ranker from data co...
research
05/20/2020

A reinforcement learning based decision support system in textile manufacturing process

This paper introduced a reinforcement learning based decision support sy...
research
12/10/2021

A Validation Tool for Designing Reinforcement Learning Environments

Reinforcement learning (RL) has gained increasing attraction in the acad...
research
02/16/2019

Heuristics, Answer Set Programming and Markov Decision Process for Solving a Set of Spatial Puzzles

Spatial puzzles composed of rigid objects, flexible strings and holes of...
research
10/08/2021

Revisiting Design Choices in Model-Based Offline Reinforcement Learning

Offline reinforcement learning enables agents to leverage large pre-coll...
research
06/30/2020

MDP Homomorphic Networks: Group Symmetries in Reinforcement Learning

This paper introduces MDP homomorphic networks for deep reinforcement le...
research
10/07/2022

Scaling Directed Controller Synthesis via Reinforcement Learning

Directed Controller Synthesis technique finds solutions for the non-bloc...

Please sign up or login with your details

Forgot password? Click here to reset