Automating Reinforcement Learning Architecture Design for Code Optimization

被引:6
作者
Wang, Huanting [1 ,2 ]
Tang, Zhanyong [1 ]
Zhang, Cheng [1 ]
Zhao, Jiaqi [1 ]
Cummins, Chris [3 ]
Leather, Hugh [3 ]
Wang, Zheng [2 ]
机构
[1] Northwest Univ, Xian, Peoples R China
[2] Univ Leeds, Leeds, W Yorkshire, England
[3] Meta AI Res, New York, NY USA
来源
CC'22: PROCEEDINGS OF THE 31ST ACM SIGPLAN INTERNATIONAL CONFERENCE ON COMPILER CONSTRUCTION | 2022年
基金
美国国家科学基金会;
关键词
Compiler optimization; reinforcement learning; code optimization; COMPILATION; COMPILER;
D O I
10.1145/3497776.3517769
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Reinforcement learning (RL) is emerging as a powerful technique for solving complex code optimization tasks with an ample search space. While promising, existing solutions require a painstaking manual process to tune the right task-specific RL architecture, for which compiler developers need to determine the composition of the RL exploration algorithm, its supporting components like state, reward and transition functions, and the hyperparameters of these models. This paper introduces SUPERSONIC, a new open-source framework to allow compiler developers to integrate RL into compilers easily, regardless of their RL expertise. SUPERSONIC supports customizable RL architecture compositions to target a wide range of optimization tasks. A key feature of SUPERSONIC is the use of deep RL and multi-task learning techniques to develop a meta-optimizer to automatically find and tune the right RL architecture from training benchmarks. The tuned RL can then be deployed to optimize new programs. We demonstrate the efficacy and generality of SUPERSONIC by applying it to four code optimization problems and comparing it against eight auto-tuning frameworks. Experimental results show that SUPERSONIC consistently improves hand-tuned methods by delivering better overall performance, accelerating the deployment-stage search by 1.75x on average (up to 100x).
引用
收藏
页码:129 / 143
页数:15
相关论文
共 92 条
  • [1] Learning to Optimize Halide with Tree Search and Random Programs
    Adams, Andrew
    Ma, Karima
    Anderson, Luke
    Baghdad, Riyadh
    Li, Tzu-Mao
    Gharbi, Michael
    Steiner, Benoit
    Johnson, Steven
    Fatahalian, Kayvon
    Durand, Fredo
    Ragan-Kelley, Jonathan
    [J]. ACM TRANSACTIONS ON GRAPHICS, 2019, 38 (04):
  • [2] Agakov F, 2006, INT SYM CODE GENER, P295
  • [3] Ahn Byung Hoon, 2019, INT C LEARNING REPRE, V20
  • [4] Akkaya I., 2019, SOLVING RUBIKS CUBE
  • [5] Finding effective compilation sequences
    Almagor, L
    Cooper, KD
    Grosul, A
    Harvey, TJ
    Reeves, SW
    Subramanian, D
    Torczon, L
    Waterman, T
    [J]. ACM SIGPLAN NOTICES, 2004, 39 (07) : 231 - 239
  • [6] [Anonymous], 1998, SC'98: Proceedings of the 1998 ACM/IEEE conference on Supercomputing, DOI [10.5555/509058.509096, DOI 10.1109/SC.1998.10004]
  • [7] [Anonymous], LLVM TEST SUITE
  • [8] [Anonymous], 2014, INT WORKSHOP LANGUAG
  • [9] [Anonymous], COLL BENCHM
  • [10] OpenTuner: An Extensible Framework for Program Autotuning
    Ansel, Jason
    Kamil, Shoaib
    Veeramachaneni, Kalyan
    Ragan-Kelley, Jonathan
    Bosboom, Jeffrey
    O'Reilly, Una-May
    Amarasinghe, Saman
    [J]. PROCEEDINGS OF THE 23RD INTERNATIONAL CONFERENCE ON PARALLEL ARCHITECTURES AND COMPILATION TECHNIQUES (PACT'14), 2014, : 303 - 315