Evaluation of OpenAI Codex for HPC Parallel Programming Models Kernel Generation

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

7 Scopus citations

Abstract

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 <kernel> + <programming model> + <optional hints> 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.

Original languageEnglish
Title of host publication52nd International Conference on Parallel Processing, ICPP 2023 - Workshops Proceedings
PublisherAssociation for Computing Machinery
Pages136-144
Number of pages9
ISBN (Electronic)9798400708435
DOIs
StatePublished - Aug 7 2023
Event52nd International Conference on Parallel Processing, ICPP 2023 - Workshops Proceedings - Salt Lake City, United States
Duration: Aug 7 2023Aug 10 2023

Publication series

NameACM International Conference Proceeding Series

Conference

Conference52nd International Conference on Parallel Processing, ICPP 2023 - Workshops Proceedings
Country/TerritoryUnited States
CitySalt Lake City
Period08/7/2308/10/23

Funding

This work is funded by Bluestone, an X-Stack project in the DOE Advanced Scientific Computing Office with program manager Hal Finkel. This manuscript has been authored by UT-Battelle LLC under contract DE-AC05-00OR22725 with the US Department of Energy (DOE). The publisher acknowledges the US government license to provide public access under the DOE Public Access Plan (https://energy.gov/downloads/doe-public-access-plan).

FundersFunder number
DOE Advanced Scientific Computing Office
U.S. Department of Energy
UT-BattelleDE-AC05-00OR22725

    Keywords

    • GPT
    • GitHub Copilot
    • HPC
    • LLM
    • OpenAI Codex
    • generative AI
    • high-performance computing
    • large language models
    • numerical kernels
    • programming models

    Fingerprint

    Dive into the research topics of 'Evaluation of OpenAI Codex for HPC Parallel Programming Models Kernel Generation'. Together they form a unique fingerprint.

    Cite this