arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2506.01249cs.SEcs.PF
收藏

SysLLMatic:大语言模型是软件系统优化器

SysLLMatic: Large Language Models are Software System Optimizers

Purdue University(普渡大学);Loyola University Chicago(芝加哥洛约拉大学)

Huiyun Peng, Arjun Gupte, Ryan Hasler, Nicholas John Eliopoulos, Chien-Chou Ho, Rishi Mantri, Leo Deng, Konstantin Läufer, George K. Thiruvathukal, James C. Davis

AI总结:

SysLLMatic结合LLMs、性能诊断反馈和43种优化模式,自动优化软件代码,在大型系统上超越编译器,实现延迟1.5倍和吞吐量1.76倍的改进。

摘要:

自动软件系统优化可以提高软件速度并节省能源。传统的优化方法依赖于手动调优和编译器启发式规则,限制了它们在不同代码库上的泛化能力。近期使用LLMs的方法引入了自动化,但它们无法有效扩展到真实世界软件系统的复杂性和规模,在实际应用中留下了空白。我们提出了SysLLMatic,一个将LLMs与性能诊断反馈以及包含43种优化模式的精选目录相结合的系统,用于自动优化软件代码。我们的方法建立在基于LLM的代码优化近期进展之上,并专门针对现有系统在处理真实世界软件应用时的局限性。我们在三个基准套件上进行了评估:HumanEval_CPP(C++竞争性编程)、SciMark2(Java科学内核)和DaCapoBench(Java大规模软件系统)。结果表明,SysLLMatic能够提升软件系统性能,包括延迟、吞吐量、能源效率、内存使用和CPU利用率。在微基准测试上,它始终优于最先进的LLM基线。在先前LLM方法无法扩展的大规模应用代码上,它超越了编译器优化,在延迟方面实现了平均1.5倍的相对改进(编译器为1.01倍),在吞吐量方面实现了1.76倍的相对改进(编译器为1.02倍)。我们的发现表明,通过优化模式目录和适当的性能诊断,以原则性系统思维引导的LLMs可以充当可行的软件系统优化器。我们进一步指出了我们方法的局限性以及处理复杂应用所面临的挑战。这项工作为以原则性方式跨多种语言、基准和程序规模生成优化代码提供了基础。

英文摘要:

Automatic software system optimization can improve software speed and save energy. Traditional approaches to optimization rely on manual tuning and compiler heuristics, limiting their ability to generalize across diverse codebases. Recent methods using LLMs introduce automation, but they do not scale effectively to the complexity and size of real-world software systems, leaving a gap in practical applicability. We present SysLLMatic, a system that integrates LLMs with performance diagnostics feedback and a curated catalog of 43 optimization patterns to automatically optimize software code. Our approach builds on recent advances in LLM-based code optimization and specifically targets the limitations of existing systems in handling real-world software applications. We evaluate it on three benchmark suites: HumanEval_CPP (competitive programming in C++), SciMark2 (scientific kernels in Java), and DaCapoBench (large-scale software systems in Java). Results show that SysLLMatic can improve software system performance, including latency, throughput, energy efficiency, memory usage, and CPU utilization. It consistently outperforms state-of-the-art LLM baselines on microbenchmarks. On large-scale application codes, to which prior LLM approaches have not scaled, it surpasses compiler optimizations, achieving average relative improvements of 1.5x in latency (vs. 1.01x for the compiler) and 1.76x in throughput (vs. 1.02x for the compiler). Our findings demonstrate that LLMs, guided by principled system thinking through the optimization pattern catalog and appropriate performance diagnostics, can serve as viable software system optimizers. We further identify limitations of our approach and the challenges involved in handling complex applications. This work provides a foundation for generating optimized code across various languages, benchmarks, and program sizes in a principled manner.

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

↑