MPI-rical: Data-Driven MPI Distributed Parallelism Assistance with Transformers

要約

共有および分散メモリ システムのシリアル コードのソース間自動並列化は、ハイ パフォーマンス コンピューティングにおける困難なタスクです。
共有メモリ環境 (通常は OpenMP を使用) 向けにシリアル コードを並列コードに変換する試みは数多く行われてきましたが、分散メモリ環境向けにこれを実現したものはありませんでした。
この論文では、コーパス内の 50,000 以上のコード スニペットのうち、約 25,000 のシリアル コード スニペットとそれに対応する並列化された MPI コードでトレーニングされたトランスフォーマー ベースのモデルを使用して、MPI コードを自動生成するための MPI-rical と呼ばれる新しいアプローチを提案します (
MPICodeCorpus)。
モデルのパフォーマンスを評価するために、まずシリアル コードから MPI ベースの並列コードへの変換問題を 2 つのサブ問題に分解し、2 つの研究目標を開発します。ソース コード内の特定の位置として定義されるコード補完、MPI 関数の予測です。
コード変換は、MPI 関数とソース コード内のその位置を予測するものとして定義されます。
MPICodeCorpus データセットおよび現実世界の科学コード ベンチマークで MPI-rical を評価し、コード補完タスクと翻訳タスクの間でパフォーマンスを比較します。
私たちの実験結果は、MPI-rical はコード変換タスクよりもコード補完タスクの方が優れたパフォーマンスを発揮しますが、後者の方が、事前知識に関係なく MPI 関数の必要性をツールが提案する現実世界のプログラミング支援に適していることを示しています。
全体として、私たちのアプローチは、分散メモリ システムのシリアル コードの並列化の自動化において大きな前進を示しており、ソフトウェア開発者や研究者の貴重な時間とリソースを節約できます。
この作業で使用されるソース コードおよび他の関連ソースは、https://github.com/Scientific-Computing-Lab-NRCN/MPI-rical から入手できます。

要約(オリジナル)

Automatic source-to-source parallelization of serial code for shared and distributed memory systems is a challenging task in high-performance computing. While many attempts were made to translate serial code into parallel code for a shared memory environment (usually using OpenMP), none has managed to do so for a distributed memory environment. In this paper, we propose a novel approach, called MPI-rical, for automated MPI code generation using a transformer-based model trained on approximately 25,000 serial code snippets and their corresponding parallelized MPI code out of more than 50,000 code snippets in our corpus (MPICodeCorpus). To evaluate the performance of the model, we first break down the serial code to MPI-based parallel code translation problem into two sub-problems and develop two research objectives: code completion defined as given a location in the source code, predict the MPI function for that location, and code translation defined as predicting an MPI function as well as its location in the source code. We evaluate MPI-rical on MPICodeCorpus dataset and on real-world scientific code benchmarks and compare its performance between the code completion and translation tasks. Our experimental results show that while MPI-rical performs better on the code completion task than the code translation task, the latter is better suited for real-world programming assistance, in which the tool suggests the need for an MPI function regardless of prior knowledge. Overall, our approach represents a significant step forward in automating the parallelization of serial code for distributed memory systems, which can save valuable time and resources for software developers and researchers. The source code used in this work, as well as other relevant sources, are available at: https://github.com/Scientific-Computing-Lab-NRCN/MPI-rical

arxiv情報

著者 Nadav Schneider,Tal Kadosh,Niranjan Hasabnis,Timothy Mattson,Yuval Pinter,Gal Oren
発行日 2023-05-16 13:50:24+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL, cs.DC, cs.LG パーマリンク