skip to main content
10.1145/3508352.3549458acmconferencesArticle/Chapter ViewAbstractPublication PagesiccadConference Proceedingsconference-collections
research-article

Towards High-Quality CGRA Mapping with Graph Neural Networks and Reinforcement Learning

Published:22 December 2022Publication History

ABSTRACT

Coarse-Grained Reconfigurable Architectures (CGRA) is a promising solution to accelerate domain applications due to its good combination of energy-efficiency and flexibility. Loops, as computation-intensive parts of applications, are often mapped onto CGRA and modulo scheduling is commonly used to improve the execution performance. However, the actual performance using modulo scheduling is highly dependent on the mapping ability of the Data Dependency Graph (DDG) extracted from a loop. As existing approaches usually separate routing exploration of multi-cycle dependence from mapping for fast compilation, they may easily suffer from poor mapping quality. In this paper, we integrate the routing explorations into the mapping process and make it have more opportunities to find a globally optimized solution. Meanwhile, with a reduced resource graph defined, the searching space of the new mapping problem is not greatly increased. To efficiently solve the problem, we introduce graph neural network based reinforcement learning to predict a placement distribution over different resource nodes for all operations in a DDG. Using the routing connectivity as the reward signal, we optimize the parameters of neural network to find a valid mapping solution with a policy gradient method. Without much engineering and heuristic designing, our approach achieves 1.57× mapping quality, as compared to the state-of-the-art heuristic.

References

  1. Mahesh Balasubramanian and Aviral Shrivastava. 2022. PathSeeker: A Fast Mapping Algorithm for CGRAs. In 2022 Design, Automation Test in Europe Conference Exhibition (DATE). 268--273. Google ScholarGoogle ScholarCross RefCross Ref
  2. Irwan Bello, Hieu Pham, Quoc V Le, Mohammad Norouzi, and Samy Bengio. 2017. Neural Combinatorial Optimization with Reinforcement Learning. arXiv: Artificial Intelligence (2017).Google ScholarGoogle Scholar
  3. Liang Chen and Tulika Mitra. 2014. Graph minor approach for application mapping on cgras. ACM Transactions on Reconfigurable Technology and Systems (TRETS) 7, 3 (2014), 1--25.Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Shail Dave, Mahesh Balasubramanian, and Aviral Shrivastava. 2018. RAMP: resource-aware mapping for CGRAs. In the 55th Annual Design Automation Conference.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Mahdi Hamzeh and Aviral Shrivastava. 2013. REGIMap: register-aware application mapping on coarse-grained reconfigurable architectures (CGRAs). In Proceedings of the 50th Annual Design Automation Conference. ACM, 18.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Mahdi Hamzeh, Aviral Shrivastava, and Sarma Vrudhula. 2012. EPIMap: using epimorphism to map applications on CGRAs. In Proceedings of the 49th Annual Design Automation Conference. ACM, 1284--1291.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Diederik P Kingma and Jimmy Ba. 2015. Adam: A Method for Stochastic Optimization. international conference on learning representations (2015).Google ScholarGoogle Scholar
  8. Wouter Kool, Herke Van Hoof, and Max Welling. 2019. Attention, Learn to Solve Routing Problems!. In 2019 international conference on learning representations.Google ScholarGoogle Scholar
  9. Mingyang Kou, Jiangyuan Gu, Shaojun Wei, Hailong Yao, and Shouyi Yin. 2020. TAEM: Fast Transfer-Aware Effective Loop Mapping for Heterogeneous Resources on CGRA. In 2020 57th ACM/IEEE Design Automation Conference (DAC). 1--6. Google ScholarGoogle ScholarCross RefCross Ref
  10. Dajiang Liu, Shouyi Yin, Yu Peng, Leibo Liu, and Shaojun Wei. 2014. Optimizing spatial mapping of nested loop for coarse-grained reconfigurable architectures. IEEE Transactions on Very Large Scale Integration (VLSI) Systems 23, 11 (2014), 2581--2594.Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Hongzi Mao, Mohammad Alizadeh, Ishai Menache, and Srikanth Kandula. 2016. Resource Management with Deep Reinforcement Learning. (2016), 50--56.Google ScholarGoogle Scholar
  12. Bingfeng Mei, Serge Vernalde, Diederik Verkest, Hugo De Man, and Rudy Lauwereins. 2002. DRESC: A retargetable compiler for coarse-grained reconfigurable architectures. In Field-Programmable Technology, 2002.(FPT). Proceedings. 2002 IEEE International Conference on. IEEE, 166--173.Google ScholarGoogle Scholar
  13. Azalia Mirhoseini, Hieu Pham, Quoc V Le, Benoit Steiner, Rasmus Larsen, Yuefeng Zhou, Naveen Kumar, Mohammad Norouzi, Samy Bengio, and Jeffrey Dean. 2017. Device placement optimization with reinforcement learning. (2017), 2430--2439.Google ScholarGoogle Scholar
  14. Raghu Prabhakar, Yaqi Zhang, David Koeplinger, Matt Feldman, Tian Zhao, Stefan Hadjis, Ardavan Pedram, Christos Kozyrakis, and Kunle Olukotun. 2017. Plasticine: A reconfigurable architecture for parallel patterns. In 2017 ACM/IEEE 44th Annual International Symposium on Computer Architecture (ISCA). 389--402.Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. 2016. Mastering the game of Go with deep neural networks and tree search. Nature 529 (2016).Google ScholarGoogle Scholar
  16. David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, et al. 2017. Mastering the game of go without human knowledge. Nature 550, 7676 (2017), 354.Google ScholarGoogle Scholar
  17. R. S. Sutton and A. G. Barto. 2018. Reinforcement Learning: An Introduction(second edition). Bradford Books.Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Richard S Sutton, David A McAllester, Satinder P Singh, and Yishay Mansour. 2000. Policy gradient methods for reinforcement learning with function approximation. In Advances in neural information processing systems. 1057--1063.Google ScholarGoogle Scholar
  19. Christopher Torng, Peitian Pan, Yanghui Ou, Cheng Tan, and Christopher Batten. 2021. Ultra-Elastic CGRAs for Irregular Loop Specialization. In 2021 IEEE International Symposium on High-Performance Computer Architecture (HPCA). 412--425.Google ScholarGoogle Scholar
  20. Ronald Williams. 1992. Simple statistical gradient following algorithms for connectionnist reinforcement learning. Machine Learning (1992).Google ScholarGoogle Scholar
  21. Zonghan Wu, Shirui Pan, Fengwen Chen, Guodong Long, Chengqi Zhang, and Philip S. Yu. 2021. A Comprehensive Survey on Graph Neural Networks. IEEE Transactions on Neural Networks and Learning Systems 32, 1 (2021), 4--24.Google ScholarGoogle ScholarCross RefCross Ref
  22. Shouyi Yin, Xianqing Yao, Dajiang Liu, Leibo Liu, and Shaojun Wei. 2016. Memory-Aware Loop Mapping on Coarse-Grained Reconfigurable Architectures. IEEE Transactions on Very Large Scale Integration Systems 24, 5 (2016), 1895--1908.Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Z. Zhao, W. Sheng, Q. Wang, W. Yin, P. Ye, J. Li, and Z. Mao. 2020. Towards Higher Performance and Robust Compilation for CGRA Modulo Scheduling. IEEE Transactions on Parallel and Distributed Systems 31, 9 (2020), 2201--2219.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Towards High-Quality CGRA Mapping with Graph Neural Networks and Reinforcement Learning
        Index terms have been assigned to the content through auto-classification.

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          ICCAD '22: Proceedings of the 41st IEEE/ACM International Conference on Computer-Aided Design
          October 2022
          1467 pages
          ISBN:9781450392174
          DOI:10.1145/3508352

          Copyright © 2022 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 22 December 2022

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

          Acceptance Rates

          Overall Acceptance Rate457of1,762submissions,26%

          Upcoming Conference

          ICCAD '24
          IEEE/ACM International Conference on Computer-Aided Design
          October 27 - 31, 2024
          New York , NY , USA

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader