Timezone: »

 
Poster
Learning Compiler Pass Orders using Coreset and Normalized Value Prediction
Youwei Liang · Kevin Stone · Ali Shameli · Chris Cummins · Mostafa Elhoushi · Jiadong Guo · Benoit Steiner · Xiaomeng Yang · Pengtao Xie · Hugh Leather · Yuandong Tian

Tue Jul 25 02:00 PM -- 04:30 PM (PDT) @ Exhibit Hall 1 #103

Finding the optimal pass sequence of compilation can lead to a significant reduction in program size. Prior works on compilation pass ordering have two major drawbacks. They either require an excessive budget (in terms of the number of compilation passes) at compile time or fail to generalize to unseen programs. In this work, instead of predicting passes sequentially, we directly learn a policy on the pass sequence space, which outperforms the default -Oz flag by an average of 4.5% over a large collection (4683) of unseen code repositories from diverse domains across 14 datasets. To achieve this, we first identify a small set (termed coreset) of pass sequences that generally optimize the size of most programs. Then, a policy is learned to pick the optimal sequences by predicting the normalized values of the pass sequences in the coreset. Our results demonstrate that existing human-designed compiler passes can be improved with a simple yet effective technique that leverages pass sequence space which contains dense rewards, while approaches operating on the individual pass space may suffer from issues of sparse reward, and do not generalize well to held-out programs from different domains. Website: https://rlcompopt.github.io.

Author Information

Youwei Liang (UC San Diego)
Youwei Liang

PhD student at UCSD ECE

Kevin Stone (Meta AI)
Ali Shameli
Chris Cummins (Meta AI)
Mostafa Elhoushi (Meta)
Jiadong Guo (ETHZ - ETH Zurich)
Benoit Steiner (Anthropic)
Xiaomeng Yang (Meta AI)
Pengtao Xie (UC San Diego)
Hugh Leather (Facebook AI Research)
Yuandong Tian (Facebook AI Research)

More from the Same Authors