一种基于遗传算法的编译器参数自动调优方法

By using a compiler parameter automatic tuning method based on genetic algorithms, the problem of traditional compiler optimization option combinations being difficult to adapt to different platforms is solved. It achieves the best performance selection under the user-defined option set, improving compilation efficiency and adaptability.

CN116204191BActive Publication Date: 2026-07-17BEIHANG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIHANG UNIV
Filing Date
2023-01-09
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

Traditional methods of manually selecting compiler optimization option combinations are difficult to achieve optimal performance across different platforms and program behaviors, and existing compiler default option combinations are often not suitable for specific applications.

Method used

An automatic compiler parameter tuning method based on genetic algorithms is adopted. By modifying the tuning option configuration file and the compilation and execution script file, and combining the Xgboost cost model for iterative compilation, the optimal combination of compilation options is automatically selected, realizing the separation of the compilation process and the execution process, and supporting user-defined compilation option sets.

Benefits of technology

It improves the efficiency of obtaining compilation parameter combinations, saves compilation and runtime time, achieves optimal performance for user-specific goals, has good versatility and adaptability, and does not require modification of user programs or compiler code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116204191B_ABST
    Figure CN116204191B_ABST
Patent Text Reader

Abstract

本发明提供了一种基于遗传算法的编译器参数自动调优方法,涉及计算机编译器。本发明方法包括:通过修改调优选项配置文件,记录用户要进行调优的编译选项集合;编写编译运行脚本文件,读取要调优的编译选项集合,运行输出程序性能数据;在要调优的编译选项组合构成的搜索空间中进行迭代编译,获取最优编译选项组合,其中每次迭代训练基于Xgboost的成本模型,并利用该模型进行程序性能数据预测。本发明能在用户给出的编译选项集合中选出能够使得程序性能达到最佳的编译选项组合,超过编译器默认提供的编译选项组合,无需修改用户程序代码和编译器代码,具有较好的通用性和适配性。
Need to check novelty before this filing date? Find Prior Art