Domain-Specific Multi-Level IR Rewriting for GPU

Author:

Gysi Tobias1,Müller Christoph1,Zinenko Oleksandr2ORCID,Herhut Stephan3,Davis Eddie4,Wicky Tobias4,Fuhrer Oliver4,Hoefler Torsten1,Grosser Tobias5

Affiliation:

1. ETH Zurich, Switzerland

2. Google, France

3. Google, Germany

4. Vulcan Inc, USA

5. University of Edinburgh, UK

Abstract

Most compilers have a single core intermediate representation (IR) (e.g., LLVM) sometimes complemented with vaguely defined IR-like data structures. This IR is commonly low-level and close to machine instructions. As a result, optimizations relying on domain-specific information are either not possible or require complex analysis to recover the missing information. In contrast, multi-level rewriting instantiates a hierarchy of dialects (IRs), lowers programs level-by-level, and performs code transformations at the most suitable level. We demonstrate the effectiveness of this approach for the weather and climate domain. In particular, we develop a prototype compiler and design stencil- and GPU-specific dialects based on a set of newly introduced design principles. We find that two domain-specific optimizations (500 lines of code) realized on top of LLVM’s extensible MLIR compiler infrastructure suffice to outperform state-of-the-art solutions. In essence, multi-level rewriting promises to herald the age of specialized compilers composed from domain- and target-specific dialects implemented on top of a shared infrastructure.

Funder

Schweizerischer Nationalfonds zur Förderung der Wissenschaftlichen Forschung

European Research Council

Publisher

Association for Computing Machinery (ACM)

Subject

Hardware and Architecture,Information Systems,Software

Reference60 articles.

1. 2020. CLIMA. Retrieved from https://github.com/climate-machine/CLIMA/. 2020. CLIMA. Retrieved from https://github.com/climate-machine/CLIMA/.

2. 2020. Consortium for Small-scale Modeling. Retrieved from http://www.cosmo-model.org/. 2020. Consortium for Small-scale Modeling. Retrieved from http://www.cosmo-model.org/.

3. 2020. FV3: Finite-Volume Cubed-Sphere Dynamical Core. Retrieved from https://www.gfdl.noaa.gov/fv3/. 2020. FV3: Finite-Volume Cubed-Sphere Dynamical Core. Retrieved from https://www.gfdl.noaa.gov/fv3/.

4. 2020. GridTools. Retrieved from https://github.com/GridTools/gridtools. 2020. GridTools. Retrieved from https://github.com/GridTools/gridtools.

5. 2020. GT4Py. Retrieved from https://github.com/gridtools/gt4py. 2020. GT4Py. Retrieved from https://github.com/gridtools/gt4py.

Cited by 21 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. A shared compilation stack for distributed-memory parallelism in stencil DSLs;Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 3;2024-04-27

2. An Optimizing Framework on MLIR for Efficient FPGA-based Accelerator Generation;2024 IEEE International Symposium on High-Performance Computer Architecture (HPCA);2024-03-02

3. Retargeting and Respecializing GPU Workloads for Performance Portability;2024 IEEE/ACM International Symposium on Code Generation and Optimization (CGO);2024-03-02

4. ConvStencil: Transform Stencil Computation to Matrix Multiplication on Tensor Cores;Proceedings of the 29th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming;2024-02-20

5. Building a domain-specific compiler for emerging processors with a reusable approach;Science China Information Sciences;2023-12-27

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3