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

J4 ›› 2010, Vol. 32 ›› Issue (9): 115-118.doi: 10.3969/j.issn.1007130X.2010.

• 论文 • 上一篇    下一篇

基于学习的迭代式优化编译中的经验适用性研究

龙舜,朱蔚恒   

  1. (暨南大学计算机科学系,广东 广州 510632)
  • 收稿日期:2010-03-05 修回日期:2010-06-10 出版日期:2010-09-02 发布日期:2010-09-02
  • 作者简介:龙舜(1971),男,江西永新人,博士,副教授,CCF会员(E200011736M),研究方向为编译技术、机器学习和系统结构;朱蔚恒,博士,讲师,研究方向为数据挖掘和机器学习。
  • 基金资助:

    中国科学院计算机系统结构重点实验室开放课题项目;暨南大学博士启动基金资助项目

Applicability of Experience in LearningBased Iterative Compilations

LONG Shun,ZHU Weiheng   

  1. (Department of Computer Science,Jinan University,Guangzhou 510632,China)
  • Received:2010-03-05 Revised:2010-06-10 Online:2010-09-02 Published:2010-09-02

摘要:

迭代式优化编译方法能有效地使应用程序的运行充分发挥各种硬件平台的潜力。其中基于机器学习的方法显著提高了优化效率,但它忽视了编译程序的经验总是有限的现实,需要根据一个新程序的具体情况判断自己是否有足够的和适当的经验将其优化。这制约了在更广泛的应用领域内应用该技术。为此,本文提出采用逆K近邻法对新程序作孤立点检测。如果一个程序被判断为孤立点,表明已有经验并不适用,应该从零开始搜索优化空间;否则可直接利用已有经验。初步实验结果表明,本方法能有效判断一系列程序中的孤立点,使编译程序能对它们做恰当的处理,提高优化效率。

关键词: 迭代式优化编译, 机器学习, 程序特征, 孤立点, 逆K近邻算法

Abstract:

Modern compilers explore various large and complex transformation spaces in an iterative manner in search for high performance for a given program. Machine learning techniques have recently been used by compilers to capture the features of a given program and find out useful heuristics from their prior experience with similar programs. However, the success of such learningbased approaches relies heavily on the experience that a compiler has obtained optimization, which is limited in practice. This hinders its applicability in general scenarios. To tackle this pitfall, we use a reverse Knearest neighbor (RKNN) algorithm to help a compiler to decide whether to use the existing prior experience directly, or turn to launch an optimization space search for outlier programs instead. Preliminary experimental results are given to demonstrate its effectiveness.

Key words: iterative optimization;machinelearning;program feature;outlier;reverse Knearest neighbours