Milepost GCC: Machine Learning Enabled Self-tuning Compiler

被引:132
作者
Fursin, Grigori [1 ,2 ]
Kashnikov, Yuriy [2 ]
Memon, Abdul Wahid [2 ]
Chamski, Zbigniew [1 ]
Temam, Olivier [1 ]
Namolaru, Mircea [3 ]
Yom-Tov, Elad [3 ]
Mendelson, Bilha [3 ]
Zaks, Ayal [3 ]
Courtois, Eric [4 ]
Bodin, Francois [4 ]
Barnard, Phil [5 ]
Ashton, Elton [5 ]
Bonilla, Edwin [6 ]
Thomson, John [6 ]
Williams, Christopher K. I. [6 ]
O'Boyle, Michael [6 ]
机构
[1] INRIA Saclay, F-91893 Orsay, France
[2] Univ Versailles, F-78000 Versailles, France
[3] IBM Res Lab, IL-31905 Haifa, Israel
[4] CAPS Entreprise, F-35000 Rennes, France
[5] ARC Int, St Albans AL1 5HE, England
[6] Univ Edinburgh, Edinburgh EH8 9AB, Midlothian, Scotland
关键词
Machine learning compiler; Self-tuning compiler; Adaptive compiler; Automatic performance tuning; Machine learning; Program characterization; Program features; Collective optimization; Continuous optimization; Multi-objective optimization; Empirical performance tuning; Optimization repository; Iterative compilation; Feedback-directed compilation; Adaptive compilation; Optimization prediction; Portable optimization;
D O I
10.1007/s10766-010-0161-2
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Tuning compiler optimizations for rapidly evolving hardware makes porting and extending an optimizing compiler for each new platform extremely challenging. Iterative optimization is a popular approach to adapting programs to a new architecture automatically using feedback-directed compilation. However, the large number of evaluations required for each program has prevented iterative compilation from widespread take-up in production compilers. Machine learning has been proposed to tune optimizations across programs systematically but is currently limited to a few transformations, long training phases and critically lacks publicly released, stable tools. Our approach is to develop a modular, extensible, self-tuning optimization infrastructure to automatically learn the best optimizations across multiple programs and architectures based on the correlation between program features, run-time behavior and optimizations. In this paper we describe Milepost GCC, the first publicly-available open-source machine learning-based compiler. It consists of an Interactive Compilation Interface (ICI) and plugins to extract program features and exchange optimization data with the cTuning.org open public repository. It automatically adapts the internal optimization heuristic at function-level granularity to improve execution time, code size and compilation time of a new program on a given architecture. Part of the MILEPOST technology together with low-level ICI-inspired plugin framework is now included in the mainline GCC. We developed machine learning plugins based on probabilistic and transductive approaches to predict good combinations of optimizations. Our preliminary experimental results show that it is possible to automatically reduce the execution time of individual MiBench programs, some by more than a factor of 2, while also improving compilation time and code size. On average we are able to reduce the execution time of the MiBench benchmark suite by 11% for the ARC reconfigurable processor. We also present a realistic multi-objective optimization scenario for Berkeley DB library using Milepost GCC and improve execution time by approximately 17%, while reducing compilation time and code size by 12% and 7% respectively on Intel Xeon processor.
引用
收藏
页码:296 / 327
页数:32
相关论文
共 84 条
[1]  
ANDERSON J, 1997, P 30 S MICR MICRO 30
[2]  
[Anonymous], P ACM SIGPLAN C PROG
[3]  
[Anonymous], P INT C COMP ARCH SY
[4]  
[Anonymous], 3 WORKSH STAT MACH L
[5]  
[Anonymous], 2007, P INT S COD GEN OPT
[6]  
[Anonymous], J INSTRUCTION LEVEL
[7]  
[Anonymous], PHOENIX SOFTWARE OPT
[8]  
[Anonymous], 1988, PRINCIPLES DATABASE
[9]  
[Anonymous], 2009, GCC DEVELOPERS SUMMI
[10]  
[Anonymous], 2006, P INT S COD GEN OPT