arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2410.19225cs.LGcs.AIcs.AR
收藏

分层混合专家:面向高层次综合的可泛化学习

Hierarchical Mixture of Experts: Generalizable Learning for High-Level Synthesis

University of California, Los Angeles(加利福尼亚大学洛杉矶分校)

Weikai Li, Ding Wang, Zijian Ding, Atefeh Sohrabizadeh, Zongyue Qin, Jason Cong, Yizhou Sun

AI总结:

针对HLS中GNN性能预测模型跨kernel领域偏移问题,提出可适配任意GNN的两级分层MoE及两阶段训练法,提升编译指示设计的泛化性能。

摘要:

高层次综合(HLS)是设计现场可编程门阵列(FPGA)时广泛使用的工具。HLS通过将源代码编译为FPGA电路,使设计者能够使用软件编程语言进行FPGA设计。源代码包含一个程序(称为“kernel”)以及若干指导硬件综合的编译指示(pragma),例如并行化、流水线等。虽然软件开发者设计程序相对容易,但设计这些编译指示却高度依赖硬件知识,从而给软件开发者带来巨大挑战。近来,已有GNN等不同机器学习算法被提出,用于通过性能预测实现编译指示设计自动化。然而,将训练后的模型应用于新kernel时,显著的领域偏移往往导致性能不理想。我们提出一种更具领域泛化能力的模型结构:两级分层Mixture of Experts(MoE,混合专家),它可以灵活适配任何GNN模型。不同的专家网络能够学习处理表示空间中的不同区域,并利用旧kernel与新kernel之间的相似模式。在低层MoE中,我们在程序的三种自然粒度上应用MoE:节点、基本块和图。高层MoE则学习聚合这三种粒度以作出最终决策。为稳定训练分层MoE,我们进一步提出一种两阶段训练方法,以避免专家极化。大量实验验证了所提出分层MoE的有效性。我们已在 https://github.com/weikai-li/HierarchicalMoE 公开代码。

英文摘要:

High-level synthesis (HLS) is a widely used tool in designing Field Programmable Gate Array (FPGA). HLS enables FPGA design with software programming languages by compiling the source code into an FPGA circuit. The source code includes a program (called "kernel") and several pragmas that instruct hardware synthesis, such as parallelization, pipeline, etc. While it is relatively easy for software developers to design the program, it heavily relies on hardware knowledge to design the pragmas, posing a big challenge for software developers. Recently, different machine learning algorithms, such as GNNs, have been proposed to automate the pragma design via performance prediction. However, when applying the trained model on new kernels, the significant domain shift often leads to unsatisfactory performance. We propose a more domain-generalizable model structure: a two-level hierarchical Mixture of Experts (MoE), that can be flexibly adapted to any GNN model. Different expert networks can learn to deal with different regions in the representation space, and they can utilize similar patterns between the old kernels and new kernels. In the low-level MoE, we apply MoE on three natural granularities of a program: node, basic block, and graph. The high-level MoE learns to aggregate the three granularities for the final decision. To train the hierarchical MoE stably, we further propose a two-stage training method to avoid expert polarization. Extensive experiments verify the effectiveness of the proposed hierarchical MoE. We publicized our codes at https://github.com/weikai-li/HierarchicalMoE.

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

↑