arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.06345cs.DCcs.AI
收藏

PRAGMA:一种基于剖析的多智能体框架用于自动内核优化

PRAGMA: A Profiling-Reasoned Multi-Agent Framework for Automatic Kernel Optimization

School of Computer Science and Engineering(计算机科学与工程学院)

Kelun Lei, Hailong Yang, Huaitao Zhang, Xin You, Kaige Zhang, Zhongzhi Luan, Yi Liu, Depei Qian

AI总结:

PRAGMA通过整合执行反馈和硬件剖析,利用AI生成高性能内核,实现比现有方法更优的性能提升。

摘要:

设计高性能内核需要专家级别的调优和对硬件特性深入的理解。近年来,大语言模型(LLMs)的进步使自动化内核生成成为可能,但大多数现有系统仅依赖正确性或执行时间的反馈,缺乏对低级性能瓶颈的推理能力。在本文中,我们介绍了PRAGMA,一种结合执行反馈和细粒度硬件剖析的AI内核生成框架,将其整合到推理循环中。PRAGMA使LLMs能够识别性能瓶颈,保留历史最佳版本,并迭代改进代码质量。我们在KernelBench上评估了PRAGMA,涵盖了GPU和CPU后端。结果表明,PRAGMA在启用剖析的情况下 consistently 超过基准AIKG,并在CPU和GPU平台上分别实现2.81倍和2.30倍的平均加速。

英文摘要:

Designing high-performance kernels requires expert-level tuning and a deep understanding of hardware characteristics. Recent advances in large language models (LLMs) have enabled automated kernel generation, yet most existing systems rely solely on correctness or execution time feedback, lacking the ability to reason about low-level performance bottlenecks. In this paper, we introduce PRAGMA, a profile-guided AI kernel generation framework that integrates execution feedback and fine-grained hardware profiling into the reasoning loop. PRAGMA enables LLMs to identify performance bottlenecks, preserve historical best versions, and iteratively refine code quality. We evaluate PRAGMA on KernelBench, covering GPU and CPU backends. Results show that PRAGMA consistently outperforms baseline AIKG without profiling enabled and achieves 2.81$\times$ and 2.30$\times$ averaged speedups against Torch on CPU and GPU platforms, respectively.

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

↑