本仓库提供在 AMD Ryzen AI Max+ 395 (Strix Halo) 上启用 NPU 并达到 31.2 TFLOPS AI 计算能力的逐步指南,集成了开源工具与控制平面 MVP。

Stars

8

7 天增长

暂无数据

Fork 数

1

开放 Issue

0

开源协议

Apache-2.0

最近更新

2026-06-28

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它是首个公开的、经验证的方法,通过混合开源(IRON、Peano)与专有组件(Chess、FastFlowLM),解锁 Strix Halo NPU 的全部 31 TFLOPS 算力,并附有实测性能数据。

适合谁使用

  • AMD Ryzen AI 开发者和研究人员
  • 从事 NPU 加速的 AI/ML 工程师
  • 基于 AMD 硬件构建 AI 推理服务器的系统集成商
  • 探索前沿消费级 AI 硬件的爱好者

典型使用场景

  • 在 NPU 上运行 LLM 推理(Gemma 4 2B、Llama 3.1 8B),速度达 15–25 tok/s
  • 基准测试 NPU GEMM 性能(持续 30.9 TFLOPS)
  • 使用 IRON 和 Peano 开发自定义 NPU 内核
  • 利用提供的控制平面 MVP 协调 NPU 实验

项目优势

  • 步骤清晰可复现,包含测试命令和预期输出
  • 提供实际基准测试结果(31.2 TFLOPS、LLM 令牌速率)
  • 同时提供开源(Apache 2.0)和专有工具链路径
  • 包含轻量级控制平面 MVP 以管理实验

使用前须知

  • 达到 31 TFLOPS 需要 AMD 的专有 Chess 编译器许可证
  • 专有组件(Chess、FastFlowLM)存在再分发限制
  • 配置针对特定硬件(Strix Halo + Ubuntu 26.04),不适用于其他平台

README 快速开始

Strix Halo NPU Setup

Step-by-step guide to unlock the NPU on AMD Ryzen AI Max+ 395 (Strix Halo) — from zero to 31 TFLOPS AI compute.

System

ComponentSpec
CPUAMD RYZEN AI MAX+ 395 (16 Zen5 cores)
GPURadeon 8060S (40 RDNA 3.5 CUs)
NPURyzenAI-npu5 (32 AIE2P tiles)
RAM128 GB LPDDR5x (unified — CPU/GPU/NPU share)
OSUbuntu 26.04 LTS
Kernel7.0.0+ (in-tree amdxdna driver)

Results

BenchmarkResult
32-core BFP16 GEMM peak31.2 TFLOPS
32-core BFP16 GEMM sustained30.9 TFLOPS
Gemma 4 2B (FastFlowLM)25 tok/s
Llama 3.1 8B (FastFlowLM)15 tok/s

Step 1 — Verify NPU

# NPU should show as RyzenAI-npu5
sudo xrt-smi examine

Expected output:

[0000:c6:00.1]  |RyzenAI-npu5  |

If not present, check the driver is loaded:

lsmod | grep amdxdna
sudo modprobe amdxdna

Step 2 — Install XRT + Python bindings

sudo add-apt-repository ppa:amd-team/xrt
sudo apt update
sudo apt install libxrt2 libxrt-npu2 libxrt-dev libxrt-utils \
                 libxrt-utils-npu python3-xrt
sudo usermod -aG render $USER
# log out and back in, or: newgrp render

Step 3 — Set up IRON (Python NPU kernels, Apache 2.0)

git clone https://github.com/Xilinx/mlir-aie.git
cd mlir-aie
python3 -m venv .venv
source .venv/bin/activate
pip install numpy ml_dtypes

# Install prebuilt wheel
pip install https://github.com/Xilinx/mlir-aie/releases/download/v1.3.2/mlir_aie-1.3.2-cp314-cp314-manylinux_2_35_x86_64.whl

Apply patches (v1.3.2 wheel is missing some exports)

cd .venv/lib/python3.14/site-packages/mlir_aie/python/aie/iron

# Add In/Out/CompileTime markers
cat >> __init__.py  /tmp/pt.cc 
extern "C" void pt(int32_t* a, int32_t* c, int32_t n) {
    for (int i = 0; i  /tmp/example-kernel.elf
npu-ctrl kernels register \
  --name vec_add \
  --artifact /tmp/example-kernel.elf \
  --dtype i32 \
  --shape N=64 \
  --toolchain peano
npu-ctrl kernels list

Record a repeatable command benchmark

npu-ctrl bench run --label python-version --warmup 0 --iters 1 -- python3 --version
npu-ctrl bench list

The MVP stores JSON records for devices, toolchains, kernel artifacts, and benchmark runs. Later phases will add AIE kernel builders, profile collection, and compiler experiment integration.

项目描述

Step-by-step guide to set up Strix Halo NPU (Ryzen AI Max+ 395) with IRON, Peano, Chess, FastFlowLM — 31 TFLOPS

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

lopopolo
精选
lopopolo GitHub avatar

harness-engineering

Harness Engineering is a methodology for improving coding agent outputs by carefully crafting the environment around them—providing curated context, tools, and executable constraints that encode an organization’s nonfunctional requirements and cumulative lessons.

AI 与机器学习AI 智能体
2,390
slvDev
精选
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI 与机器学习大语言模型
1,960
littledivy
精选
littledivy GitHub avatar

mimic

mimic captures traffic from any iOS or web app and automatically generates a Python client library that lets you call the app's API like a regular library.

AI 与机器学习
1,482