You are not logged in.

#1 2025-04-16 06:47:19

tategotoazarasi
Member
Registered: 2022-07-04
Posts: 5

[Package Request] AMD NPU / Ryzen AI Userspace Stack

I would like to request the packaging of several userspace components required to enable support for the Neural Processing Unit (NPU), also known as XDNA, present in recent AMD Ryzen AI processors (like Phoenix, Hawk Point, and the upcoming Strix Point series).

The necessary kernel driver (amdxdna) has been mainlined and is available starting with Linux kernel 6.14, making Arch well-positioned to support this hardware. However, the userspace runtime, compiler toolchain, and ML framework integration are currently missing from the official repositories and the existing AUR packages are either outdated, -git versions, or potentially incomplete/broken.

Having these packages available would allow Arch users with AMD Ryzen AI laptops/devices to leverage the NPU for hardware-accelerated machine learning tasks using frameworks like IREE.

The required components form a stack:

1.  Xilinx Runtime (XRT): The core runtime library for interacting with the NPU hardware.
2.  XRT AMD XDNA Shim: A plugin for XRT, built from the `amd/xdna-driver` repository, that provides the NPU-specific backend implementation.
3.  LLVM-AIE (Peano): A fork of LLVM required by IREE to compile code specifically for the AIEngine architecture used in the NPU.
4.  IREE AMD-AIE Plugin: A plugin for the IREE compiler/runtime that allows ML models to be compiled and executed on the AMD NPU via XRT.

Package Details:

1. Xilinx Runtime (XRT)

2. XRT AMD XDNA Shim

  • Package Name Suggestion:

    xrt-plugin-amdxdna

    (or similar, designed to install alongside `xrt`)

  • Upstream URL: https://github.com/amd/xdna-driver (Note: Built from this repo, not the main XRT repo)

  • Description: XRT SHIM library plugin providing the backend implementation for AMD XDNA NPUs.

  • License: AMD Proprietary

3. LLVM-AIE (Peano)

  • Package Name Suggestion:

    llvm-aie

    or

    peano-llvm
  • Upstream URL: https://github.com/Xilinx/llvm-aie

  • Description: AMD/Xilinx AI Engine LLVM fork. Required compiler backend for generating NPU executable code used by frameworks like IREE.

  • License: Apache-2.0 with LLVM exceptions

4. IREE AMD-AIE Plugin

  • Package Name Suggestion:

    iree-amd-aie

    (or perhaps integrated into a main `iree` package via build options)

  • Upstream URL: https://github.com/nod-ai/iree-amd-aie

  • Description: IREE (Intermediate Representation Execution Environment) compiler and runtime plugin for targeting AMD AIE/NPU devices.

  • License: Apache-2.0

With the kernel driver mainlined, providing these userspace packages in Arch Linux repositories (or well-maintained in the AUR) would enable users with the latest AMD hardware to utilize the NPU for AI acceleration out-of-the-box, which is a significant feature of these new platforms. It would lower the barrier to entry compared to manually building the entire stack.

There are some related AUR packages like

xrt-npu-git

,

xrt-xocl-dkms-npu-git

and

amdxdna-driver-bin

. However, these appear to be outdated or broken. Having official or actively maintained AUR packages for the stable releases would be preferable.

References

Last edited by tategotoazarasi (2025-04-17 04:50:26)

Offline

#2 2025-04-16 14:33:38

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,321

Re: [Package Request] AMD NPU / Ryzen AI Userspace Stack

[...] and the existing AUR packages are either outdated, -git versions, or potentially incomplete/broken.

That's not how the AUR works. If the package is broken on the AUR, it needs to be either fixed by you contacting its maintainer and help them with patches, or you make the request to have the package disowned and transferred to you as a maintainer.

Offline

#3 2025-06-02 16:09:47

tpkessler
Package Maintainer (PM)
From: Germany
Registered: 2022-11-20
Posts: 3

Re: [Package Request] AMD NPU / Ryzen AI Userspace Stack

Thank you very much for your suggestions. I've started with XRT but ran into a couple of issues, see the issue on GitHub.

Offline

#4 2025-06-02 18:50:34

topcat01
Member
Registered: 2019-09-17
Posts: 187

Re: [Package Request] AMD NPU / Ryzen AI Userspace Stack

Having gone through a boost upgrade for work, I think we should insist on upstream supporting it. Unfortunately Ubuntu seems to only include 1.83.

Offline

#5 2025-06-06 15:34:17

tpkessler
Package Maintainer (PM)
From: Germany
Registered: 2022-11-20
Posts: 3

Re: [Package Request] AMD NPU / Ryzen AI Userspace Stack

XRT and xrt-plugin-amdxdna have landed in [extra-testing]! I get missing symbol errors, so they need more testing.

Offline

Board footer

Powered by FluxBB