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

MARCO:面向高性能计算的实时知识集成多智能体代码优化

MARCO: Multi-Agent Code Optimization with Real-Time Knowledge Integration for High-Performance Computing

Department of Computer Science, Virginia Tech(计算机科学系,弗吉尼亚理工大学)

Asif Rahman, Veljko Cvetkovic, Kathleen Reece, Aidan Walters, Yasir Hassan, Aneesh Tummeti, Bryan Torres, Denise Cooney, Margaret Ellis, Dimitrios S. Nikolopoulos

AI总结:

本文提出MARCO框架,通过包含代码生成、性能评估和网络搜索的多智能体架构及反馈循环,增强LLM在高性能计算中的代码优化能力,实验证明其显著降低了运行时间并提升了性能。

摘要:

大型语言模型(LLM)通过代码生成能力改变了软件开发,但其在高性能计算(HPC)中的有效性仍然有限。HPC代码需要针对并行性、内存效率和特定架构的考量进行专门优化,而通用LLM往往忽略这些因素。我们提出了MARCO(Multi-Agent Reactive Code Optimizer,多智能体反应式代码优化器),这是一种通过专门的智能体架构来增强LLM生成的HPC代码的新颖框架。MARCO采用独立的智能体分别负责代码生成和性能评估,并通过反馈循环进行连接,逐步细化优化方案。一项关键创新是MARCO的网络搜索组件,它从近期的会议论文和研究出版物中检索实时优化技术,弥补了预训练LLM中的知识差距。我们在LeetCode 75问题集上进行的广泛评估表明,与单独使用Claude 3.5 Sonnet相比,MARCO实现了14.6%的平均运行时间减少,而网络搜索组件的集成则比基础MARCO系统带来了30.9%的性能提升。这些结果凸显了多智能体系统在解决高性能代码生成专门需求方面的潜力,为领域特定模型微调提供了一种经济高效的替代方案。

英文摘要:

Large language models (LLMs) have transformed software development through code generation capabilities, yet their effectiveness for high-performance computing (HPC) remains limited. HPC code requires specialized optimizations for parallelism, memory efficiency, and architecture-specific considerations that general-purpose LLMs often overlook. We present MARCO (Multi-Agent Reactive Code Optimizer), a novel framework that enhances LLM-generated code for HPC through a specialized multi-agent architecture. MARCO employs separate agents for code generation and performance evaluation, connected by a feedback loop that progressively refines optimizations. A key innovation is MARCO's web-search component that retrieves real-time optimization techniques from recent conference proceedings and research publications, bridging the knowledge gap in pre-trained LLMs. Our extensive evaluation on the LeetCode 75 problem set demonstrates that MARCO achieves a 14.6\% average runtime reduction compared to Claude 3.5 Sonnet alone, while the integration of the web-search component yields a 30.9\% performance improvement over the base MARCO system. These results highlight the potential of multi-agent systems to address the specialized requirements of high-performance code generation, offering a cost-effective alternative to domain-specific model fine-tuning.

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

↑