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

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Li, Weikai, Wang, Ding, Ding, Zijian, Sohrabizadeh, Atefeh, Qin, Zongyue, Cong, Jason, Sun, Yizhou
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910874800750592
author Li, Weikai
Wang, Ding
Ding, Zijian
Sohrabizadeh, Atefeh
Qin, Zongyue
Cong, Jason
Sun, Yizhou
author_facet Li, Weikai
Wang, Ding
Ding, Zijian
Sohrabizadeh, Atefeh
Qin, Zongyue
Cong, Jason
Sun, Yizhou
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2410_19225
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Hierarchical Mixture of Experts: Generalizable Learning for High-Level Synthesis
Li, Weikai
Wang, Ding
Ding, Zijian
Sohrabizadeh, Atefeh
Qin, Zongyue
Cong, Jason
Sun, Yizhou
Machine Learning
Artificial Intelligence
Hardware Architecture
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.
title Hierarchical Mixture of Experts: Generalizable Learning for High-Level Synthesis
topic Machine Learning
Artificial Intelligence
Hardware Architecture
url https://arxiv.org/abs/2410.19225