Can Large Language Models Write Parallel Code?
Preprint
Abstract
Large Language Models are becoming an increasingly popular tool for software development. Their ability to model and generate source code has been demonstrated in a variety of contexts, including code completion, summarization, translation, and lookup. However, they often struggle to generate code for more complex tasks. In this paper, we explore the ability of state-of-the-art language models to generate parallel code. We propose a benchmark, PCGBench, consisting of a set of 420 tasks for evaluating the ability of language models to generate parallel code, and we evaluate the performance of several state-of-the-art open- and closed-source language models on these tasks. We introduce novel metrics for comparing parallel code generation performance and use them to explore how well each LLM performs on various parallel programming models and computational problem types.Keywords
All Related Versions
This publication has 9 references indexed in Scilit:
- LLM4VV: Developing LLM-driven testsuite for compiler validationFuture Generation Computer Systems, 2024
- HPC-Coder: Modeling Parallel Programs using Large Language Models2024
- CoderEval: A Benchmark of Pragmatic Code Generation with Generative Pre-trained Models2024
- Data Race Detection Using Large Language Models2023
- Invited Paper: VerilogEval: Evaluating Large Language Models for Verilog Code Generation2023
- An Empirical Study of High Performance Computing (HPC) Performance Bugs2023
- MultiPL-E: A Scalable and Polyglot Approach to Benchmarking Neural Code GenerationIEEE Transactions on Software Engineering, 2023
- Kokkos 3: Programming Model Extensions for the Exascale EraIEEE Transactions on Parallel and Distributed Systems, 2021
- Quantifying the Vanishing Gradient and Long Distance Dependency Problem in Recursive Neural Networks and Recursive LSTMs2016