High-Level Synthesis (HLS) design space exploration (DSE) seeks Pareto-optimal designs within expansive pragma configuration spaces. To accelerate HLS DSE, graph neural networks (GNNs) are commonly employed as surrogates for HLS tools to predict quality of results (QoR) metrics, while multi-objective optimization algorithms expedite the exploration. However, GNN-based prediction methods may not fully capture the rich semantic features inherent in behavioral descriptions, and conventional multi-objective optimization algorithms often do not explicitly account for the domain-specific knowledge regarding how pragma directives influence QoR. To address these limitations, this paper proposes the MPM-LLM4DSE framework, which incorporates a multimodal prediction model (MPM) that simultaneously fuses features from behavioral descriptions and control and data flow graphs. Furthermore, the framework employs a large language model (LLM) as an optimizer, accompanied by a tailored prompt engineering methodology. This methodology incorporates pragma impact analysis on QoR to guide the LLM in generating high-quality configurations (LLM4DSE). Experimental results demonstrate that our multimodal predictive model significantly outperforms state-of-the-art work ProgSG by up to 10.25$\times$. Furthermore, in DSE tasks, the proposed LLM4DSE achieves an average performance gain of 39.90\% over prior methods, validating the effectiveness of our prompting methodology. Code and models are available at https://github.com/wslcccc/MPM-LLM4DSE.
翻译:高层次综合(HLS)的设计空间探索(DSE)旨在广阔的编译指示配置空间中寻找帕累托最优设计。为加速HLS DSE,图神经网络(GNN)常被用作HLS工具的替代模型来预测结果质量(QoR)指标,而多目标优化算法则用于加速探索过程。然而,基于GNN的预测方法可能无法充分捕捉行为描述中固有的丰富语义特征,且传统的多目标优化算法通常未明确考虑关于编译指示如何影响QoR的领域特定知识。为应对这些局限,本文提出了MPM-LLM4DSE框架,该框架包含一个多模态预测模型(MPM),可同时融合来自行为描述以及控制流与数据流图的特征。此外,该框架采用大型语言模型(LLM)作为优化器,并辅以定制的提示工程技术。该技术结合了编译指示对QoR的影响分析,以指导LLM生成高质量配置(LLM4DSE)。实验结果表明,我们的多模态预测模型显著优于当前最先进的工作ProgSG,性能提升最高达10.25$\times$。此外,在DSE任务中,所提出的LLM4DSE相较于现有方法平均实现了39.90\%的性能提升,验证了我们提示方法的有效性。代码与模型已发布于https://github.com/wslcccc/MPM-LLM4DSE。