Supersonic: Learning to Generate Source Code Optimisations in C/C++

要約

ソフトウェアの最適化により、機能を維持しながらリソース効率を高めるためにプログラムが改良されます。
従来、これは開発者とコンパイラによって行われるプロセスでした。
このペーパーでは、3 番目のオプションであるソース コード レベルでの自動最適化を紹介します。
私たちは、最適化のためにソースコードのマイナーな変更をターゲットとしたニューラルアプローチである Supersonic を紹介します。
seq2seq モデルを使用して、Supersonic は C/C++ プログラム ペア ($x_{t}$、$x_{t+1}$) でトレーニングされます。ここで、$x_{t+1}$ は $x_{t の最適化されたバージョンです。
}$ を実行し、diff を出力します。
Supersonic のパフォーマンスは、競技プログラミング タスクにおいて OpenAI の GPT-3.5-Turbo および GPT-4 と比較してベンチマークされています。
実験では、Supersonic がコード最適化タスクにおいて両方のモデルよりも優れているだけでなく、GPT-3.5-Turbo の 600 倍以上、GPT-4 の 3700 倍以上小さく、変更の範囲を最小限に抑えていることがわかりました。

要約(オリジナル)

Software optimization refines programs for resource efficiency while preserving functionality. Traditionally, it is a process done by developers and compilers. This paper introduces a third option, automated optimization at the source code level. We present Supersonic, a neural approach targeting minor source code modifications for optimization. Using a seq2seq model, Supersonic is trained on C/C++ program pairs ($x_{t}$, $x_{t+1}$), where $x_{t+1}$ is an optimized version of $x_{t}$, and outputs a diff. Supersonic’s performance is benchmarked against OpenAI’s GPT-3.5-Turbo and GPT-4 on competitive programming tasks. The experiments show that Supersonic not only outperforms both models on the code optimization task, but also minimizes the extent of change with a more than 600x smaller than GPT-3.5-Turbo and 3700x smaller than GPT-4.

arxiv情報

著者 Zimin Chen,Sen Fang,Martin Monperrus
発行日 2023-09-26 11:21:46+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.SE パーマリンク