Saved in:
Bibliographic Details
Main Authors: Cui, Bowen, Ramesh, Tejas, Hernandez, Oscar, Zhou, Keren
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2503.13772
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912281336479744
author Cui, Bowen
Ramesh, Tejas
Hernandez, Oscar
Zhou, Keren
author_facet Cui, Bowen
Ramesh, Tejas
Hernandez, Oscar
Zhou, Keren
contents Large Language Models (LLMs) have emerged as powerful tools for software development tasks such as code completion, translation, and optimization. However, their ability to generate efficient and correct code, particularly in complex High-Performance Computing (HPC) contexts, has remained underexplored. To address this gap, this paper presents a comprehensive benchmark suite encompassing multiple critical HPC computational motifs to evaluate the performance of code optimized by state-of-the-art LLMs, including OpenAI o1, Claude-3.5, and Llama-3.2. In addition to analyzing basic computational kernels, we developed an agent system that integrates LLMs to assess their effectiveness in real HPC applications. Our evaluation focused on key criteria such as execution time, correctness, and understanding of HPC-specific concepts. We also compared the results with those achieved using traditional HPC optimization tools. Based on the findings, we recognized the strengths of LLMs in understanding human instructions and performing automated code transformations. However, we also identified significant limitations, including their tendency to generate incorrect code and their challenges in comprehending complex control and data flows in sophisticated HPC code.
format Preprint
id arxiv_https___arxiv_org_abs_2503_13772
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Do Large Language Models Understand Performance Optimization?
Cui, Bowen
Ramesh, Tejas
Hernandez, Oscar
Zhou, Keren
Distributed, Parallel, and Cluster Computing
Software Engineering
Large Language Models (LLMs) have emerged as powerful tools for software development tasks such as code completion, translation, and optimization. However, their ability to generate efficient and correct code, particularly in complex High-Performance Computing (HPC) contexts, has remained underexplored. To address this gap, this paper presents a comprehensive benchmark suite encompassing multiple critical HPC computational motifs to evaluate the performance of code optimized by state-of-the-art LLMs, including OpenAI o1, Claude-3.5, and Llama-3.2. In addition to analyzing basic computational kernels, we developed an agent system that integrates LLMs to assess their effectiveness in real HPC applications. Our evaluation focused on key criteria such as execution time, correctness, and understanding of HPC-specific concepts. We also compared the results with those achieved using traditional HPC optimization tools. Based on the findings, we recognized the strengths of LLMs in understanding human instructions and performing automated code transformations. However, we also identified significant limitations, including their tendency to generate incorrect code and their challenges in comprehending complex control and data flows in sophisticated HPC code.
title Do Large Language Models Understand Performance Optimization?
topic Distributed, Parallel, and Cluster Computing
Software Engineering
url https://arxiv.org/abs/2503.13772