Machine-learning-guided compiler optimization for FPGAs
Learning LLVM pass sequences for high-level synthesis
High-level synthesis compiles C/C++ code into FPGA hardware, but LLVM’s optimization pipeline is tuned for CPUs and serves FPGA back ends poorly. With the CAAD Lab and Red Hat, I worked on letting a learned agent choose the LLVM pass sequence instead, rewarded by the quality of the resulting hardware, and compared supervised and reinforcement-learning approaches using RNN, Transformer, and GNN models of the program. Paper (PDF) · Red Hat Collaboratory project (2022) · Red Hat Research project page
Expands the reinforcement-learning strategies and quality metrics used to tune LLVM pass sequences for FPGA high-level synthesis, showing up to 23× faster learning, 4× more performance potential, and 3× speedup over -O3.
@inproceedings{shahzad2022rlhls,title={Reinforcement Learning Strategies for Compiler Optimization in High Level Synthesis},author={Shahzad, Hafsah and Sanaullah, Ahmed and Arora, Sanjay and Munafo, Robert and Yao, Xiteng and Drepper, Ulrich and Herbordt, Martin},booktitle={IEEE/ACM Workshop on the LLVM Compiler Infrastructure in HPC (LLVM-HPC), held with SC22, Dallas},year={2022},}