Jian, Z., Jia, S., Xia, C. orcid.org/0000-0003-2014-5453 et al. (2 more authors) (2026) RV-IR: An MLIR-Based Architecture-Aware Intermediate Representation for Heterogeneous RISC-V AI Acceleration. In: ICS Workshops '26: Proceedings of the 40th ACM International Conference on Supercomputing - Workshops. ICS Workshops '26: 2026 International Conference on Supercomputing Workshops, 06-09 Jul 2026, Belfast, Northern Ireland, United Kingdom. . Association for Computing Machinery (ACM), New York, NY, United States, pp. 45-49. ISBN: 979-8-4007-2300-1.
Abstract
The growing interest in RISC-V-based AI accelerators creates an opportunity to build open and customizable machine learning systems, but it also exposes a compiler gap between generic tensor programs and accelerator-specific execution semantics. In practical heterogeneous CPU–NPU deployments, the compiler must reason about explicit memory spaces, accelerator invocation boundaries, asynchronous coordination, and software-managed data movement. Existing MLIR infrastructures provide strong support for high-level tensor optimization and progressive lowering, yet these generic abstractions do not always directly encode the architectural contracts needed by RISC-V AI backends.
This paper presents RV-IR, an MLIR-based compilation framework centered on a RISC-V-oriented intermediate representation that serves as an architecture-aware layer between generic tensor dialects and backend-specific code generation. Rather than replacing existing MLIR dialects, RV-IR complements them by making accelerator-relevant concepts explicit, including custom compute operators, memory-space-aware allocation and transfer, hierarchical execution constructs, and synchronization points. The framework supports lowering from PyTorch through torch-mlir into RV-IR, and then into either a generic LLVM-oriented path or an accelerator-oriented path that interfaces with custom RISC-V runtime symbols and custom instruction stubs.
We implement the proposed design in a research prototype based on torch-mlir. Experimental results on simulator-based RISC-V heterogeneous platforms demonstrate the effectiveness of our approach in enabling efficient execution of modern ML workloads.
Metadata
| Item Type: | Proceedings Paper |
|---|---|
| Authors/Creators: |
|
| Copyright, Publisher and Additional Information: | Copyright © 2026 Copyright held by the owner/author(s). This work is licensed under a Creative Commons Attribution 4.0 International License. |
| Keywords: | MLIR, RISC-V, AI accelerator, Heterogeneous compilation, Intermediate representation, Custom instruction extension |
| Dates: |
|
| Institution: | The University of Leeds |
| Academic Units: | The University of Leeds > Faculty of Engineering & Physical Sciences (Leeds) > School of Computing (Leeds) > Distributed Systems & Services |
| Date Deposited: | 05 Aug 2026 09:12 |
| Last Modified: | 05 Aug 2026 09:12 |
| Published Version: | https://dl.acm.org/doi/proceedings/10.1145/3774895 |
| Status: | Published |
| Publisher: | Association for Computing Machinery (ACM) |
| Identification Number: | 10.1145/3774895.3812195 |
| Sustainable Development Goals: | |
| Open Archives Initiative ID (OAI ID): | oai:eprints.whiterose.ac.uk:244126 |
Download
Filename: RV-IR An MLIR-Based Architecture-Aware Intermediate.pdf
Licence: CC-BY 4.0


CORE (COnnecting REpositories)
CORE (COnnecting REpositories)