arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.03408cs.ARcs.LGcs.PL
收藏

面向张量加速器的LLM辅助编译

LLM-Aided Compilation for Tensor Accelerators

University of California, Berkeley(加州大学伯克利分校)

Charles Hong, Sahil Bhatia, Altan Haan, Shengjun Kris Dong, Dima Nikiforov, Alvin Cheung, Yakun Sophia Shao

AI总结:

本文研究利用LLM构建可随应用与硬件变化快速更新的张量加速器编译器,展示GPT-4对Gemmini的高通过率翻译能力,并提出分解翻译步骤及两阶段硬件优化代码生成工作流。

摘要:

硬件加速器,尤其是用于张量处理的加速器,具有许多潜在的应用领域。然而,它们目前缺乏软件基础设施来支持深度学习之外的大多数领域。此外,一个能够轻松更新以反映应用层和硬件层变化的编译器,将有助于实现更敏捷的加速器开发和设计空间探索,使硬件设计者能够实现更接近最优的性能。在这项工作中,我们讨论了如何利用大型语言模型(LLMs)来构建这样的编译器。具体而言,我们展示了GPT-4在将代码翻译到Gemmini加速器时实现高通过率的能力,并原型化了一种将翻译分解为更小、更利于LLM处理的步骤的技术。此外,我们提出了一种利用LLMs生成硬件优化代码的两阶段工作流程。

英文摘要:

Hardware accelerators, in particular accelerators for tensor processing, have many potential application domains. However, they currently lack the software infrastructure to support the majority of domains outside of deep learning. Furthermore, a compiler that can easily be updated to reflect changes at both application and hardware levels would enable more agile development and design space exploration of accelerators, allowing hardware designers to realize closer-to-optimal performance. In this work, we discuss how large language models (LLMs) could be leveraged to build such a compiler. Specifically, we demonstrate the ability of GPT-4 to achieve high pass rates in translating code to the Gemmini accelerator, and prototype a technique for decomposing translation into smaller, more LLM-friendly steps. Additionally, we propose a 2-phase workflow for utilizing LLMs to generate hardware-optimized code.

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

↑