Skip to main content
U.S. Department of Energy
Office of Scientific and Technical Information

Large language model evaluation for high–performance computing software development

Journal Article · · Concurrency and Computation. Practice and Experience
DOI:https://doi.org/10.1002/cpe.8269· OSTI ID:2474767

We apply AI-assisted large language model (LLM) capabilities of GPT-3 targeting high-performance computing (HPC) kernels for (i) code generation, and (ii) auto-parallelization of serial code in C ++, Fortran, Python and Julia. Our scope includes the following fundamental numerical kernels: AXPY, GEMV, GEMM, SpMV, Jacobi Stencil, and CG, and language/programming models: (1) C++ (e.g., OpenMP [including offload], OpenACC, Kokkos, SyCL, CUDA, and HIP), (2) Fortran (e.g., OpenMP [including offload] and OpenACC), (3) Python (e.g., numpy, Numba, cuPy, and pyCUDA), and (4) Julia (e.g., Threads, CUDA.jl, AMDGPU.jl, and KernelAbstractions.jl). Kernel implementations are generated using GitHub Copilot capabilities powered by the GPT-based OpenAI Codex available in Visual Studio Code given simple + + prompt variants. To quantify and compare the generated results, we propose a proficiency metric around the initial 10 suggestions given for each prompt. For auto-parallelization, we use ChatGPT interactively giving simple prompts as in a dialogue with another human including simple “prompt engineering” follow ups. Results suggest that correct outputs for C++ correlate with the adoption and maturity of programming models. For example, OpenMP and CUDA score really high, whereas HIP is still lacking. We found that prompts from either a targeted language such as Fortran or the more general-purpose Python can benefit from adding language keywords, while Julia prompts perform acceptably well for its Threads and CUDA.jl programming models. Finally, we expect to provide an initial quantifiable point of reference for code generation in each programming model using a state-of-the-art LLM. Overall, understanding the convergence of LLMs, AI, and HPC is crucial due to its rapidly evolving nature and how it is redefining human-computer interactions.

Research Organization:
Oak Ridge National Laboratory (ORNL), Oak Ridge, TN (United States)
Sponsoring Organization:
USDOE Office of Science (SC), Advanced Scientific Computing Research (ASCR). Scientific Discovery through Advanced Computing (SciDAC)
Grant/Contract Number:
AC05-00OR22725
OSTI ID:
2474767
Journal Information:
Concurrency and Computation. Practice and Experience, Journal Name: Concurrency and Computation. Practice and Experience Journal Issue: 26 Vol. 36; ISSN 1532-0626
Publisher:
WileyCopyright Statement
Country of Publication:
United States
Language:
English

References (34)

LM4HPC: Towards Effective Language Model Application in??High-Performance Computing book January 2023
GPT-3: Its Nature, Scope, Limits, and Consequences journal November 2020
LLM4VV: Developing LLM-driven testsuite for compiler validation journal November 2024
Kokkos: Enabling manycore performance portability through polymorphic memory access patterns journal December 2014
PyCUDA and PyOpenCL: A scripting-based approach to GPU run-time code generation journal March 2012
Code Generation Using Machine Learning: A Systematic Review journal January 2022
Creating a Dataset for High-Performance Computing Code Translation using LLMs: A Bridge Between OpenMP Fortran and C++ conference September 2023
Experimental Multi-threading Support for the Julia Programming Language conference November 2014
Analysis of the popularity of programming languages in open source software communities conference August 2020
Evaluating performance and portability of high-level programming models: Julia, Python/Numba, and Kokkos on exascale nodes conference May 2023
The NumPy Array: A Structure for Efficient Numerical Computation journal March 2011
Exascale Computing in the United States journal January 2019
Fortran journal August 1964
Effective Extensible Programming: Unleashing Julia on GPUs journal April 2019
Advances in natural language processing journal July 2015
Julia: A Fresh Approach to Numerical Computing journal January 2017
Numba: a LLVM-based Python JIT compiler conference January 2015
Generalizing from a Few Examples journal June 2020
DeepSpeed conference August 2020
Psb2 conference June 2021
Expectation vs. Experience: Evaluating the Usability of Code Generation Tools Powered by Large Language Models conference April 2022
Automatic Generation of Programming Exercises and Code Explanations Using Large Language Models conference August 2022
Is GitHub copilot a substitute for human pair-programming? conference May 2022
The Robots Are Coming: Exploring the Implications of OpenAI Codex on Introductory Programming conference February 2022
Choose your programming copilot conference July 2022
Conversing with Copilot: Exploring Prompt Engineering for Solving CS1 Problems Using Natural Language conference March 2023
Using GitHub Copilot to Solve Simple Programming Problems conference March 2023
HPC Forecast: Cloudy and Uncertain journal January 2023
Evaluation of OpenAI Codex for HPC Parallel Programming Models Kernel Generation conference August 2023
HPC-GPT: Integrating Large Language Model for High-Performance Computing
  • Ding, Xianzhong; Chen, Le; Emani, Murali
  • Proceedings of the SC '23 Workshops of The International Conference on High Performance Computing, Network, Storage, and Analysis https://doi.org/10.1145/3624062.3624172
conference November 2023
Julia as a unifying end-to-end workflow language on the Frontier exascale system
  • Godoy, William F.; Valero-Lara, Pedro; Anderson, Caira
  • Proceedings of the SC '23 Workshops of The International Conference on High Performance Computing, Network, Storage, and Analysis https://doi.org/10.1145/3624062.3624278
conference November 2023
The International Exascale Software Project roadmap journal January 2011
Extreme Heterogeneity 2018 - Productive Computational Science in the Era of Extreme Heterogeneity: Report for DOE ASCR Workshop on Extreme Heterogeneity report December 2018
HPC-Coder: Modeling Parallel Programs using Large Language Models conference May 2024