This project enables RISC-V microkernel support in IREE, an MLIR-based machine learning compiler and runtime. The approach begins by enabling the lowering of MLIR linalg dialect contraction ops to linalg.mmt4d op for the RISC-V64 target within the IREE pass pipeline, followed by the development of optimized microkernels for RISC-V. The performance gains are compared with upstream IREE and Llama.cpp for the Llama-3.2-1B-Instruct model.
翻译:本项目在IREE(一个基于MLIR的机器学习编译器与运行时)中实现了对RISC-V微内核的支持。该方法首先在IREE的pass管道中,为RISC-V64目标启用将MLIR linalg dialect收缩操作降级为linalg.mmt4d操作,随后开发针对RISC-V优化的微内核。针对Llama-3.2-1B-Instruct模型,将性能提升与上游IREE及Llama.cpp进行了比较。