MPIrigen: MPI Code Generation through Domain-Specific Language Models

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Schneider, Nadav, Hasabnis, Niranjan, Vo, Vy A., Kadosh, Tal, Krien, Neva, Capotă, Mihai, Tamir, Guy, Willke, Ted, Ahmed, Nesreen, Pinter, Yuval, Mattson, Timothy, Oren, Gal
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866913325687767040
author Schneider, Nadav
Hasabnis, Niranjan
Vo, Vy A.
Kadosh, Tal
Krien, Neva
Capotă, Mihai
Tamir, Guy
Willke, Ted
Ahmed, Nesreen
Pinter, Yuval
Mattson, Timothy
Oren, Gal
author_facet Schneider, Nadav
Hasabnis, Niranjan
Vo, Vy A.
Kadosh, Tal
Krien, Neva
Capotă, Mihai
Tamir, Guy
Willke, Ted
Ahmed, Nesreen
Pinter, Yuval
Mattson, Timothy
Oren, Gal
contents The imperative need to scale computation across numerous nodes highlights the significance of efficient parallel computing, particularly in the realm of Message Passing Interface (MPI) integration. The challenging parallel programming task of generating MPI-based parallel programs has remained unexplored. This study first investigates the performance of state-of-the-art language models in generating MPI-based parallel programs. Findings reveal that widely used models such as GPT-3.5 and PolyCoder (specialized multi-lingual code models) exhibit notable performance degradation, when generating MPI-based programs compared to general-purpose programs. In contrast, domain-specific models such as MonoCoder, which are pretrained on MPI-related programming languages of C and C++, outperform larger models. Subsequently, we introduce a dedicated downstream task of MPI-based program generation by fine-tuning MonoCoder on HPCorpusMPI. We call the resulting model as MPIrigen. We propose an innovative preprocessing for completion only after observing the whole code, thus enabling better completion with a wider context. Comparative analysis against GPT-3.5 zero-shot performance, using a novel HPC-oriented evaluation method, demonstrates that MPIrigen excels in generating accurate MPI functions up to 0.8 accuracy in location and function predictions, and with more than 0.9 accuracy for argument predictions. The success of this tailored solution underscores the importance of domain-specific fine-tuning in optimizing language models for parallel computing code generation, paving the way for a new generation of automatic parallelization tools. The sources of this work are available at our GitHub MPIrigen repository: https://github.com/Scientific-Computing-Lab-NRCN/MPI-rigen
format Preprint
id arxiv_https___arxiv_org_abs_2402_09126
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle MPIrigen: MPI Code Generation through Domain-Specific Language Models
Schneider, Nadav
Hasabnis, Niranjan
Vo, Vy A.
Kadosh, Tal
Krien, Neva
Capotă, Mihai
Tamir, Guy
Willke, Ted
Ahmed, Nesreen
Pinter, Yuval
Mattson, Timothy
Oren, Gal
Distributed, Parallel, and Cluster Computing
Artificial Intelligence
Computation and Language
Machine Learning
Software Engineering
The imperative need to scale computation across numerous nodes highlights the significance of efficient parallel computing, particularly in the realm of Message Passing Interface (MPI) integration. The challenging parallel programming task of generating MPI-based parallel programs has remained unexplored. This study first investigates the performance of state-of-the-art language models in generating MPI-based parallel programs. Findings reveal that widely used models such as GPT-3.5 and PolyCoder (specialized multi-lingual code models) exhibit notable performance degradation, when generating MPI-based programs compared to general-purpose programs. In contrast, domain-specific models such as MonoCoder, which are pretrained on MPI-related programming languages of C and C++, outperform larger models. Subsequently, we introduce a dedicated downstream task of MPI-based program generation by fine-tuning MonoCoder on HPCorpusMPI. We call the resulting model as MPIrigen. We propose an innovative preprocessing for completion only after observing the whole code, thus enabling better completion with a wider context. Comparative analysis against GPT-3.5 zero-shot performance, using a novel HPC-oriented evaluation method, demonstrates that MPIrigen excels in generating accurate MPI functions up to 0.8 accuracy in location and function predictions, and with more than 0.9 accuracy for argument predictions. The success of this tailored solution underscores the importance of domain-specific fine-tuning in optimizing language models for parallel computing code generation, paving the way for a new generation of automatic parallelization tools. The sources of this work are available at our GitHub MPIrigen repository: https://github.com/Scientific-Computing-Lab-NRCN/MPI-rigen
title MPIrigen: MPI Code Generation through Domain-Specific Language Models
topic Distributed, Parallel, and Cluster Computing
Artificial Intelligence
Computation and Language
Machine Learning
Software Engineering
url https://arxiv.org/abs/2402.09126