MapZero: Mapping for Coarse-grained Reconfigurable Architectures with Reinforcement Learning and Monte-Carlo Tree Search

被引:15
作者
Kong, Xiangyu [1 ]
Huang, Yi [1 ]
Zhu, Jianfeng [1 ]
Man, Xingchen [1 ]
Liu, Yang [2 ]
Feng, Chunyang [2 ]
Gou, Pengfei [3 ]
Tang, Minggui [3 ]
Wei, Shaojun [1 ]
Liu, Leibo [1 ]
机构
[1] Tsinghua Univ, BNRist, Sch Integrated Circuits, Beijing, Peoples R China
[2] GBA, Innovat Inst High Performance Server, Guangzhou, Guangdong, Peoples R China
[3] HEXIN Technol Co Ltd, Guangzhou, Guangdong, Peoples R China
来源
PROCEEDINGS OF THE 2023 THE 50TH ANNUAL INTERNATIONAL SYMPOSIUM ON COMPUTER ARCHITECTURE, ISCA 2023 | 2023年
基金
中国国家自然科学基金;
关键词
Coarse-Grained Reconfigurable Architecture; Compiler; Graph Neural Network; Reinforcement Learning; DATA-FLOW GRAPH; CGRA; ALGORITHM; FRAMEWORK; SHOGI; CHESS; GO;
D O I
10.1145/3579371.3589081
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Coarse-grained reconfigurable architecture (CGRA) has become a promising candidate for data-intensive computing due to its flexibility and high energy efficiency. CGRA compilers map data flow graphs (DFGs) extracted from applications onto CGRAs, playing a fundamental role in fully exploiting hardware resources for acceleration. Yet the existing compilers are time-demanding and cannot guarantee optimal results due to the traversal search of enormous search spaces brought about by the spatio-temporal flexibility of CGRA structures and the complexity of DFGs. Inspired by the amazing progress in reinforcement learning (RL) and Monte-Carlo tree search (MCTS) for real-world problems, we consider constructing a compiler that can learn from past experiences and comprehensively understand the target DFG and CGRA. In this paper, we propose an architecture-aware compiler for CGRAs based on RL and MCTS, called MapZero - a framework to automatically extract the characteristics of DFG and CGRA hardware and map operations onto varied CGRA fabrics. We apply Graph Attention Network to generate an adaptive embedding for DFGs and also model the functionality and interconnection status of the CGRA, aiming at training an RL agent to perform placement and routing intelligently. Experimental results show that MapZero can generate superior-quality mappings and reduce compilation time hundreds of times compared to state-of-the-art methods. MapZero can find high-quality mappings very quickly when the feasible solution space is rather small and all other compilers fail. We also demonstrate the scalability and broad applicability of our framework.
引用
收藏
页码:646 / 659
页数:14
相关论文
共 86 条
[1]  
Balasubramanian M, 2022, DES AUT TEST EUROPE, P268, DOI 10.23919/DATE54114.2022.9774520
[2]   CRIMSON: Compute-Intensive Loop Acceleration by Randomized Iterative Modulo Scheduling and Optimized Mapping on CGRAs [J].
Balasubramanian, Mahesh ;
Shrivastava, Aviral .
IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, 2020, 39 (11) :3300-3310
[3]   REVAMP: A Systematic Framework for Heterogeneous CGRA Realization [J].
Bandara, Thilini Kaushalya ;
Wijerathne, Dhananjaya ;
Mitra, Tulika ;
Peh, Li-Shiuan .
ASPLOS '22: PROCEEDINGS OF THE 27TH ACM INTERNATIONAL CONFERENCE ON ARCHITECTURAL SUPPORT FOR PROGRAMMING LANGUAGES AND OPERATING SYSTEMS, 2022, :918-932
[4]  
Beidas R, 2022, ASIA S PACIF DES AUT, P616
[5]   Pythia: A Customizable Hardware Prefetching Framework Using Online Reinforcement Learning [J].
Bera, Rahul ;
Kanellopoulos, Konstantinos ;
Nori, Anant V. ;
Shahroodi, Taha ;
Subramoney, Sreenivas ;
Mutlu, Onur .
PROCEEDINGS OF 54TH ANNUAL IEEE/ACM INTERNATIONAL SYMPOSIUM ON MICROARCHITECTURE, MICRO 2021, 2021, :1121-1137
[6]  
Burgess A., 2021, Embench-Iot
[7]   TRAVERSAL: A Fast and Adaptive Graph-Based Placement and Routing for CGRAs [J].
Canesche, Michael ;
Menezes, Marcelo ;
Carvalho, Westerley ;
Torres, Frank Sill ;
Jamieson, Peter ;
Nacif, Jose Augusto ;
Ferreira, Ricardo .
IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, 2021, 40 (08) :1600-1612
[8]  
Chang AXM, 2022, Arxiv, DOI arXiv:2205.13675
[9]  
Chaudhuri S, 2017, ICCAD-IEEE ACM INT, P675, DOI 10.1109/ICCAD.2017.8203842
[10]   Graph Minor Approach for Application Mapping on CGRAs [J].
Chen, Liang ;
Mitra, Tulika .
ACM TRANSACTIONS ON RECONFIGURABLE TECHNOLOGY AND SYSTEMS, 2014, 7 (03)