Search papers, labs, and topics across Lattice.
WarmTuner introduces an offline-to-online reinforcement learning framework that adapts historical compiler optimization data into a program-specific policy for tuning flag configurations. By leveraging runtime feedback to refine its predictions, WarmTuner overcomes the limitations of existing methods that rely solely on static historical data, thus optimizing the search process. The evaluation demonstrates that WarmTuner achieves an average speedup of 1.732x compared to GCC -O3, outperforming other techniques on 14 out of 30 benchmark programs.
Historical data can be dynamically adapted to achieve an impressive 1.732x speedup in compiler optimization, reshaping how we approach autotuning.
Compilers are fundamental software tools that translate high-level programs into machine code. Modern compilers expose hundreds of optimizations, each turned on or off through an optimization flag, to improve the performance of the generated code. However, the number of possible flag combinations grows exponentially, making it difficult to find a flag configuration well suited to a given target program. Existing compiler auto-tuning techniques reduce tuning cost by pruning the search space, injecting search biases, or predicting configuration performance. Although some exploit program features, the knowledge they extract from historical data is frozen once search begins; runtime feedback then guides only the search itself, never the prior. As a result, when this prior mismatches the target program, these methods waste much of the limited online budget before the search reaches good configurations. We propose WarmTuner, an offline-to-online reinforcement learning framework that instead turns historical records into a program-conditioned policy that predicts each flag's setting over the full flag space and remains adaptable on the target program. Offline, WarmTuner learns this program-conditioned policy over the full flag space from historical good configurations. Online, it refines the same policy on the target program using real compile-run feedback, so that the policy is driven by measured speedups rather than limited to the historical data. We instantiate the online update with Group Relative Policy Optimization (GRPO), which compares candidates in the same round and avoids a separate value model. We evaluate WarmTuner on GCC 15.2.0 with cBench and PolyBench. The results show that WarmTuner achieves an average speedup of 1.732x over GCC -O3 and obtains the best result on 14/30 programs, significantly outperforming the compared techniques.