Target-independent XLA optimization using Reinforcement Learning

08/28/2023
by   Milan Ganai, et al.
0

An important challenge in Machine Learning compilers like XLA is multi-pass optimization and analysis. There has been recent interest chiefly in XLA target-dependent optimization on the graph-level, subgraph-level, and kernel-level phases. We specifically focus on target-independent optimization XLA HLO pass ordering: our approach aims at finding the optimal sequence of compiler optimization passes, which is decoupled from target-dependent optimization. However, there is little domain specific study in pass ordering for XLA HLO. To this end, we propose introducing deep Reinforcement Learning (RL) based search for optimal XLA HLO pass ordering. We also propose enhancements to the deep RL algorithms to further improve optimal search performance and open the research direction for domain-specific guidance for RL. We create an XLA Gym experimentation framework as a tool to enable RL algorithms to interact with the compiler for passing optimizations and thereby train agents. Overall, in our experimentation we observe an average of 13.3% improvement in operation count reduction on a benchmark of GPT-2 training graphs and 10.4% improvement on a diverse benchmark including GPT-2, BERT, and ResNet graphs using the proposed approach over the compiler's default phase ordering.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/15/2019

AutoPhase: Compiler Phase-Ordering for High Level Synthesis with Deep Reinforcement Learning

The performance of the code generated by a compiler depends on the order...
research
04/28/2022

Genetic Improvement in the Shackleton Framework for Optimizing LLVM Pass Sequences

Genetic improvement is a search technique that aims to improve a given a...
research
03/02/2020

AutoPhase: Juggling HLS Phase Orderings in Random Forests with Deep Reinforcement Learning

The performance of the code a compiler generates depends on the order in...
research
08/20/2020

Static Neural Compiler Optimization via Deep Reinforcement Learning

The phase-ordering problem of modern compilers has received a lot of att...
research
09/20/2019

NeuroVectorizer: End-to-End Vectorization with Deep Reinforcement Learning

One of the key challenges arising when compilers vectorize loops for tod...
research
01/13/2018

A Survey on Compiler Autotuning using Machine Learning

Since the mid-1990s, researchers have been trying to use machine-learnin...
research
03/08/2023

MCTS-GEB: Monte Carlo Tree Search is a Good E-graph Builder

Rewrite systems [6, 10, 12] have been widely employing equality saturati...

Please sign up or login with your details

Forgot password? Click here to reset