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

Evaluation of OpenAI Codex for HPC Parallel Programming Models Kernel Generation

Conference ·

We evaluate AI-assisted generative capabilities on fundamental numerical kernels in high-performance computing (HPC), including AXPY, GEMV, GEMM, SpMV, Jacobi Stencil, and CG. We test the generated kernel codes for a variety of language-supported programming models, including (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). We use the GitHub Copilot capabilities powered by the GPT-based OpenAI Codex available in Visual Studio Code as of April 2023 to generate a vast amount of implementations given simple + + prompt variants. To quantify and compare the results, we propose a proficiency metric around the initial 10 suggestions given for each prompt. Results suggest that the OpenAI Codex 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 code keywords, while Julia prompts perform acceptably well for its mature programming models (e.g., Threads and CUDA.jl). We expect for these benchmarks to provide a point of reference for each programming model's community. Overall, understanding the convergence of large language models, 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
DOE Contract Number:
AC05-00OR22725
OSTI ID:
2000371
Country of Publication:
United States
Language:
English

References (22)

Exascale Computing in the United States journal January 2019
Julia: A Fresh Approach to Numerical Computing journal January 2017
An empirical evaluation of GitHub copilot's code suggestions conference May 2022
Choose your programming copilot conference July 2022
Is GitHub copilot a substitute for human pair-programming? conference May 2022
Numba: a LLVM-based Python JIT compiler conference January 2015
The Robots Are Coming: Exploring the Implications of OpenAI Codex on Introductory Programming conference February 2022
Assessing the quality of GitHub copilot’s code generation
  • Yetistiren, Burak; Ozsoy, Isik; Tuzun, Eray
  • Proceedings of the 18th International Conference on Predictive Models and Data Analytics in Software Engineering https://doi.org/10.1145/3558489.3559072
conference November 2022
Kokkos: Enabling manycore performance portability through polymorphic memory access patterns journal December 2014
Experimental Multi-threading Support for the Julia Programming Language conference November 2014
Psb2 conference June 2021
Code Generation Using Machine Learning: A Systematic Review journal January 2022
The International Exascale Software Project roadmap journal January 2011
Fortran journal August 1964
Using GitHub Copilot to Solve Simple Programming Problems conference March 2023
GPT-3: Its Nature, Scope, Limits, and Consequences journal November 2020
Conversing with Copilot: Exploring Prompt Engineering for Solving CS1 Problems Using Natural Language conference March 2023
Expectation vs. Experience: Evaluating the Usability of Code Generation Tools Powered by Large Language Models conference April 2022
Evaluating performance and portability of high-level programming models: Julia, Python/Numba, and Kokkos on exascale nodes conference May 2023
Extreme Heterogeneity 2018 - Productive Computational Science in the Era of Extreme Heterogeneity: Report for DOE ASCR Workshop on Extreme Heterogeneity report December 2018
Analysis of the popularity of programming languages in open source software communities conference August 2020
PyCUDA and PyOpenCL: A scripting-based approach to GPU run-time code generation journal March 2012

Similar Records

Large language model evaluation for high–performance computing software development
Journal Article · Wed Sep 04 00:00:00 EDT 2024 · Concurrency and Computation. Practice and Experience · OSTI ID:2474767

Evaluating performance and portability of high-level programming models: Julia, Python/Numba, and Kokkos on exascale nodes
Conference · Mon May 01 00:00:00 EDT 2023 · OSTI ID:1994693

KokkACC: Enhancing Kokkos with OpenACC
Conference · Tue Nov 01 00:00:00 EDT 2022 · OSTI ID:2000279

Related Subjects