• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学

• 高性能计算 • 上一篇    下一篇

监督学习模型指导的函数级编译优化参数选择方法研究

刘慧1,2,赵荣彩1,王琦1   

  1. (1.解放军信息工程大学数学工程与先进计算国家重点实验室,河南 郑州 450001;
    2.河南师范大学计算机与信息工程学院,河南 新乡 453007)
  • 收稿日期:2017-12-14 修回日期:2018-03-15 出版日期:2018-06-25 发布日期:2018-06-25
  • 基金资助:

    国家重点研发计划“高性能计算”重点专项(2016YFB0200503)

A function-level compiler optimization parameter
selection method based on supervised learning model

LIU Hui1,2,ZHAO Rongcai1,WANG Qi1   


  1. (1.State Key Laboratory of Mathematical Engineering and Advanced Computing,
    PLA Information Engineering University,Zhengzhou 450001;
    2.College of Computer and Information Engineering,Henan Normal University,Xinxiang 453007,China)
     
  • Received:2017-12-14 Revised:2018-03-15 Online:2018-06-25 Published:2018-06-25

摘要:

基于机器学习的迭代编译方法可以在对新程序进行迭代编译时,有效预测新程序的最佳优化参数组合。现有方法在模型训练过程中存在优化参数组合搜索效率较低、程序特征表示不恰当、预测精度不高的问题。因此,基于机器学习的迭代编译方法是当前迭代编译领域内的一个研究热点,其研究挑战在于学习算法选择、优化参数搜索以及程序特征表示等问题。基于监督学习技术,提出了一种程序优化参数预测方法。该方法首先通过约束多目标粒子群算法对优化参数空间进行搜索,找到样本函数的最佳优化参数;然后,通过动静结合的程序特征表示技术,对函数特征进行抽取;最后,通过由函数特征和优化参数形成的样本构建监督学习模型,对新程序的优化参数进行预测。分别采用k近邻法和softmax回归建立统计模型,实验结果表明,新方法在NPB测试集和大型科学计算程序上实现了较好的预测性能。

关键词: 编译优化参数, 监督学习, 空间搜索优化, 特征抽取

Abstract:

The machine learning based iterative compilation can effectively predict new programs’ best optimization parameter combination. The existing methods suffer some problems, such as low search efficiency of optimization parameter combination, inappropriate representation of programs features and unsatisfactory prediction accuracy in model training process. The machine learning based iterative compilation is a hotspot research in the field of iterative compilation, and its challenge lies in choosing learning algorithms, optimizing parameter search and program features representation. Based on the supervised learning technique, we propose an optimization parameter predictive method, called SLOPS. We search the optimal parameter space by constraining the multiobjective PSO algorithm, and find the best optimization parameters of the sample function. Then we extract the features of the function through dynamic and static program feature representation techniques. Finally, a supervised learning model is constructed by the KNN and the Softmax regression based on the samples composed of program features and optimization parameters, which is used to predict the optimization parameters of new programs. Experimental results show that the SLOPS can achieve better prediction performance on NPB benchmarks and scientific programs.
 

Key words: compiler optimization parameter, supervised learning, space search optimization, feature extraction