TY - GEN
T1 - Evaluation of OpenAI Codex for HPC Parallel Programming Models Kernel Generation
AU - Godoy, William
AU - Valero-Lara, Pedro
AU - Teranishi, Keita
AU - Balaprakash, Prasanna
AU - Vetter, Jeffrey
N1 - Publisher Copyright:
© 2023 ACM.
PY - 2023/8/7
Y1 - 2023/8/7
N2 - 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.
AB - 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.
KW - GPT
KW - GitHub Copilot
KW - HPC
KW - LLM
KW - OpenAI Codex
KW - generative AI
KW - high-performance computing
KW - large language models
KW - numerical kernels
KW - programming models
UR - http://www.scopus.com/inward/record.url?scp=85172435472&partnerID=8YFLogxK
U2 - 10.1145/3605731.3605886
DO - 10.1145/3605731.3605886
M3 - Conference contribution
AN - SCOPUS:85172435472
T3 - ACM International Conference Proceeding Series
SP - 136
EP - 144
BT - 52nd International Conference on Parallel Processing, ICPP 2023 - Workshops Proceedings
PB - Association for Computing Machinery
T2 - 52nd International Conference on Parallel Processing, ICPP 2023 - Workshops Proceedings
Y2 - 7 August 2023 through 10 August 2023
ER -