Table of Contents
Fetching ...

VibeCodeHPC: An Agent-Based Iterative Prompting Auto-Tuner for HPC Code Generation Using LLMs

Shun-ichiro Hayashi, Koki Morita, Daichi Mukunoki, Tetsuya Hoshino, Takahiro Katagiri

TL;DR

VibeCodeHPC tackles the challenge of HPC code generation by integrating auto-tuning with a multi-agent iterative prompting framework, enabling architecture-aware performance optimization guided by real performance feedback. The system combines an LLM-based code generator, an auto-tuning engine, and specialized AI agents in a closed feedback loop to refine generated kernels under HPC constraints. In a GEMM CUDA case study, the multi-agent configuration produced higher-quality GPU code and reached up to $43.14\%$ of the theoretical peak, outperforming a solo-agent setup but still short of the $60\%$ target, underscoring both the potential and current limits of AI-assisted HPC optimization. The work demonstrates rapid performance prototyping and dynamic agent management, offering a path toward scalable, performance-aware AI-assisted HPC development across heterogeneous platforms.

Abstract

We propose VibeCodeHPC, an automatic tuning system for HPC programs based on multi-agent LLMs for code generation. VibeCodeHPC tunes programs through multi-agent role allocation and iterative prompt refinement. We describe the system configuration with four roles: Project Manager (PM), System Engineer (SE), Programmer (PG), and Continuous Delivery (CD). We introduce dynamic agent deployment and activity monitoring functions to facilitate effective multi-agent collaboration. In our case study, we convert and optimize CPU-based matrix-matrix multiplication code written in C to GPU code using CUDA. The multi-agent configuration of VibeCodeHPC achieved higher-quality code generation per unit time compared to a solo-agent configuration. Additionally, the dynamic agent deployment and activity monitoring capabilities facilitated more effective identification of requirement violations and other issues.

VibeCodeHPC: An Agent-Based Iterative Prompting Auto-Tuner for HPC Code Generation Using LLMs

TL;DR

VibeCodeHPC tackles the challenge of HPC code generation by integrating auto-tuning with a multi-agent iterative prompting framework, enabling architecture-aware performance optimization guided by real performance feedback. The system combines an LLM-based code generator, an auto-tuning engine, and specialized AI agents in a closed feedback loop to refine generated kernels under HPC constraints. In a GEMM CUDA case study, the multi-agent configuration produced higher-quality GPU code and reached up to of the theoretical peak, outperforming a solo-agent setup but still short of the target, underscoring both the potential and current limits of AI-assisted HPC optimization. The work demonstrates rapid performance prototyping and dynamic agent management, offering a path toward scalable, performance-aware AI-assisted HPC development across heterogeneous platforms.

Abstract

We propose VibeCodeHPC, an automatic tuning system for HPC programs based on multi-agent LLMs for code generation. VibeCodeHPC tunes programs through multi-agent role allocation and iterative prompt refinement. We describe the system configuration with four roles: Project Manager (PM), System Engineer (SE), Programmer (PG), and Continuous Delivery (CD). We introduce dynamic agent deployment and activity monitoring functions to facilitate effective multi-agent collaboration. In our case study, we convert and optimize CPU-based matrix-matrix multiplication code written in C to GPU code using CUDA. The multi-agent configuration of VibeCodeHPC achieved higher-quality code generation per unit time compared to a solo-agent configuration. Additionally, the dynamic agent deployment and activity monitoring capabilities facilitated more effective identification of requirement violations and other issues.

Paper Structure

This paper contains 37 sections, 4 figures, 2 tables.

Figures (4)

  • Figure 1: A conceptual design of VibeCodeHPC.
  • Figure 2: Dynamic agent allocation and status monitoring in VibeCodeHPC.
  • Figure 3: Performance comparison: solo-agent vs multi-agents.
  • Figure 4: Claude's context length (tokens) time transition.