An Experimental Analysis of RL based Compiler Optimization Techniques using Compiler GYM
Boda Venkata Nikith, Shaik Reeha, G Mani Prakash Reddy, Meena Belwal · 2024
Compiler optimization significantly impacts algorithm performance, whether it may be graph-based, parallel computing workloads and more. Understanding how these algorithms' performance varies under different optimization scenarios is crucial. This study explores diverse Reinforcement Learning (RL) algorithms for code optimization in Compiler Gym, including Actor-Critic, Random Walk, Tabular Q, and a Brute Force approach. Three benchmark datasets, Dijkstra, CRC32, and npbv0 from Compiler Gym libraries, and are evaluated using execution time and maximum reward metrics. This study reveals that the npbv0 dataset consistently outperforms others across all RL algorithms, demonstrating its compatibility with RL-based compiler optimization. This research highlights the role of compiler optimization in algorithm performance, emphasizing the potential of RL techniques in diverse workloads, with npbv0 excelling as a benchmark dataset.