Timezone: »

AutoPhase: Juggling HLS Phase Orderings in Random Forests with Deep Reinforcement Learning
Ameer Haj-Ali · Qijing (Jenny) Huang · John Xiang · William Moses · Krste Asanovic · John Wawrzynek · Ion Stoica

Mon Mar 02 04:30 PM -- 07:00 PM (PST) @ Ballroom A #18

The performance of the code a compiler generates depends on the order in which it applies the optimization passes.
Choosing a good order--often referred to as the {\em phase-ordering} problem--is an NP-hard problem. As a result, existing solutions rely on a variety of heuristics. In this paper, we evaluate a new technique to address the phase-ordering problem: deep reinforcement learning. To this end, we implement a framework that takes a program and finds a sequence of passes that optimize the performance of the generated circuit. Without loss of generality, we instantiate this framework in the context of an LLVM compiler and target high-level synthesis programs. We use random forests to quantify the correlation between the effectiveness of a given pass and the program's features. This helps us reduce the search space by avoiding orderings that are unlikely to improve the performance of a given program. We compare the performance of deep reinforcement learning to state-of-the-art algorithms that address the phase-ordering problem. In our evaluation, we show that reinforcement learning improves circuit performance by 28\% when compared to using the -O3 compiler flag, and it achieves competitive results compared to the state-of-the-art solutions, while requiring fewer samples. More importantly, unlike existing state-of-the-art solutions, our reinforcement learning solution can generalize to more than 12,000 different programs after training on as few as a hundred programs for less than ten minutes.

Author Information

Ameer Haj-Ali (UC Berkeley)

Ameer Haj Ali is a Ph.D. candidate in the ADEPT Lab and RISE Lab at UC Berkeley, advised by Professors Ion Stoica and Krste Asanovic. His current research is focused on Compiling, Auto-Tuning, Code Optimization, Machine Learning, Reinforcement Learning, and hardware for machine learning. Ameer finished his M.Sc. studies (summa cum laude, the valedictorian) at the Technion in 2018, where he worked on using emerging memory technologies to enhance the performance of modern computer systems with Professor Shahar Kvatinsky and made multiple journal and conference publications. He also finished four years of undergraduate studies in computer engineering at the Technion in only three years, graduating summa cum laude and receiving the valedictorian honor. During his undergraduate studies, he worked at Mellanox Technologies as a chip designer. He focused on creating design and automation tools that facilitated the formal and dynamic verification process. In his free time, Ameer works as a consultant at AnyScale, Inc, volunteers as a board member on the board of directors of American Technion Society (ATS), and promotes the underprivileged Arab minority in Israel. https://twitter.com/AmeerHajAli ameerhajali.com

Qijing (Jenny) Huang (Berkeley)
John Xiang (UC Berkeley)
William Moses (MIT)
Krste Asanovic (UC Berkeley)
John Wawrzynek (UC Berkeley)
Ion Stoica (UC Berkeley)

Related Events (a corresponding poster, oral, or spotlight)

More from the Same Authors