A Machne Learning Framework for Compiler Optimizations
Rakesh Kumar Mahendran, V Raghav, K Ragavendar · 2024
Academic scholars have focused a lot of emphasis on the application of machine learning (ML) techniques for compiler improvements. The use of machine learning strength compilers in the general-purpose sector is still a ways off, though. MLGO1, a framework for integrating ML technology methods from the industrial compiler Low Level Virtual Machine (LLVM). In a case study, describe the details and results of replacing the LLVM in-lining-for-size optimization based on heuristics with machine-trained models. To the best of the knowledge, this study is the first extensive application of machine learning in a complex compiler pass in a real-world scenario. The primary LLVM repository has it. In contrast to the state-of-the-art LLVM-Oz, the two preferred machine learning methods, Policy Gradient and to train the in-lining-for-size model, using evolution techniques, achieve a size reduction of up to 7%. Approach improves CNN models' stability and fairness and opens the door for more dependable and trustworthy machine learning applications across a variety of sectors when combined with real-time bias detection and creative assessment techniques. It is an important strategy for addressing a number of problems in the creation and use of models, and it might greatly improve the models' equity and accuracy. Following months of rigorous research, the same model that was trained on a single corpus performs well when applied to both the same set of targets and a range of real-world targets. When using machine learning techniques in real-world situations, it is beneficial to utilize this learned model characteristic.