Library Liberation: Competitive Performance Matmul Through Compiler-composed Nanokernels

Arun Thangamani, Md Asghar Ahmad Shahid, Adam Siemieniuk, Rolf Morel, Renato Golin +1 more
11/14/2025
cs.LGcs.PFcs.PL

No confident code implementation found for this paper.

Abstract

The rapidly evolving landscape of AI and machine learning workloads has widened the gap between high-level domain operations and efficient hardware utilization. Achieving near-peak performance still demands deep hardware expertise-experts either handcraft target-specific kernels (e.g., DeepSeek) or rely on specialized libraries (e.g., CUTLASS)-both of which add complexity and limit scalability for most ML practitioners. This paper introduces a compilation scheme that automatically generates scalable, high-performance microkernels by leveraging the MLIR dialects to bridge domain-level operations and processor capabilities. Our approach removes dependence on low-level libraries by enabling the compiler to auto-generate near-optimal code directly. At its core is a mechanism for composing nanokernels from low-level IR constructs with near-optimal register utilization, forming efficient microkernels tailored to each target. We implement this technique in an MLIR-based compiler supporting both vector and tile based CPU instructions. Experiments show that the generated nanokernels are of production-quality, and competitive with state-of-the-art microkernel libraries.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{thangamani2025library,
  title  = {Library Liberation: Competitive Performance Matmul Through Compiler-composed Nanokernels},
  author = {Arun Thangamani and Md Asghar Ahmad Shahid and Adam Siemieniuk and Rolf Morel and Renato Golin and Alexander Heinecke},
  year   = {2025},
  eprint = {2511.13764},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2511.13764v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2511.13764.svg)](https://codeofpaper.com/paper/2511.13764)

Discussion