用图神经网络和代码大模型预测硬件综合性能提升效果。
DiffHLS: Differential Learning for High-Level Synthesis QoR Prediction with GNNs and LLM Code Embeddings
- 通过对比基准核与添加优化指令的变体,学习性能差异。
- 在PolyBench上平均误差低于基线模型,且代码大模型增强效果稳定。
- 适合做芯片综合优化的工程师和研究者参考。
高层次综合(HLS)将C/C++代码编译为RTL,但探索带指令优化的设计方案代价高昂,因每次设计点都需耗时综合。我们提出 extbf{新品版DiffHLS},一种基于差分学习的HLS质量预测框架,从核函数-设计对中学习:一个基准核与一个插入优化指令的设计变体。DiffHLS使用专用图神经网络(GNN)分支编码核与设计的中间表示图,并在差值路径中引入预训练代码大语言模型(LLM)生成的代码嵌入。不直接回归绝对目标,而是联合预测基准核与设计带来的增量变化,再组合得到最终预测结果。在PolyBench数据集上,四种GNN主干下,DiffHLS的平均MAPE均低于纯GNN基线;且代码大模型嵌入始终优于仅用GNN的消融实验。进一步在ForgeHLS数据集验证了其可扩展性。
原文摘要 · Abstract (English)
High-Level Synthesis (HLS) compiles C/C++ into RTL, but exploring pragma-driven optimization choices remains expensive because each design point requires time-consuming synthesis. We propose \textbf{\DiffHLS}, a differential learning framework for HLS Quality-of-Result (QoR) prediction that learns from kernel--design pairs: a kernel baseline and a pragma-inserted design variant. \DiffHLS~encodes kernel and design intermediate-representation graphs with dedicated graph neural network (GNN) branches, and augments the delta pathway with code embeddings from a pretrained code large language model (LLM). Instead of regressing absolute targets directly, we jointly predict the kernel baseline and the design-induced delta, and compose them to obtain the design prediction. On PolyBench, \DiffHLS~attains lower average MAPE than GNN baselines under four GNN backbones, and LLM code embeddings consistently improve over a GNN-only ablation. We further validate scalability on the ForgeHLS dataset.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。