ACPO: AI-Enabled Compiler-Driven Program Optimization

要約

プログラムのパフォーマンスを最適化する鍵は、コンパイラーによって特定の変換がいつ適用されるべきかを正しく決定することです。
従来、このような収益性の決定は、非常に少数のベンチマークに合わせて調整された手作業でコーディングされたアルゴリズムによって行われており、通常、ベンチマーク スイートが変更された場合に再調整するために多大な労力が必要になります。
これは、機械学習モデルを適用してチューニング プロセスをスピードアップする理想的な機会です。
この認識は 90 年代後半から存在していましたが、ML がエンドツーエンドのフレームワークとしてコンパイラに実際に適用できるようになったのは、最近の ML の進歩によるものです。
それでも、ML をコンパイラーにシームレスに統合するには、モデルが更新されたときにコンパイラーを継続的に再構築する必要があります。
このペーパーでは、ACPO: \textbf{\underline{A}}I-Enabled \textbf{\underline{C}}ompiler-driven \textbf{\underline{P}}rgram \textbf{\underline{O}}最適化について説明します。
さまざまな最適化パスに ML モデルを採用することでメリットを享受できる、シンプルで包括的なツールを LLVM に提供する新しいフレームワークです。
まず、ACPO の概要、クラス階層、機能を紹介し、その後、ML 対応のループ アンロール パスと関数インライン化パスによる ACPO のいくつかのユース ケースを示し、ACPO を活用して最適化する方法について説明します。
他のパス。
実験結果によると、Polybench、Coral-2、CoreMark、および Graph-500 に展開した場合、ループ アンロールの ACPO モデルは、LLVM の O3 最適化と比較して、平均 4\%、3\%、5.4\%、0.2\% 向上することができます。
、 それぞれ。
さらに、Inliner モデルも追加することで、ACPO は、LLVM の O3 最適化と比較して、Polybench と Cbench でそれぞれ最大 4.5\% と 2.4\% を提供できます。

要約(オリジナル)

The key to performance optimization of a program is to decide correctly when a certain transformation should be applied by a compiler. Traditionally, such profitability decisions are made by hand-coded algorithms tuned for a very small number of benchmarks, usually requiring a great deal of effort to be retuned when the benchmark suite changes. This is an ideal opportunity to apply machine-learning models to speed up the tuning process; while this realization has been around since the late 90s, only recent advancements in ML enabled a practical application of ML to compilers as an end-to-end framework. Even so, seamless integration of ML into the compiler would require constant rebuilding of the compiler when models are updated. This paper presents ACPO: \textbf{\underline{A}}I-Enabled \textbf{\underline{C}}ompiler-driven \textbf{\underline{P}}rogram \textbf{\underline{O}}ptimization; a novel framework to provide LLVM with simple and comprehensive tools to benefit from employing ML models for different optimization passes. We first showcase the high-level view, class hierarchy, and functionalities of ACPO and subsequently, demonstrate \taco{a couple of use cases of ACPO by ML-enabling the Loop Unroll and Function Inlining passes and describe how ACPO can be leveraged to optimize other passes. Experimental results reveal that ACPO model for Loop Unroll is able to gain on average 4\% and 3\%, 5.4\%, 0.2\% compared to LLVM’s O3 optimization when deployed on Polybench, Coral-2, CoreMark, and Graph-500, respectively. Furthermore, by adding the Inliner model as well, ACPO is able to provide up to 4.5\% and 2.4\% on Polybench and Cbench compared with LLVM’s O3 optimization, respectively.

arxiv情報

著者 Amir H. Ashouri,Muhammad Asif Manzoor,Duc Minh Vu,Raymond Zhang,Ziwen Wang,Angel Zhang,Bryan Chan,Tomasz S. Czajkowski,Yaoqing Gao
発行日 2023-12-15 17:49:24+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.LG, cs.PF, cs.PL, I.2.6 パーマリンク