Domain-Specific Multi-Level IR Rewriting for GPU

05/26/2020
by   Tobias Gysi, et al.
0

Traditional compilers operate on a single generic intermediate representation (IR). These IRs are usually 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.

READ FULL TEXT
research
01/10/2022

RISE Shine: Language-Oriented Compiler Design

The trend towards specialization of software and hardware - fuelled by t...
research
07/29/2023

nelli: a lightweight frontend for MLIR

Multi-Level Intermediate Representation (MLIR) is a novel compiler infra...
research
04/07/2020

LLHD: A Multi-level Intermediate Representation for Hardware Description Languages

Modern Hardware Description Languages (HDLs) such as SystemVerilog or VH...
research
08/23/2021

High Performance GPU Code Generation for Matrix-Matrix Multiplication using MLIR: Some Early Results

This report presents some early results on code generation targeting ten...
research
12/27/2019

EVA: An Encrypted Vector Arithmetic Language and Compiler for Efficient Homomorphic Computation

Fully-Homomorphic Encryption (FHE) offers powerful capabilities by enabl...
research
04/17/2019

Relay: A High-Level Compiler for Deep Learning

Frameworks for writing, compiling, and optimizing deep learning (DL) mod...
research
06/01/2023

Bridging Control-Centric and Data-Centric Optimization

With the rise of specialized hardware and new programming languages, cod...

Please sign up or login with your details

Forgot password? Click here to reset