Page 208 - 《软件学报》2026年第6期
P. 208

软件学报 ISSN 1000-9825, CODEN RUXUEW                                        E-mail: jos@iscas.ac.cn
                 2026,37(6):2527−2545 [doi: 10.13328/j.cnki.jos.007488] [CSTR: 32375.14.jos.007488]  http://www.jos.org.cn
                 ©中国科学院软件研究所版权所有.                                                          Tel: +86-10-62562563



                                                                                 *
                 SWTuner: 基于机器学习方法的分布式编译调优框架

                 周文浩  1 ,    沈    莉  1 ,    王    飞  3 ,    肖    谦  1 ,    李    斌  2 ,    高秀武  2 ,    宋长明  1 ,    安    虹  1 ,    漆锋滨  2


                 1
                  (中国科学技术大学, 安徽 合肥 230026)
                 2
                  (江南计算技术研究所, 江苏 无锡 214083)
                 3
                  (清华大学, 北京 100084)
                 通信作者: 漆锋滨, E-mail: qifb116@sina.com

                 摘 要: 随着编译技术的不断进步, 现代编译器支持了更为丰富的编程模型和复杂的编译优化, 使得手动调整编译
                 选项以获得最佳性能变得非常困难. 尽管已有多种自动化的编译调优方法被提出, 但是面对庞大的搜索空间, 传统
                 的启发式搜索算法很难避免陷入局部最优解. 同时, 现有调优方法主要针对单核或多核架构设计, 这限制了它们在
                 大规模并行计算系统中的应用. 为了解决这些问题, 设计并实现基于机器学习方法的分布式编译调优框架                                SWTuner,
                 通过引入   AUC-Bandit 分布式元搜索策略、机器学习模型指导的性能预测以及基于                     SHAP  的编译选项分析及筛选
                 等技术手段, 有效提升了编译调优过程中的资源利用率和搜索效率. 实验结果显示, SWTuner 在神威新一代超级计
                 算机上对典型测试用例的调优中表现出色, 相较于其他调优方法, 其不仅缩短了搜索时间, 还能够显著降低搜索过
                 程中的实际运行功耗. 在调优过程中, SWTuner 所使用的随机森林模型显示出了良好的泛化能力和预测准确性, 并
                 且在保证调优效果的前提下有效降低了搜索空间的维度, 为高性能计算中的自动编译调优提供了一个高效且可靠
                 的解决方案.
                 关键词: 自动化调优; AUC-Bandit 算法; 分布式元搜索; 随机森林模型; Shapley          值
                 中图法分类号: TP314

                 中文引用格式: 周文浩, 沈莉, 王飞, 肖谦, 李斌, 高秀武, 宋长明, 安虹, 漆锋滨. SWTuner: 基于机器学习方法的分布式编译调优框
                 架. 软件学报, 2026, 37(6): 2527–2545. http://www.jos.org.cn/1000-9825/7488.htm
                 英文引用格式: Zhou WH, Shen L, Wang F, Xiao Q, Li B, Gao XW, Song CM, An H, Qi FB. SWTuner: Distributed Compilation
                 Tuning  Framework  Based  on  Machine  Learning  Methods.  Ruan  Jian  Xue  Bao/Journal  of  Software,  2026,  37(6):  2527–2545  (in
                 Chinese). http://www.jos.org.cn/1000-9825/7488.htm
                 SWTuner: Distributed Compilation Tuning Framework Based on Machine Learning Methods
                                                3
                                      1
                             1
                                                                                                       1
                                                                              2
                                                                                              1
                                                           1
                                                                  2
                 ZHOU Wen-Hao , SHEN Li , WANG Fei , XIAO Qian , LI Bin , GAO Xiu-Wu , SONG Chang-Ming , AN Hong ,
                 QI Feng-Bin 2
                 1
                 (University of Science and Technology of China, Hefei 230026, China)
                 2
                 (Jiangnan Institute of Computing Technology, Wuxi 214083, China)
                 3
                 (Tsinghua University, Beijing 100084, 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


                 *    基金项目: 国家重点研发计划  (2023YFB3001500)
                  收稿时间: 2024-09-27; 修改时间: 2025-05-05; 采用时间: 2025-06-12; jos 在线出版时间: 2025-10-29
                  CNKI 网络首发时间: 2025-10-31
   203   204   205   206   207   208   209   210   211   212   213