arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2409.13138cs.LGcs.AIcs.AR
收藏

学习比较面向高层次综合的硬件设计

Learning to Compare Hardware Designs for High-Level Synthesis

NVIDIA Corporation(NVIDIA公司);University of California, Los Angeles(加州大学洛杉矶分校)

Yunsheng Bai, Atefeh Sohrabizadeh, Zijian Ding, Rongjian Liang, Weikai Li, Ding Wang, Haoxing Ren, Yizhou Sun, Jason Cong

AI总结:

针对 HLS 中 pragma 设计空间探索的非线性与复杂交互问题,本文提出 compareXplore,通过混合损失函数与节点差异注意力模块学习比较硬件设计,并采用两阶段 DSE,在排序指标和 HLS 结果质量上超越现有 SOTA 方法。

摘要:

高层次综合(HLS)是一种自动化设计过程,它将高层次代码转换为硬件设计,从而能够快速开发硬件加速器。HLS 依赖于 pragma(编译指示),这些指示被插入源代码中以指导综合过程,而 pragma 具有各种设置和取值,会显著影响最终生成的硬件设计。最先进的基于机器学习的 HLS 方法(例如 HARP)首先训练一个深度学习模型,该模型通常基于图神经网络(GNN),并应用于源代码和 pragma 的图表示。然后,这些方法执行设计空间探索(DSE)来探索 pragma 设计空间,利用模型对候选设计进行排序,并返回排名靠前的设计。然而,由于 pragma 设置与性能指标之间存在高度非线性关系,并且 pragma 之间复杂的相互作用会以不明显的方式影响性能,传统的 DSE 方法面临诸多挑战。为了解决这些挑战,我们提出了 compareXplore,这是一种新颖的方法,它学习比较硬件设计以实现有效的 HLS 优化。compareXplore 引入了一种混合损失函数,将成对偏好学习与逐点性能预测相结合,使模型能够同时捕捉相对偏好和绝对性能。此外,我们引入了一种新颖的节点差异注意力模块,该模块关注设计之间最具信息量的差异,使模型能够识别影响性能的关键 pragma。compareXplore 采用两阶段 DSE:首先使用逐点预测模型进行初始设计剪枝,然后进行成对比较阶段以实现精确的性能验证。在大量实验中,compareXplore 在排序指标上取得了显著改进,并为所选设计生成了高质量的 HLS 结果,优于现有的 SOTA 方法。

英文摘要:

High-level synthesis (HLS) is an automated design process that transforms high-level code into hardware designs, enabling the rapid development of hardware accelerators. HLS relies on pragmas, which are directives inserted into the source code to guide the synthesis process, and pragmas have various settings and values that significantly impact the resulting hardware design. State-of-the-art ML-based HLS methods, such as HARP, first train a deep learning model, typically based on graph neural networks (GNNs) applied to graph-based representations of the source code and pragmas. They then perform design space exploration (DSE) to explore the pragma design space, rank candidate designs using the model, and return the top designs. However, traditional DSE methods face challenges due to the highly nonlinear relationship between pragma settings and performance metrics, along with complex interactions between pragmas that affect performance in non-obvious ways. To address these challenges, we propose compareXplore, a novel approach that learns to compare hardware designs for effective HLS optimization. CompareXplore introduces a hybrid loss function that combines pairwise preference learning with pointwise performance prediction, enabling the model to capture both relative preferences and absolute performance. Moreover, we introduce a novel node difference attention module that focuses on the most informative differences between designs, enabling the model to identify critical pragmas impacting performance. CompareXplore adopts a two-stage DSE, where a pointwise prediction model is used for the initial design pruning, followed by a pairwise comparison stage for precise performance verification. In extensive experiments, compareXplore achieves significant improvements in ranking metrics and generates high-quality HLS results for the selected designs, outperforming the existing SOTA method.

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

↑