A Multi-level Compiler Backend for Accelerated Micro-kernels Targeting RISC-V ISA Extensions
Authors:
Open Access
- 1 March 2025
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 163-178
Abstract
High-performance micro-kernels must fully exploit today’s diverse and specialized hardware to deliver peak performance to deep neural networks (DNNs). While higher-level optimizations for DNNs are offered by numerous compilers (e.g., MLIR, TVM, OpenXLA), performance-critical micro-kernels are left to specialized code generators or handwritten assembly. Even though widely-adopted compilers (e.g., LLVM, GCC) offer tuned backends, their CPU-focused input abstraction, unstructured intermediate representation (IR) and general-purpose best-effort design inhibit tailored code generation for innovative hardware. We think it is time to widen the classical hourglass backend and embrace progressive lowering across a diverse set of structured abstractions to bring domain-specific code generation to compiler backends. We demonstrate this concept by implementing a custom backend for a RISC-V-based accelerator with hardware loops and streaming registers, leveraging knowledge about the hardware at levels of abstraction that match its custom instruction set architecture (ISA). We use incremental register allocation over structured IRs, while dropping classical spilling heuristics, and show up to 90% floating-point unit (FPU) utilization across key DNN kernels. By breaking the backend hourglass model, we reopen the path from domain-specific abstractions to specialized hardware.Keywords
All Related Versions
Funding Information
- Horizon Europe Research and Innovation Program (101070375)
- Research Foundation Flanders (FWO) (1SE7723N)
This publication has 47 references indexed in Scilit:
- Tackling the Matrix Multiplication Micro-Kernel Generation with Exo2024
- Fast matrix multiplication via compiler‐only layered data reorganization and intrinsic loweringSoftware: Practice and Experience, 2023
- Engineering a Compiler2022
- Soft Tiles: Capturing Physical Implementation Flexibility for Tightly-Coupled Parallel Processing Clusters2022
- MLIR: Scaling Compiler Infrastructure for Domain Specific Computation2021
- Data Augmentation and Loss Normalization for Deep Noise Suppression2020
- PULP-NN: A Computing Library for Quantized Neural Network inference at the edge on RISC-V Based Parallel Ultra Low Power Clusters2019
- LIFT: A functional data-parallel IR for high-performance GPU code generation2017
- Register Allocation for Programs in SSA-Form2006
- LLVM: A compilation framework for lifelong program analysis & transformation2004