MLGOPerf: An ML Guided Inliner to Optimize Performance

07/18/2022
by   Amir H. Ashouri, et al.
0

For the past 25 years, we have witnessed an extensive application of Machine Learning to the Compiler space; the selection and the phase-ordering problem. However, limited works have been upstreamed into the state-of-the-art compilers, i.e., LLVM, to seamlessly integrate the former into the optimization pipeline of a compiler to be readily deployed by the user. MLGO was among the first of such projects and it only strives to reduce the code size of a binary with an ML-based Inliner using Reinforcement Learning. This paper presents MLGOPerf; the first end-to-end framework capable of optimizing performance using LLVM's ML-Inliner. It employs a secondary ML model to generate rewards used for training a retargeted Reinforcement learning agent, previously used as the primary model by MLGO. It does so by predicting the post-inlining speedup of a function under analysis and it enables a fast training framework for the primary model which otherwise wouldn't be practical. The experimental results show MLGOPerf is able to gain up to 1.8 respect to LLVM's optimization at O3 when trained for performance on SPEC CPU2006 and Cbench benchmarks, respectively. Furthermore, the proposed approach provides up to 26 benchmarks which can be translated into an additional 3.7

READ FULL TEXT
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
01/30/2023

Operator Fusion in XLA: Analysis and Evaluation

Machine learning (ML) compilers are an active area of research because t...
research
10/31/2019

DeepLine: AutoML Tool for Pipelines Generation using Deep Reinforcement Learning and Hierarchical Actions Filtering

Automatic machine learning (AutoML) is an area of research aimed at auto...
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
04/20/2022

fairDMS: Rapid Model Training by Data and Model Reuse

Extracting actionable information from data sources such as the Linac Co...
research
10/24/2018

Improving OpenCL Performance by Specializing Compiler Phase Selection and Ordering

Automatic compiler phase selection/ordering has traditionally been focus...

Please sign up or login with your details

Forgot password? Click here to reset