| ||||
| ||||
![]() Title:Cross-Platform MLIR Based GEMM Micro-Kernel Generation Conference:SBAC-PAD 2026 Tags:code generation, GEMM, high performance, linear algebra, micro-kernels and MLIR Abstract: General Matrix Multiplication (GEMM) is a critical operation for several high-performance applications, and AI Models. To improve GEMM performance, optimized linear algebra libraries, such as OpenBLAS and BLIS, have been designed for a wide range of architectures. These are generally implemented as nested loops around a micro-kernel that performs the core computations and is hand-tuned to achieve maximum throughput. However, manually writing a micro-kernel requires significant effort and specialized knowledge of the specific hardware capabilities. In this paper, we present a cross-platform MLIR-based approach for automatically generating micro-kernels across a range of architectures. Our framework progressively lowers the micro-kernel via MLIR and LLVM backends to generate optimized code for the underlying hardware, thereby reducing micro-kernel design effort. Our generator supports masked edge-case handling and widening instructions. We evaluate our approach on Intel Xeon, AMD EPYC, Apple, and RISC-V Spacemit X60 architecture across different instruction sets. Experimental results show that it can consistently match and sometimes outperform manually written micro-kernels and other state-of-the-art automatic generators, achieving speedups of around 1.07x over BLIS on Spacemit X60 and staying within 5% of BLIS on Apple M4 and AMD EPYC, and within 10% on Intel CPUs. Cross-Platform MLIR Based GEMM Micro-Kernel Generation ![]() Cross-Platform MLIR Based GEMM Micro-Kernel Generation | ||||
| Copyright © 2002 – 2026 EasyChair |
