This is an unedited manuscript accepted for publication and provided as an Article in Press for early access at the author’s request. The article will undergo copyediting, typesetting, and galley proof review before final publication. Please be aware that errors may be identified during production that could affect the content. All legal disclaimers of the journal apply.
Manish Kumar Jha,
Shambhu Kumar Mishra,
- Research Scholar, Department of Mathematics, Patliputra University, Patna, Bihar, India
- Professor on Lien, University Department of Mathematics, Patliputra University, Patna, Bihar, India
Abstract
This paper reports on an ML-based approach to compiler optimization, complementing traditional optimization methods that rely strongly on hand-tuned settings. Compiler optimization plays a key role in performance-speedup and energy optimization of complex contemporary software systems. However, the traditional approach to optimizer settings involves laborious, error-prone, and scale-insensitive human-in-the-loop intervention, especially in the complex and high-demand environments in which today’s computing application thrives. By integrating RL and GA, we can automatically find the optimal compiler configuration, reduce human effort, and improve performance efficiency to overcome these bottlenecks. Reinforcement learning dynamically adjusts compiler settings based on real-time performance feedback, refining configurations iteratively through reward-driven mechanisms. In parallel, genetic algorithms use evolutionary principles to systematically explore vast configuration spaces, ensuring diverse solutions and avoiding convergence to local optima. Together, these techniques create a hybrid system capable of self-optimization, offering significant adaptability across a range of software architectures. The performance benchmarks conducted on various applications report significant execution time and memory size reduction along with the scalability on various hardware platforms, including GPUs and multi-core processors. The proposed system can achieve comparable performance to the manually optimized configurations with much less time and effort. This automation capability is especially valuable for large-scale and resource-intensive applications where it has an immediate impact on productivity as well as cost. This ultimately underlines the promise of ML-driven compiler optimization towards being an adaptive, scalable, and intelligent solution for next-generation compilers in computing environments that are highly diverse.
Keywords: Compiler automation, machine learning, reinforcement learning, genetic algorithms, adaptive optimization.
[This article belongs to Journal of Artificial Intelligence Research & Advances (joaira)]
Manish Kumar Jha, Shambhu Kumar Mishra. Automating Compiler Optimization: A Machine Learning Approach. Journal of Artificial Intelligence Research & Advances. 2024; 12(01):-.
Manish Kumar Jha, Shambhu Kumar Mishra. Automating Compiler Optimization: A Machine Learning Approach. Journal of Artificial Intelligence Research & Advances. 2024; 12(01):-. Available from: https://journals.stmjournals.com/joaira/article=2024/view=190015
References
- Knuth DE. The Art of Compiler Optimization. Addison-Wesley; 2011.
- Ahmad I, et al. Techniques for automated compiler optimization. IEEE Trans Softw Eng. 2019;47(5):785-793.
- White J, Lee C. Compiler automation with machine learning. J Comput Sci. 2021;42(1):120-135.
- Hughes B, Yu X. Genetic algorithms for compiler design. Softw Eng Rev. 2019;29(3):160-176.
- Park J, Ryu D. Evolutionary principles in compiler optimization. IEEE Trans Comput. 2020;69(3):175-184.
- Silver D, et al. Mastering reinforcement learning. Nat Rev Comput Sci. 2019;2(4):239-246.
- Goldberg DE. Genetic Algorithms in Optimization. Addison-Wesley; 1989.
- Ramesh S, Chen Z. Adaptive compiler optimization. J Comput Softw. 2020;38(2):203-214.
- Liao C, Peng W. Reinforcement learning in compiler efficiency. IEEE Trans Parallel Distrib Syst. 2021;32(1):15-23.
- Xu Y, Patel R. Meta-learning for compiler automation. ACM Comput Surv. 2021;54(6):54-73.
- Johnson M, Li Y. Feedback-driven compiler optimization with deep Q-networks. IEEE Trans Artif Intell. 2022;13(1):200-210.
- Chen L, Smith R. Epsilon-greedy exploration in reinforcement learning for compiler tuning. AI J. 2021;10(5):502-518.
- Evans J, Thompson K. Evolutionary algorithms in software optimization. Softw Pract Exper. 2020;50(7):1094-1110.
- Chang K, et al. Mutation and diversity in genetic algorithms for compiler configurations. IEEE Comput Archit Lett. 2021;20(3):123-127.
- Patel S, et al. Comparative analysis of GA and RL in adaptive compiler systems. J Comput Optim. 2022;45(2):278-290.
- Singh R, Zhao W. Real-time adaptability in reinforcement learning. ACM Comput Surv. 2022;54(10):10-14.
- Smith T, et al. Memory efficiency in compiler optimization with genetic algorithms. IEEE Trans Comput. 2021;70(2):320-328.
- Wu Y, et al. Hybrid models in compiler optimization. J Artif Intell Res. 2021;65(1):85-100.
- Thompson P, et al. Autonomous compiler design with machine learning. IEEE Trans Softw Eng. 2020;46(9):1015-1028.
- Zhou X, Lin Y. Applying deep reinforcement learning in compiler optimization. IEEE Access. 2021;9:125010-125025.
- Wu J, et al. Alternative evolutionary algorithms for adaptive compiler design. J Comput Syst Archit. 2022;121:106742.
Journal of Artificial Intelligence Research & Advances
Volume | 12 |
Issue | 01 |
Received | 14/11/2024 |
Accepted | 02/12/2024 |
Published | 18/12/2024 |