NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Improving Parallel Program Performance with LLM Optimizers via Agent-System Interfaces

Anjiang Wei, Allen Nie, Thiago S. F. X. Teixeira, Rohan Yadav, Wonchan Lee, Ke Wang, Alex Aiken

Overview

Researchers have developed a novel framework that leverages Large Language Models (LLMs) to automatically write and optimize the complex "mapper" code required for high-performance computing (HPC). By introducing a high-level Domain-Specific Language (DSL) and an intelligent feedback mechanism called AutoGuide, the system outperforms expert-written code by up to 1.34×. Remarkably, it achieves superior results in just 10 iterations compared to traditional reinforcement learning methods that require up to 1,000.

The Challenge of High-Performance Mapping

In the realm of high-performance computing, simply writing a program is not enough to achieve optimal speed. Developers must explicitly instruct the computer on where to run each task (processor selection) and where to store every piece of data (memory placement). This intricate process, known as mapping, is typically handled by low-level C++ code.

For domain scientists—such as physicists or biologists—writing these mappers is a daunting bottleneck. It demands deep expertise in system internals and days of manual trial-and-error tuning. Even for seasoned systems experts, porting a program to a new supercomputer requires starting the tuning process from scratch. While traditional "autotuning" tools exist, they often rely on "scalar feedback" (a single performance score), which fails to tell the optimizer why a specific configuration failed or performed poorly.

The Agent-System Interface (ASI)

To bridge the gap between LLM capabilities and low-level system requirements, the authors introduce the Agent-System Interface (ASI). This framework consists of two primary components designed to make HPC optimization "LLM-friendly":

  1. A Declarative DSL: Instead of forcing the LLM to write hundreds of lines of intricate C++, the researchers designed a high-level Domain-Specific Language. This DSL allows the agent to specify what should happen (e.g., "Map this task to the GPU") rather than how to implement it using the system API. This abstraction reduces the code volume by an average of 14×.
  2. AutoGuide: This mechanism acts as the critical feedback loop. When a generated mapper runs, AutoGuide intercepts raw system outputs—like execution errors or performance metrics—and translates them into actionable natural language. For example, instead of returning a cryptic C++ assertion failure, the LLM receives a targeted suggestion: "Memory layout is unexpected. Adjust the layout constraints or move tasks to different processor types."
The Agent-System Interface facilitates an iterative generative optimization loop, translating LLM intent into system code via a DSL and providing rich feedback through AutoGuide.

The system employs an iterative "Generative Optimization" loop: the LLM generates a mapper in the DSL, the system compiles and executes it, AutoGuide provides rich textual feedback, and the LLM refines the code based on that feedback.

Evaluation Benchmarks

The framework was rigorously evaluated on a suite of 9 benchmarks representing a mix of real-world scientific workloads and fundamental algorithms:

  • Scientific Workloads: Circuit (circuit simulation), Stencil (2D grid updates), and Pennant (hydrodynamics).
  • Matrix Multiplication: Six different parallel algorithms (Cannon’s, SUMMA, PUMMA, Johnson’s, Solomonik’s, and COSMA). These are critical because matrix math forms the computational backbone of modern AI and scientific modeling.

Key Insights

  • The "Semantic Gap" is the Real Barrier: LLMs struggle with low-level C++ not because they lack reasoning capabilities, but because the gap between natural language intent and imperative system code is too wide. The DSL acts as a necessary bridge, narrowing the search space while remaining expressive enough to uncover optimal solutions.
  • Rich Feedback > Scalar Rewards: Traditional Reinforcement Learning (RL) treats the system as a "black box" that outputs a single reward number. By utilizing natural language feedback via AutoGuide, the LLM can "reason" about why a failure occurred, allowing it to navigate toward better solutions much faster than random or gradient-based searches.
  • Zero-Shot Success in Niche Languages: The LLM successfully wrote DSL code despite the DSL not being present in its original training data. This indicates that well-designed, intuitive syntax allows LLMs to effectively leverage their general programming logic.

Performance and Results

The generative optimization approach yielded significant improvements in both performance and developer efficiency:

Comparing the Generative Optimizer against traditional RL (OpenTuner), showing superior throughput achieved in significantly fewer iterations.
  • Surpassing the Experts: The LLM-optimized mappers outperformed hand-tuned mappers written by human experts, achieving up to a 1.34× speedup.
  • Massive Efficiency Gains: Compared to OpenTuner (a popular RL-based autotuner), the LLM approach found better mappers in just 10 iterations than OpenTuner could find in 1,000 iterations, achieving up to 3.8× faster relative throughput.
  • Time Savings: The tuning process was drastically reduced from days of human effort to roughly 10 minutes of automated iteration.
  • Reliability: In ablation studies, the DSL achieved a 100% success rate in generating compilable, working code after iterative refinement, whereas generating raw C++ directly had a 0% success rate.

Limitations and Future Directions

Like all LLM-based systems, this framework exhibits a degree of stochasticity. While multiple trials demonstrated consistency, an LLM might occasionally "hallucinate" invalid DSL syntax. Additionally, while the current DSL covers the most critical mapping decisions, highly specialized hardware optimizations may not yet be expressible in the high-level language.

Future work will likely focus on expanding the DSL to support more diverse hardware architectures, such as specialized AI accelerators, and integrating the ASI system directly into standard compiler toolchains to further democratize high-performance computing.

Summary updated

BibTeX
@inproceedings{wei2025improving,
  author = {Anjiang Wei and Allen Nie and Thiago S. F. X. Teixeira and Rohan Yadav and Wonchan Lee and Ke Wang and Alex Aiken},
  title = {{Improving Parallel Program Performance with LLM Optimizers via Agent-System Interfaces}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=3h80HyStMH},
}
Figure