mlsanityData to 14 Oct 2026

Can Large Language Models Predict Parallel Code Performance?

arXiv 2505.03988 ↗First posted 6 May 2025cs.DC cs.AI cs.PFcited by 4

Not on the map. Why?

Abstract (arXiv)

Accurate determination of the performance of parallel GPU code typically requires execution-time profiling on target hardware -- an increasingly prohibitive step due to limited access to high-end GPUs. This paper explores whether Large Language Models (LLMs) can offer an alternative approach for GPU performance prediction without relying on hardware. We frame the problem as a roofline classification task: given the source code of a GPU kernel and the hardware specifications of a target GPU, can an LLM predict whether the GPU kernel is compute-bound or bandwidth-bound? For this study, we build a balanced dataset of 340 GPU kernels, obtained from HeCBench benchmark and written in CUDA and OpenMP, along with their ground-truth labels obtained via empirical GPU profiling. We evaluate LLMs across four scenarios: (1) with access to profiling data of the kernel source, (2) zero-shot with source code only, (3) few-shot with code and label pairs, and (4) fine-tuned on a small custom dataset. Our results show that state-of-the-art LLMs have a strong understanding of the Roofline model, achieving 100% classification accuracy when provided with explicit profiling data. We also find that reasoning-capable LLMs significantly outperform standard LLMs in zero- and few-shot settings, achieving up to 64% accuracy on GPU source codes, without profiling information. Lastly, we find that LLM fine-tuning will require much more data than what we currently have available. This work is among the first to use LLMs for source-level roofline performance prediction via classification, and illustrates their potential to guide optimization efforts when runtime profiling is infeasible. Our findings suggest that with better datasets and prompt strategies, LLMs could become practical tools for HPC performance analysis and performance portability.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 8 of its 34 references that are in the map. First posted on arXiv 6 May 2025.

Builds on

8 of 34 references.

References · 8

  1. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
  2. 2022A Systematic Evaluation of Large Language Models of Codecited by 363
  3. 2024The Effect of Sampling Temperature on Problem Solving in Large Language Modelscited by 170
  4. 2024Performance-Aligned LLMs for Generating Fast Codecited by 21
  5. 2024Forecasting GPU Performance for Deep Learning Training and Inferencecited by 15
  6. 2023HPC-Coder: Modeling Parallel Programs using Large Language Modelscited by 11
  7. 2023Creating a Dataset for High-Performance Computing Code Translation using LLMs: A Bridge Between OpenMP Fortran and C++cited by 11
  8. 2024A Model Is Not Built By A Single Prompt: LLM-Based Domain Modeling With Question Decompositioncited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 2.

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026KernelBench-Verified: Do LLM-Generated Kernels Actually Beat PyTorch?
  2. 2026Are LLM-Generated GPU Kernels Production-Ready? A Trace-Driven Benchmark and Optimization Agent
  3. 2026Optimizing CUDA like a Human: Micro-Profiling Tools as Expert Surrogates for LLM-Based GPU Kernel Optimization
  4. 2026Characterizing CPU-Induced Slowdowns in Multi-GPU LLM Inference
  5. 2026KernelBenchX: A Comprehensive Benchmark for Evaluating LLM-Generated GPU Kernels
  6. 2026Watt Counts: Energy-Aware Benchmark for Sustainable LLM Inference on Heterogeneous GPU Architectures
  7. 2025Integrating Performance Tools in Model Reasoning for GPU Kernel Optimization
  8. 2025KernelBench: Can LLMs Write Efficient GPU Kernels?