Prior Knowledge or Search? A Study of LLM Agents in Hardware-Aware Code Optimization
Dmitry Redko (1), Albert Fazlyev (2), Konstantin Sozykin (1), Maria Ivanova (3, 1), Evgeny Burnaev (1), Egor Shvetsov (1) ((1) Applied AI Institute, (2) AI Talent Hub, ITMO University, (3) YSDA)

TL;DR
This paper investigates how large language models (LLMs) perform in hardware-aware code optimization, revealing they rely more on pretraining than on feedback or agentic strategies, with varied effectiveness across tasks.
Contribution
The study provides controlled experiments analyzing LLM behavior in code optimization, highlighting their dependence on priors over explicit feedback or structured exploration.
Findings
LLMs act as greedy optimizers in black-box settings.
Explicit input-size info has no effect on zero-shot kernel generation.
Kernel optimization performance varies with feedback and kernel size.
Abstract
LLM discovery and optimization systems are increasingly applied across domains, implementing a common propose-evaluate-revise loop. Such optimization or discovery progresses via context conditioning on received feedback from an environment. However, as modern LLM agents are increasingly complex in their structure, it is difficult to evaluate which components contribute the most, and when and how this exploration may fail. We answer these questions through three controlled experiments. Our findings: (1) In pure black-box optimization, LLMs act as greedy optimizers. (2) In zero-shot kernel generation, providing explicit input-size information has no measurable effect, models converge to the same kernel parameters regardless of size or temperature, as though the size instruction were invisible. Moreover, when tasked to perform kernel optimization for uncommon kernel sizes, performance…
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.
