A Multi-level Compiler Backend for Accelerated Micro-kernels Targeting RISC-V ISA Extensions
Fuente:
arXiv
Enregistré dans:
| Auteurs principaux: | , , , , , , , , |
|---|---|
| Format: | Preprint |
| Publié: |
2025
|
| Sujets: | |
| Accès en ligne: | |
| Tags: |
Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
|
| _version_ | 1866910817064058880 |
|---|---|
| author | Lopoukhine, Alexandre Ficarelli, Federico Vasiladiotis, Christos Lydike, Anton Van Delm, Josse Dutilleul, Alban Benini, Luca Verhelst, Marian Grosser, Tobias |
| author_facet | Lopoukhine, Alexandre Ficarelli, Federico Vasiladiotis, Christos Lydike, Anton Van Delm, Josse Dutilleul, Alban Benini, Luca Verhelst, Marian Grosser, Tobias |
| contents | High-performance micro-kernels must fully exploit today's diverse and specialized hardware to deliver peak performance to 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 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 ISA. We use incremental register allocation over structured IRs, while dropping classical spilling heuristics, and show up to 90% FPU utilization across key DNN kernels. By breaking the backend hourglass model, we reopen the path from domain-specific abstractions to specialized hardware. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2502_04063 |
| institution | arXiv |
| publishDate | 2025 |
| record_format | arxiv |
| spellingShingle | A Multi-level Compiler Backend for Accelerated Micro-kernels Targeting RISC-V ISA Extensions Lopoukhine, Alexandre Ficarelli, Federico Vasiladiotis, Christos Lydike, Anton Van Delm, Josse Dutilleul, Alban Benini, Luca Verhelst, Marian Grosser, Tobias Programming Languages D.3.4 High-performance micro-kernels must fully exploit today's diverse and specialized hardware to deliver peak performance to 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 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 ISA. We use incremental register allocation over structured IRs, while dropping classical spilling heuristics, and show up to 90% FPU utilization across key DNN kernels. By breaking the backend hourglass model, we reopen the path from domain-specific abstractions to specialized hardware. |
| title | A Multi-level Compiler Backend for Accelerated Micro-kernels Targeting RISC-V ISA Extensions |
| topic | Programming Languages D.3.4 |
| url | https://arxiv.org/abs/2502.04063 |