We present an empirical study of how far general-purpose coding agents -- without hardware-specific training -- can optimize hardware designs from high-level algorithmic specifications. We introduce an agent factory, a two-stage pipeline that constructs and coordinates multiple autonomous optimization agents. In Stage~1, the pipeline decomposes a design into sub-kernels, independently optimizes each using pragma and code-level transformations, and formulates an Integer Linear Program (ILP) to assemble globally promising configurations under an area constraint. In Stage~2, it launches $N$ expert agents over the top ILP solutions, each exploring cross-function optimizations such as pragma recombination, loop fusion, and memory restructuring that are not captured by sub-kernel decomposition. We evaluate the approach on 12 kernels from HLS-Eval and Rodinia-HLS using Claude Code (Opus~4.5/4.6) with AMD Vitis HLS. Scaling from 1 to 10 agents yields a mean $8.27\times$ speedup over baseline, with larger gains on harder benchmarks: streamcluster exceeds $20\times$ and kmeans reaches approximately $10\times$. Across benchmarks, agents consistently rediscover known hardware optimization patterns without domain-specific training, and the best designs often do not originate from top-ranked ILP candidates, indicating that global optimization exposes improvements missed by sub-kernel search. These results establish agent scaling as a practical and effective axis for HLS optimization.
翻译:我们通过实证研究,探究了未经硬件特定训练的通用编程智能体,能从高级算法规范出发将硬件设计优化到何种程度。我们提出了一种智能体工厂,这是一个两阶段流水线,用于构建和协调多个自主优化智能体。在第一阶段,流水线将设计分解为子内核,利用编译指示和代码级变换独立优化每个子内核,并构建整数线性规划以在面积约束下组装全局有前景的配置。在第二阶段,它启动N个专家智能体针对最优整数线性规划解进行探索,开展子内核分解无法捕获的跨函数优化,例如编译指示重组、循环融合和内存重构。我们使用Claude Code(Opus 4.5/4.6)结合AMD Vitis HLS,在HLS-Eval和Rodinia-HLS的12个内核上评估了该方法。将智能体数量从1扩展到10,相比基线实现了平均8.27倍的加速比,在难度更高的基准测试上增益更大:streamcluster超过20倍,kmeans达到约10倍。在各个基准测试中,智能体无需领域特定训练便能持续重新发现已知的硬件优化模式,而最优设计往往并非来自排名最靠前的整数线性规划候选解,这表明全局优化暴露了子内核搜索无法发现的改进。这些结果确立了智能体扩展作为高层次综合优化中一个实用且有效的维度。