arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.20673cs.SE
收藏

HPCAgent-Bench:用于合理评估代码优化智能体、框架及技能的框架

HPCAgent-Bench: A Framework for Sound Benchmarking of Code-Optimizing Agents, Harnesses, and Skills

ETH Zurich(苏黎世联邦理工学院);Institute of High Performance Computing (IHPC), A*STAR(新加坡国立研究基金会高性能计算研究所)

Yakup Koray Budanaz, Lorenzo Paleari, Marcin Copik, Alexandru Calotoiu, Timo Schneider, Benjamin Chen Ming Choong, Shriram Chandran, Lars Hulsbergen, Levi Widmer, Torsten Hoefler

AI总结:

HPCAgent-Bench是首个全面强化的代码优化智能体基准框架,含689个内核,可评估智能体、框架及技能,引入两个透明指标,智能体优化可迁移且加速比显著。

摘要:

代码优化智能体正越来越多地被用于优化代码,但现有的基准测试通常固定一个加速器、编程模型或框架,因此无法分离出每个组件的贡献,也无法展示新增的技能和工具是否能抵消其成本。我们提出了HPCAgent-Bench,它包含689个内核,分为三个赛道:循环级优化挑战、从高性能计算(HPC)代码中提取的内核以及机器学习模型。该框架用NumPy统一指定每个内核,衍生出C和Fortran参考实现,支持通过通用C ABI或Python接口提交代码,并可在CPU或GPU上、在单个或多个节点上运行。外部评判器会在隐藏的模糊输入上检查正确性,并对每个提交进行计时,关闭智能体利用测试系统的路径。我们引入了两个用于报告结果的指标:“干预效能”通过成对运行在加速比、成功率和成本上衡量诸如添加工具之类的干预措施;“加权令牌成本”则在明确的权重下报告输入、缓存输入和输出令牌。智能体相对于自动并行器实现了最高4.2倍的加速,且其优化可迁移到另一台机器:93%至99%不含特定设备代码的答案保持正确,每个内核的加速比保持着rs≥0.84的秩相关。在40个匹配设置中,干预措施仅在两次情况下显著改变加速比,但令牌成本最高变化3.0倍。由于令牌权重决定了节省是否显著,我们明确给出权重并发布每个令牌计数作为成本报告的标准。我们提供了首个全面、广泛且经过强化的基准,用于对智能体优化进行合理评估,并带有透明的成本指标。

英文摘要:

Coding agents are increasingly used to optimize code, but existing benchmarks fix one accelerator, programming model or harness, so they cannot isolate what each component contributes or show whether added skills and tools repay their cost. We present HPCAgent-Bench with 689 kernels in three tracks: loop-level optimization challenges, kernels extracted from HPC codes, and machine-learning models. The framework specifies each kernel once in NumPy, derives C and Fortran references, accepts submissions through a common C ABI or Python interface, and runs them on CPUs or GPUs, on one or multiple nodes. An external judge checks correctness on hidden fuzzed inputs and times each submission, closing paths agents use to exploit the testing system. We introduce two metrics for reporting results: \textit{intervention efficacy} measures an intervention, such as adding a tool, through paired runs on speedup, success rate and cost, and \textit{weighted token cost} reports input, cached-input and output tokens under explicit weights. Agents reach up to $4.2\times$ speedup over automatic parallelizers, and their optimizations transfer to another machine: $93$--$99\%$ of answers without device-specific code remain correct, and per-kernel speedups keep a rank correlation of $r_s\ge0.84$. Across 40 matched setups, interventions significantly change speedup only twice but token cost by up to $3.0\times$. Because token weighting decides whether a saving is significant, we state the weights and release every token count as a standard for cost reporting. We provide the first comprehensive, broad and hardened benchmark for the sound evaluation of agentic optimization, with transparent cost metrics.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑