Automatic Feature Generation for Machine Learning-Based Optimising Compilation

被引:12
作者
Leather, Hugh [1 ]
Bonilla, Edwin [2 ,3 ]
O'Boyle, Michael [1 ]
机构
[1] Univ Edinburgh, Edinburgh EH8 9AB, Midlothian, Scotland
[2] NICTA, Canberra Res Lab, Canberra, ACT 2601, Australia
[3] Australian Natl Univ, Canberra, ACT 0200, Australia
关键词
Machine Learning; Performance; Feature generation; genetic programming; program optimisation; OPTIMIZATION; HEURISTICS;
D O I
10.1145/2536688
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Recent work has shown that machine learning can automate and in some cases outperform handcrafted compiler optimisations. Central to such an approach is that machine learning techniques typically rely upon summaries or features of the program. The quality of these features is critical to the accuracy of the resulting machine learned algorithm; no machine learning method will work well with poorly chosen features. However, due to the size and complexity of programs, theoretically there are an infinite number of potential features to choose from. The compiler writer now has to expend effort in choosing the best features from this space. This article develops a novel mechanism to automatically find those features that most improve the quality of the machine learned heuristic. The feature space is described by a grammar and is then searched with genetic programming and predictive modelling. We apply this technique to loop unrolling in GCC 4.3.1 and evaluate our approach on a Pentium 6. On a benchmark suite of 57 programs, GCCs hard-coded heuristic achieves only 3% of the maximum performance available, whereas a state-of-the-art machine learning approach with hand-coded features obtains 59%. Our feature generation technique is able to achieve 76% of the maximum available speedup, outperforming existing approaches.
引用
收藏
页数:32
相关论文
共 25 条
  • [1] Agakov F, 2006, INT SYM CODE GENER, P295
  • [2] [Anonymous], MICRO 24
  • [3] [Anonymous], P 1 EUR WORKSH GEN P
  • [4] [Anonymous], IEEE J INSTRUCTION L
  • [5] [Anonymous], ANIMALS ANIMATS
  • [6] [Anonymous], 2014, C4. 5: programs for machine learning
  • [7] [Anonymous], CGO 09
  • [8] Back T., 1996, EVOLUTIONARY ALGORIT, DOI DOI 10.1093/OSO/9780195099713.001.0001
  • [9] Inducing heuristics to decide whether to schedule
    Cavazos, J
    Eliot, J
    Moss, B
    [J]. ACM SIGPLAN NOTICES, 2004, 39 (06) : 183 - 194
  • [10] Method-specific dynamic compilation using logistic regression
    Cavazos, John
    O'Boyle, Michael F. P.
    [J]. ACM SIGPLAN NOTICES, 2006, 41 (10) : 229 - 240