Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Compiler Auto-tuning through Multiple Phase Learning

About

Widely used compilers like GCC and LLVM usually have hundreds of optimizations controlled by optimization flags, which are enabled or disabled during compilation to improve runtime performance (e.g., small execution time) of the compiler program. Due to the large number of optimization flags and their combination, it is difficult for compiler users to manually tune compiler optimization flags. In the literature, a number of auto-tuning techniques have been proposed, which tune optimization flags for a compiled program by comparing its actual runtime performance with different optimization flag combination. Due to the huge search space and heavy actual runtime cost, these techniques suffer from the widely-recognized efficiency problem. To reduce the heavy runtime cost, in this paper we propose a lightweight learning approach which uses a small number of actual runtime performance data to predict the runtime performance of a compiled program with various optimization flag combination. Furthermore, to reduce the search space, we design a novel particle swarm algorithm which tunes compiler optimization flags with the prediction model. To evaluate the performance of the proposed approach CompTuner, we conduct an extensive experimental study on two popular C compilers GCC and LLVM with two widely used benchmarks cBench and PolyBench. The experimental results show that CompTuner significantly outperforms the five compared techniques, including the state-of-art technique BOCA.

Mingxuan Zhu, Dan Hao, Junjie Chen• 2023

Related benchmarks

TaskDatasetResultRank
Compiler OptimizationBLAS
I_O317.26
13
Compiler Optimizationopencv
I_O318.15
13
Compiler Optimizationtensorflow
I_O30.1083
13
Compiler Optimizationcbench
I_O30.3157
13
Compiler OptimizationMIBench
I_O323.03
13
Compiler Optimizationchstone
I_O327.87
13
Compiler Optimizationnpb
I_O331.43
13
Showing 7 of 7 rows

Other info

Follow for update