arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

抽象与提示策略对大语言模型(LLM)指导的高性能优化的影响

Effect of Abstractions and Prompting Strategies on LLM-Guided High-Performance Optimizations

Jiří Klepl, Matyáš Brabec, Martin Kruliš

arXiv 2608.08085首次发表:更新:

发表机构

Charles University(查理大学)

机构由 AI 辅助整理,请以论文原文为准。

AI 中文总结

本文探究传统抽象对LLM指导并行HPC应用优化的影响,以PolyBench为基准评估发现,获特定优化目标的LLM生成C代码的性能与有效性优于成熟框架,建议探索可验证的替代优化方法。

AI 中文摘要

代码性能优化是现代软件开发的重要环节,可实现更快的响应时间与更少的资源消耗。这类优化需要深入理解底层硬件细节与并行处理的复杂性,即便对经验丰富的开发者而言也颇具挑战。随着大语言模型(LLM)的出现,其生成与理解代码的能力日益增强,将这类模型融入自动化代码优化流程的兴趣与日俱增。传统上,这类自动化流程涉及将源代码转换为特定领域表示,以便通过网格搜索或机器学习算法进行自动调优,同时需遵守严格规则与有限的可行变换集合,以确保可验证性。LLM则融入了高层代码语义,因此能执行超出可验证自动化优化范围的变换。本文探究自动化代码优化中使用的传统抽象是否能提升LLM指导的并行高性能计算(HPC)应用优化的性能与正确性。我们使用PolyBench基准套件开展评估,结果显示在我们的评估场景中,与使用成熟框架生成计算流水线和优化调度相比,获得特定优化目标的LLM在生成C代码时,实现了更优的实测性能与有效性率,这表明未来开发应探索可验证LLM指导代码优化的替代方法。

英文摘要

Code performance optimization is a vital aspect of modern software development, as it enables faster response times and reduced resource usage. These optimizations require a deep understanding of low-level hardware details and the intricacies of parallel processing, making them challenging even for experienced developers. With the advent of Large Language Models (LLMs), which are increasingly capable of generating and understanding code, there is growing interest in incorporating these models into automated code optimization processes. Traditionally, this automation involves transcribing the source code into a domain-specific representation that can be auto-tuned using grid search or machine learning algorithms, while adhering to strict rules and a limited set of feasible transformations to ensure verifiability. LLMs incorporate high-level code semantics and can thus perform transformations that go beyond verifiable automated optimizations. This paper investigates whether the traditional abstractions used in automated code optimization improve the performance and correctness of LLM-guided optimizations of parallel HPC applications. We evaluate this using the PolyBench benchmark suite and demonstrate that, in our evaluated setting, LLMs provided with specific optimization goals achieve better measured performance and validity rates when generating C code compared to creating computation pipelines and optimization schedules with established frameworks, suggesting that future development should explore alternative approaches for verifiable LLM-guided code optimization.

CommentsThis preprint has not undergone peer review or any post-submission improvements or corrections

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑