When optimizing the performance of science codes, they must be adapted to the target hardware every time a new system is bought. This task is typically done manually and is both time-consuming and error-prone. Recently, machine learning has been applied to code optimization; however, most existing approaches are black-box models that provide no guarantees regarding the correctness or legality of the transformations they produce. TADASHI is a Python library that bridges the gap between compiler technologies and machine learning. It enables machine learning experts with little to no compiler experience to transform and optimize their code while generating a list of transformations that clearly explain each modification step by step. In the original paper, the authors proposed applying machine learning to TADASHI for code optimization, making the process automatic, and provided simple illustrative examples. This work introduces EvoTADASHI, a genetic programming–based approach that evolves a list of transformations to be used by TADASHI. We compare our results with both the heuristic approach proposed in the reference paper and our own implementation of beam search. The results show that beam search and EvoTADASHI achieve comparable performance, with respective G-Mean speedups of 1.97x and 2.11x, while the latter requires half as many evaluations to reach a solution. Furthermore, EvoTADASHI’s results are further improved to a 2.18x speedup when the heuristic approach is used to bootstrap the evolutionary process.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

EvoTADASHI: Genetic Programming for High-Performance Code Optimization

  • João Eduardo Batista,
  • Emil Vatai,
  • Aleksandr Drozd,
  • Mohamed Wahib

摘要

When optimizing the performance of science codes, they must be adapted to the target hardware every time a new system is bought. This task is typically done manually and is both time-consuming and error-prone. Recently, machine learning has been applied to code optimization; however, most existing approaches are black-box models that provide no guarantees regarding the correctness or legality of the transformations they produce. TADASHI is a Python library that bridges the gap between compiler technologies and machine learning. It enables machine learning experts with little to no compiler experience to transform and optimize their code while generating a list of transformations that clearly explain each modification step by step. In the original paper, the authors proposed applying machine learning to TADASHI for code optimization, making the process automatic, and provided simple illustrative examples. This work introduces EvoTADASHI, a genetic programming–based approach that evolves a list of transformations to be used by TADASHI. We compare our results with both the heuristic approach proposed in the reference paper and our own implementation of beam search. The results show that beam search and EvoTADASHI achieve comparable performance, with respective G-Mean speedups of 1.97x and 2.11x, while the latter requires half as many evaluations to reach a solution. Furthermore, EvoTADASHI’s results are further improved to a 2.18x speedup when the heuristic approach is used to bootstrap the evolutionary process.