abn/amd-npu

Project ID: 238857

Description

AMD NPU User-Space Stack (XRT & FastFlowLM)

This repository provides Fedora RPM packages for the AMD NPU user-space driver and inference stack, targeting Fedora 44+.

Since the amdxdna kernel driver is upstreamed in modern Fedora kernels, this repository supplies the necessary user-space libraries and runtime tools to run LLM workloads on local compute nodes without compiling from source.

Included Packages:

  • xrt-base: Base runtime libraries and diagnostic tools (like xrt-smi) for Xilinx Runtime (XRT).
  • xrt-npu: Specific AMD NPU hardware support modules.
  • xrt-plugin-amdxdna: The essential shim plug-in connecting XRT to the kernel driver nodes.
  • xrt-devel: Development headers and CMake targets for compiling NPU applications.
  • python3-xrt: Python bindings for interacting with the NPU runtime.
  • fastflowlm: The lightweight inference runtime engine (flm) optimized for LLM execution on AMD NPU hardware.

Installation Instructions

Installation & Setup Instructions

1. Enable the COPR Repository

Enable this repository on your Fedora system:

sudo dnf copr enable abn/amd-npu

2. Install the NPU Stack & Inference Engine

Install the fastflowlm package along with the NPU driver plugin:

sudo dnf install fastflowlm xrt-plugin-amdxdna

3. Critical Host Configuration (Required)

A. Host Memory Locking Limits (memlock)

The NPU runtime maps huge buffers directly into system memory. By default, Linux restricts unprivileged memory locking (memlock), which will cause the NPU driver to crash instantly upon buffer allocation.

You must create a configuration drop-in to allow unlimited memory locking:

Create /etc/security/limits.d/99-amdxdna.conf with the following content:

# /etc/security/limits.d/99-amdxdna.conf * soft memlock unlimited * hard memlock unlimited

Note: You must restart your user session or reboot the host for these limits to take effect.

B. Group Permissions

Ensure your user account has permission to access the NPU device. Add yourself to the render group:

sudo usermod -aG render $USER

Note: Log out and log back in to apply group changes.

C. Download the Validation Firmware Archive (Required for xrt-smi validate)

A hardware-specific test firmware archive is required to run the validation utility. Download and install it using the packaged helper utility (supported archives: xrt_smi_phx.a, xrt_smi_strx.a, xrt_smi_npu3.a, xrt_smi_ve2.a):

sudo smi_install_archive.sh xrt_smi_strx.a 2.25.0

4. Verification

A. Hardware Diagnostics

Verify that the Xilinx Runtime successfully detects and validates your NPU hardware:

sudo xrt-smi validate

B. Inference Engine Test

Run an interactive session using a supported model via FastFlowLM:

flm run llama3.2:1b

Or check local NPU stack status via flm:

flm validate

Reporting Issues & Getting Help

If you run into issues, please file bugs at the respective packaging issue trackers:

For core driver issues, hardware bugs, or upstream software questions:

Active Releases

The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla).

Release Architectures Repo Download
Fedora 44 x86_64 (81)* Fedora 44 (10 downloads)
Fedora rawhide x86_64 (14)* Fedora rawhide (1 downloads)

* Total number of downloaded packages.