We strive to create an environment conducive to many different types of research across many different time scales and levels of risk. We introduce It

Scalable self-improvement for compiler optimization

submited by
Style Pass
2024-10-23 23:00:06

We strive to create an environment conducive to many different types of research across many different time scales and levels of risk.

We introduce Iterative BC-Max, a novel technique that aims to reduce the size of the compiled binary files by improving inlining decisions. We describe several benefits to using this approach compared to using off-the-shelf RL algorithms.

Most systems we regularly interact with, such as computer operating systems, are faced with the challenge of providing good performance, while managing limited resources like computational time and memory. Since it is challenging to optimally manage these resources, there is increasing interest in the use of machine learning (ML) to make this decision-making data driven rather than heuristic. In compiler optimization, inlining is the process of replacing a call to a function in a program with the body of that function. Inlining for size aims to minimize the size of the final binary file by removing redundant code.

Size is a constraining factor for many applications, such as on-device products, where an increase can hinder performance or even prevent the updating and use of some products. Inlining decisions are a key component that a compiler can optimize, with changes in this decision resulting in a final software binary of significantly different size. Prior work has successfully applied reinforcement learning (RL) algorithms to train effective inlining policies, which have been deployed in several systems. However, most RL algorithms are sensitive to reward signals and require careful hyperparameter tuning to avoid instability and poor performance. Consequently, as the underlying system changes, the RL algorithms must be run again, which is both costly and unreliable in deployment.

Leave a Comment