Practical Aggregation of Semantical Program Properties for Machine Learning Based Optimization

被引:19
作者
Namolaru, Mircea [1 ]
Cohen, Albert [2 ,3 ]
Fursin, Grigori [2 ,4 ]
Zaks, Ayal [1 ]
Freund, Ari [1 ]
机构
[1] IBM Haifa Res Lab, Haifa, Israel
[2] INRIA Saclay, Palaiseau, France
[3] Paris Sud 11 Univ, LRI, Orsay, France
[4] Univ Versailles, Versailles, France
来源
PROCEEDINGS OF THE 2010 INTERNATIONAL CONFERENCE ON COMPILERS, ARCHITECTURES AND SYNTHESIS FOR EMBEDDED SYSTEMS (CASES '10) | 2010年
关键词
COMPILER OPTIMIZATIONS;
D O I
10.1145/1878921.1878951
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Iterative search combined with machine learning is a promising approach to design optimizing compilers harnessing the complexity of modern computing systems. While traversing a program optimization space, we collect characteristic feature vectors of the program, and use them to discover correlations across programs, target architectures, data sets, and performance. Predictive models can be derived from such correlations, effectively hiding the time-consuming feedback-directed optimization process from the application programmer. One key task of this approach, naturally assigned to compiler experts, is to design relevant features and implement scalable feature extractors, including statistical models that filter the most relevant information from millions of lines of code. This new task turns out to be a very challenging and tedious one from a compiler construction perspective. So far, only a limited set of ad-hoc, largely syntactical features have been devised. Yet machine learning is only able to discover correlations from information it is fed with: it is critical to select topical program features for a given optimization problem in order for this approach to succeed. We propose a general method for systematically generating numerical features from a program. This method puts no restrictions on how to logically and algebraically aggregate semantical properties into numerical features. We illustrate our method on the difficult problem of selecting the best possible combination of 88 available optimizations in GCC. We achieve 74% of the potential speedup obtained through iterative compilation on a wide range of benchmarks and four different general-purpose and embedded architectures. Our work is particularly relevant to embedded system designers willing to quickly adapt the optimization heuristics of a mainstream compiler to their custom ISA, microarchitecture, benchmark suite and workload. Our method has been integrated with the publicly released MILEPOST GCC [14].
引用
收藏
页码:197 / 206
页数:10
相关论文
共 32 条
  • [1] ACOVEA, US NAT SEL INV SOFTW
  • [2] [Anonymous], 1988, PRINCIPLES DATABASE
  • [3] [Anonymous], 2006, P INT S COD GEN OPT
  • [4] [Anonymous], P INT S COD GEN OPT
  • [5] [Anonymous], 2007, COMPILERS PRINCIPLES
  • [6] [Anonymous], P C MACH LEARN
  • [7] [Anonymous], 1997, Advanced compiler design implementation
  • [8] [Anonymous], 1991, The Art of Computer Systems Performance Analysis: Techniquesfor Experimental Design, Measurement, Simulation, and Modeling
  • [9] [Anonymous], P C HIGH PERF NETW C
  • [10] Bonilla Edwin V., 2006, P 23 INT C MACH LEAR, P121