[论文解读] FEAST: An Automated Feature Selection Framework for Compilation Tasks
FEAST 是一种自动化特征选择框架,结合 LASSO、顺序前向/后向选择及统计方法,识别用于编译器任务的最小且高性能的静态程序特征子集。该方法仅使用原始特征池约 18% 的特征,即可实现与原始方法相当的编译器参数调优性能,显著降低冗余性和计算成本。
The success of the application of machine-learning techniques to compilation tasks can be largely attributed to the recent development and advancement of program characterization, a process that numerically or structurally quantifies a target program. While great achievements have been made in identifying key features to characterize programs, choosing a correct set of features for a specific compiler task remains an ad hoc procedure. In order to guarantee a comprehensive coverage of features, compiler engineers usually need to select excessive number of features. This, unfortunately, would potentially lead to a selection of multiple similar features, which in turn could create a new problem of bias that emphasizes certain aspects of a program's characteristics, hence reducing the accuracy and performance of the target compiler task. In this paper, we propose FEAture Selection for compilation Tasks (FEAST), an efficient and automated framework for determining the most relevant and representative features from a feature pool. Specifically, FEAST utilizes widely used statistics and machine-learning tools, including LASSO, sequential forward and backward selection, for automatic feature selection, and can in general be applied to any numerical feature set. This paper further proposes an automated approach to compiler parameter assignment for assessing the performance of FEAST. Intensive experimental results demonstrate that, under the compiler parameter assignment task, FEAST can achieve comparable results with about 18% of features that are automatically selected from the entire feature pool. We also inspect these selected features and discuss their roles in program execution.
研究动机与目标
- 解决编译器优化任务中手动特征选择的随意性和冗余性问题。
- 在不牺牲性能的前提下,减少用于编译机器学习的特征数量。
- 自动化选择具有代表性且非冗余的静态特征,用于编译器参数分配。
- 通过仅使用静态特征,实现在编译优化中可扩展的、无需动态特征的性能预测。
- 提供一种通用框架,可适用于参数调优以外的多种编译任务。
提出的方法
- FEAST 利用 LASSO 回归通过惩罚非必要特征实现稀疏性诱导的特征选择。
- 采用顺序前向和后向选择方法,基于模型性能迭代添加或移除特征。
- 该框架处理从 cTuning 编译器集合中提取的 56 个静态特征池,包括控制流、指令和指针相关指标。
- 特征选择通过监督学习设置下的编译器参数分配任务进行评估,性能通过预测准确率衡量。
- 该方法设计为通用型,适用于编译任务中的任意数值特征集。
- 提出了一种自动化编译器参数分配方案,以在真实场景中评估 FEAST 的有效性。
实验结果
研究问题
- RQ1像 LASSO 和顺序选择这样的自动化特征选择方法,能否在保持编译器参数调优性能的同时,有效减少静态特征数量?
- RQ2在编译优化任务中,预测准确率不被牺牲的前提下,特征集最多可减少多少?
- RQ3哪些具体特征在预测最优编译器参数分配方面最具影响力?
- RQ4完全不依赖动态特征的方法能否实现与依赖昂贵性能分析或动态特征的方法相当的性能?
- RQ5FEAST 所选特征如何有助于理解程序行为和编译器优化?
主要发现
- FEAST 将原始的 56 个静态特征减少至约 10 个(原始池的 18%),同时在编译器参数分配任务中保持了相当的性能。
- 所选特征具有高度代表性,包括基本块数量、phi 节点计数、指针操作和指令类型等指标。
- 由于特征集更小且模型推理更快,该框架在需要重复运行程序的场景中显著减少了执行时间。
- 所选特征为程序结构和行为提供了有意义的洞察,例如控制流复杂性和内存访问模式。
- FEAST 中的 LASSO 和顺序选择方法在多次运行中一致识别出一个小型且高性能的特征子集。
- 该方法实现了可扩展的、无需动态特征的性能预测,使其在大规模编译工作负载中具有实际应用价值。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。