| 引用本文: | 周文浩,沈莉,王飞,肖谦,李斌,高秀武,宋长明,安虹,漆锋滨.SWTuner: 基于机器学习方法的分布式编译调优框架.软件学报,2026,37(6):2527-2545 |
| |
|
| |
|
|
| 本文已被:浏览 569次 下载 983次 |
 码上扫一扫! |
|
|
| SWTuner: 基于机器学习方法的分布式编译调优框架 |
|
周文浩1, 沈莉1, 王飞2, 肖谦1, 李斌3, 高秀武3, 宋长明1, 安虹1, 漆锋滨3
|
|
1.中国科学技术大学, 安徽 合肥 230026;2.清华大学, 北京 100084;3.江南计算技术研究所, 江苏 无锡 214083
|
|
| 摘要: |
| 随着编译技术的不断进步, 现代编译器支持了更为丰富的编程模型和复杂的编译优化, 使得手动调整编译选项以获得最佳性能变得非常困难. 尽管已有多种自动化的编译调优方法被提出, 但是面对庞大的搜索空间, 传统的启发式搜索算法很难避免陷入局部最优解. 同时, 现有调优方法主要针对单核或多核架构设计, 这限制了它们在大规模并行计算系统中的应用. 为了解决这些问题, 设计并实现基于机器学习方法的分布式编译调优框架SWTuner, 通过引入AUC-Bandit分布式元搜索策略、机器学习模型指导的性能预测以及基于SHAP的编译选项分析及筛选等技术手段, 有效提升了编译调优过程中的资源利用率和搜索效率. 实验结果显示, SWTuner在神威新一代超级计算机上对典型测试用例的调优中表现出色, 相较于其他调优方法, 其不仅缩短了搜索时间, 还能够显著降低搜索过程中的实际运行功耗. 在调优过程中, SWTuner所使用的随机森林模型显示出了良好的泛化能力和预测准确性, 并且在保证调优效果的前提下有效降低了搜索空间的维度, 为高性能计算中的自动编译调优提供了一个高效且可靠的解决方案. |
| 关键词: 自动化调优 AUC-Bandit算法 分布式元搜索 随机森林模型 Shapley值 |
| DOI:10.13328/j.cnki.jos.007488 |
| 分类号:TP314 |
| 基金项目:国家重点研发计划(2023YFB3001500) |
|
| SWTuner: Distributed Compilation Tuning Framework Based on Machine Learning Methods |
|
ZHOU Wen-Hao1, SHEN Li1, WANG Fei2, XIAO Qian1, LI Bin3, GAO Xiu-Wu3, SONG Chang-Ming1, AN Hong1, QI Feng-Bin3
|
|
1.University of Science and Technology of China, Hefei 230026, China;2.Tsinghua University, Beijing 100084, China;3.Jiangnan Institute of Computing Technology, Wuxi 214083, China
|
| Abstract: |
| With the continuous advancement of compilation technology, modern compilers support richer programming models and more complex compilation optimizations, which makes manually adjusting compilation options for optimal performance extremely challenging. Although various automated compilation tuning methods have been proposed, traditional heuristic search algorithms often struggle to avoid being trapped in local optima when confronted with vast search spaces. Moreover, most existing tuning methods target single-core or multi-core architectures, limiting their use in large-scale parallel computing systems. To address these issues, this study designs and implements a distributed compilation tuning framework, SWTuner, based on machine learning methodologies. By introducing AUC-Bandit-based distributed meta-search strategies, machine learning model-guided performance prediction, and SHAP-based compilation option analysis and filtering, the resource utilization and search efficiency during the compilation tuning process are significantly improved. Experimental results show that SWTuner performs excellently in tuning typical test cases on the new-generation Sunway supercomputer, not only reducing search time but also achieving notable reductions in actual execution power consumption during the search process compared to other tuning methods. During the tuning process, the random forest model employed by SWTuner demonstrates good generalization capability and prediction accuracy, effectively reducing search space dimensionality while maintaining tuning effectiveness, providing an efficient and reliable solution for automatic compilation tuning in high-performance computing. |
| Key words: auto-tuning AUC-Bandit algorithm distributed meta-search random forest model Shapley value |
|
|
|
|