Abstract: Compiler autotuning enables developers to benefit from compiler-provided code optimizations without requiring specialized expertise or code changes. This capability has driven the development of various autotuning approaches, each prioritizing factors such as recommendation speed or quality. In this work, we enhance the Optimization Space Learning (OSL) approach, a lightweight alternative to computationally intensive state-of-the-art methods, by introducing advanced techniques for program similarity scoring. OSL uses collaborative filtering to provide rapid optimization recommendations. We explore several new methods to improve OSL’s similarity scoring, including metric normalization, error-based similarity, weighted metrics, and Abstract Syntax Tree (AST)-based similarity. Among these methods, the normalized and equalized metrics approach showed the most significant improvement, resulting in, on average, \(13.27\%\) faster runtime compared to GCC’s default O3 optimizations, a \(57.4\%\) improvement over the original OSL method, all while maintaining fast recommendation times. Additionally, a combination approach achieved an even more significant improvement of \(151\%\) over the original method but at the cost of increased recommendation time. This work advances OSL’s effectiveness and highlights the potential for integrating high-quality similarity scores into this compiler autotuning approach.
Loading