Xilinx/mlir-aie

A close-to-metal Python API for programming AMD Ryzen™ AI NPUs (AI Engines), built on an open-source MLIR-based compiler toolchain.

What it solves

It provides a low-level, "close-to-metal" programming interface for AMD Ryzen™ AI NPUs. While mainstream software platforms handle high-level inference, this project gives developers direct control over the NPU's internal hardware, including tile placement, data movement, and vectorized compute operations, without hiding details behind a framework.

How it works

It uses an MLIR-based compiler toolchain (including the Peano compiler) to translate Python code into hardware configurations. Developers use a Python API to define compute kernels and data movement, which are then JIT-compiled into instruction streams and binaries (xclbin) that run directly on the NPU's spatial array of tiles.

Who it’s for

It is designed for researchers and performance engineers who need to push the limits of NPU hardware for tasks like machine learning or digital signal processing. It is intended to complement, rather than replace, standard inference tooling.

Highlights

  • Direct control over NPU hardware resources like tile placement and memory.
  • Python-based JIT compilation workflow for rapid development and testing.
  • Built on an open-source, MLIR-based compiler toolchain.
  • Includes support for agentic programming, allowing AI coding agents to learn and optimize designs.
  • Complements existing AMD Ryzen™ AI software platforms.

Related

  • Project
  • Project
  • Project
  • Project
  • Project