Portable Compiler Optimisation Across Embedded Programs and Microarchitectures

Portable Compiler Optimisation Across Embedded Programs and Micro-architectures using Machine Learning Christophe Dubach Grigori Fursin O’Boyle Timothy M. Jones INRIA Saclay Edwin V. Bonilla University of Edinburgh Michael F. P. University of Edinburgh Presented by: Divya Muppaneni Dept of Computer & Information Sciences University of Delaware CISC 879 - Machine Learning for Solving Systems Problems

Motivation • Compiler Optimization It is the process of tuning the output of a compiler to minimize or maximize some attribute of an executable computer program. • Difficulties in building an optimizing compiler CISC 879 - Machine Learning for Solving Systems Problems

Portable Compiler • Addressing the problem Developing a portable optimizing compiler • Approach Machine Learning CISC 879 - Machine Learning for Solving Systems Problems

Model • Generating the Training data CISC 879 - Machine Learning for Solving Systems Problems

Model(Contd) • Building the Model To learn the model we need to fit a probability distribution over good optimization passes to each training program/micro-architecture. Input Arch Desc M 1 Output Perf Cntr P 1 Prob. Dist for Opts CISC 879 - Machine Learning for Solving Systems Problems

Experimental Setup • Benchmark Mi. Bench 35 Mi. Bench programs • Microarchitecture Space XScale processor 200 micro-architectural configurations • Compiler Optimisation Space 1000 different optimizations CISC 879 - Machine Learning for Solving Systems Problems

Characterising the compiler space Distribution of the maximum speedup available across all microarchitectures on a per –program basis. CISC 879 - Machine Learning for Solving Systems Problems

Evaluation Methodology • Cross Validation Leave-one-out cross validation • Best Performance Achievable CISC 879 - Machine Learning for Solving Systems Problems

Evaluation Methodology Program/Microarchitecture Optimisation Space CISC 879 - Machine Learning for Solving Systems Problems

Evaluation Methodology Evaluation Across Programs CISC 879 - Machine Learning for Solving Systems Problems

Evaluation Methodology Evaluation Across Microarchitectures CISC 879 - Machine Learning for Solving Systems Problems

Results Program Impact on Optimisations CISC 879 - Machine Learning for Solving Systems Problems

Results(Contd) Microarchitecture Impact on Optimisations CISC 879 - Machine Learning for Solving Systems Problems

Results(Contd) Extending the Microarchitectural Space CISC 879 - Machine Learning for Solving Systems Problems

Conclusion • Conclusion Average speedup of 1. 16 X over the highest default optimization level across the 200 micro-architectural configurations was achieved. • Future Work Reduce the training cost. CISC 879 - Machine Learning for Solving Systems Problems

CISC 879 - Machine Learning for Solving Systems Problems

THANK YOU CISC 879 - Machine Learning for Solving Systems Problems
- Slides: 17