Target-independent XLA optimization using Reinforcement Learning
Milan Ganai, Haichen Li, Theodore Enns, Yida Wang, Randy Huang

TL;DR
This paper introduces a reinforcement learning-based method to optimize the sequence of compiler passes in XLA independently of target hardware, leading to significant reductions in operation counts for neural network graphs.
Contribution
It proposes a novel RL-based approach for target-independent XLA pass ordering and develops an experimental framework for training and evaluating RL agents in this context.
Findings
13.3% operation count reduction on GPT-2 graphs
10.4% operation count reduction on diverse neural network graphs
Enhanced RL algorithms improve search performance
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Machine Learning and Data Classification · Ferroelectric and Negative Capacitance Devices
MethodsRefunds@Expedia|||How do I get a full refund from Expedia? · Multi-Head Attention · Attention Is All You Need · Average Pooling · 1x1 Convolution · Cosine Annealing · Weight Decay · Linear Layer · Attention Dropout · WordPiece
