Official resources of "AwareCompiler: Agentic Context-Aware Compiler Optimization via a Synergistic Knowledge-Data Driven Framework". Hongyu Lin*, Haolin Pan*, Haoran Luo, Kaichun Yao, Yuchen Li, Libo Zhang, Mingjie Xing, Yanjun Wu. [paper]
Compiler optimization involves selecting and ordering optimization passes from a vast, structured space while preserving program correctness.
Although LLM-based agents show promise, existing approaches often suffer from:
- Semantic misalignment between abstract program features and concrete optimization passes
- Brute-force exploration with weak interaction between agents and compilers
- Sparse and delayed rewards in long-horizon optimization sequences
AwareCompiler addresses these challenges through a synergistic knowledge–data-driven framework, enabling context-aware, valid, and efficient optimization.
# Create and activate conda environment
conda create -n Aware-Compiler python==3.10
conda activate Aware-Compiler
# Initialize and update submodules
git submodule update --init --recursive
# Install verl and other dependencies
cd verl
pip3 install -e .
cd ..
pip3 install vllm
pip3 install flash-attn --no-build-isolation
pip3 install FlagEmbedding
pip3 install faiss-cpuTo run Experiment 1 and 2, follow these steps:
# dataset perparation
cd examples/data_preprocess
PYTHONPTYH="../../" python3 compiler_autotuning_sft.py
PYTHONPTYH="../../" python3 compiler_autotuning_rl.pybash train_sft.sh
bash train_rl.shAfter training your models, follow these steps for inference:
- Merge model weights:
bash infer_model_merge.sh- Deploy the vLLM Service:
bash infer_vllm_serve.sh- Run inference:
bash infer_run.shIf you use AwareCompiler in your research, please cite:
@misc{lin2025awarecompileragenticcontextawarecompiler,
title={AwareCompiler: Agentic Context-Aware Compiler Optimization via a Synergistic Knowledge-Data Driven Framework},
author={Hongyu Lin and Haolin Pan and Haoran Luo and Yuchen Li and Kaichun Yao and Libo Zhang and Mingjie Xing and Yanjun Wu},
year={2025},
eprint={2510.11759},
archivePrefix={arXiv},
primaryClass={cs.PL},
url={https://arxiv.org/abs/2510.11759},
}Contributions and feedback are greatly appreciated! Whether you've found a bug, have a question, or want to suggest improvements, please open an issue. Your input helps make AwareCompiler better for everyone.
For further questions, please contact: [email protected], [email protected], [email protected].
