mlir-aie v1.3.2 + llvm-aie/Peano) — no license, no
Windows, no AMD account required.⚠️ These artifacts target NPU1 (Phoenix / Hawk Point, AIE2) specifically. They will NOT load on NPU2/NPU4 (Strix / Strix Halo / Krackan) — those use AIE2P and different overlays.
kernels/ — pre-compiled xclbins (verified correct, exact vs numpy)| file | op | shape | cores | throughput |
|---|---|---|---|---|
gemm-256-1col | int16 GEMM (i16→i32) | 256³ | 1 | 30.5 GOPS |
gemm-512-4col | int16 GEMM | 512³ | 16 (4×4) | 264.7 GOPS |
gemv-288 | int16 GEMV (batch=1) | 288² | 1 | 0.4 GOPS ⚠️ |
fusion/fused-add-add | fused 2-stage bf16 add | 4096 | 2 | fusion proof |
fusion/single-add | single bf16 add | 4096 | 1 | fusion baseline |
AMDXDNA_EXEC_CMD).designs/ — IRON source + runnernpu_kernel.py — NpuKernel class: load (xclbin, insts), run on numpy arrays.
Abstracts XRT; caller never touches pyxrt.fused_add_add.py / single_add.py — the op-fusion experiment designsbootstrap.sh / setup-env.sh — reproduce the IRON/Peano toolchain1git clone https://github.com/tibrezus/xdna-npu-toolkit
2cd xdna-npu-toolkit/iron && ./bootstrap.sh && source setup-env.sh
3# then use the NpuKernel runner against these xclbins
4python3 -c "
5import sys; sys.path.insert(0,'designs')
6from npu_kernel import NpuKernel
7from huggingface_hub import hf_hub_download
8xc = hf_hub_download('mrtib/phoenix-npu1-iron-kernels','kernels/gemm-512-4col.xclbin')
9ins= hf_hub_download('mrtib/phoenix-npu1-iron-kernels','kernels/gemm-512-4col.insts.txt')
10k=NpuKernel(xc,ins)
11import numpy as np
12A=np.random.randint(-100,100,(512,512),np.int16); B=np.random.randint(-100,100,(512,512),np.int16)
13out=k.run(A,B,out_sizes=[512*512*4],out_dtype=np.int32)[0].reshape(512,512)
14print('PASS' if (out==A.astype(np.int32)@B.astype(np.int32)).all() else 'FAIL')
15"gemv-288 (batch=1) is 8× slower than CPU — host↔NPU round-trip bound.
Batched GEMM is the viable path; see the fusion experiment.iron/ directory)