Agentic Auto-Scheduling: An Experimental Study of LLM-Guided Loop Optimization
Massinissa Merouani, Islem Kara Bernou, Riyadh Baghdadi

TL;DR
This paper introduces ComPilot, a framework where off-the-shelf LLMs iteratively guide loop nest optimizations through compiler feedback, achieving significant speedups without task-specific training.
Contribution
It presents a novel zero-shot, LLM-guided loop optimization method that outperforms traditional polyhedral optimizers like Pluto in many cases.
Findings
Achieves 2.66x average speedup over original code.
Outperforms Pluto optimizer in many benchmark cases.
Demonstrates effectiveness of general-purpose LLMs in code optimization.
Abstract
Automatic code optimization remains a difficult challenge, particularly for complex loop nests on modern hardware. This paper investigates a novel approach to code optimization where Large Language Models (LLMs) guide the process through a closed-loop interaction with a compiler. We present ComPilot, an experimental framework that leverages off-the-shelf LLMs, without any task-specific fine-tuning, as interactive optimization agents. ComPilot establishes a feedback loop where an LLM proposes transformations for a given loop nest to a compiler. The compiler attempts the transformations, reporting back legality status and measured speedup or slowdown. The LLM utilizes this concrete feedback to iteratively refine its optimization strategy. Our extensive evaluation across the PolyBench benchmark suite demonstrates the effectiveness of this zero-shot approach. ComPilot achieves geometric…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Embedded Systems Design Techniques · Logic, programming, and type systems
