今日已更新 424 条资讯 | 累计 39117 条内容
关于我们

Running Whisper + LLMs on an AMD NPU under Linux

JC 2026年09月03日 20:40 0 次阅读 来源:Dev.to

TL;DR — On a MSI Stealth A16 AI+ (Ryzen AI 9 365, XDNA2 NPU) running Arch, I got OpenAI's whisper-large-v3-turbo transcribing on the NPU — not the CPU, not the GPU — at RTF ≈ 0.18 (a 30 s clip in ~5.2 s) for roughly a tenth of the energy the same job costs on the CPU, plus an LLM answering on the same NPU through an OpenAI-compatible API. The whole path is local and offline. This is the write-up of the driver stack, the one real gotcha (memlock), and the runtime that made it a 20-minute job instead of a weekend. Why this is worth writing down AMD's "Ryzen AI" NPU (the XDNA / XDNA2 block in Phoenix / Hawk Point / Strix Point laptops) is marketed almost entirely around Windows: the Ryzen AI SDK, the ONNX Runtime VitisAI execution provider, Lemonade, and the demos all assume you're on Windows with the official stack. On Linux the picture in early 2026 is better than most people think — the NPU driver has been in the mainline kernel as amdxdna since 6.14 — but the "load a real model and run it" story still isn't well documented. Here's what actually worked, end to end. The hardware Part Detail Laptop MSI Stealth A16 AI+ A3HVGG APU AMD Ryzen AI 9 365 (Strix Point) NPU XDNA2, 8 columns, exposed as /dev/accel/accel0 NPU firmware 1.1.2.64 Kernel 7.1.9-arch1 ( amdxdna in-tree) OS Omarchy (Arch Linux) AMD quotes the Strix Point NPU at up to 50 TOPS, INT8 . 1. The driver stack Three pieces have to be in place before any runtime can touch the NPU: amdxdna — the kernel driver. In-tree from Linux 6.14; it's what creates /dev/accel/accel0 . Check it's bound: $ ls /dev/accel/ accel0 $ dmesg | grep -i amdxdna XRT (Xilinx/AMD Runtime) + the xrt-plugin-amdxdna shim. XRT is the userspace API; the plugin teaches it about the XDNA device. On Arch both are in extra : $ sudo pacman -S xrt xrt-plugin-amdxdna $ xrt-smi examine ... XRT Version : 2.21.75 NPU Firmware Version : 1.1.2.64 Device(s) Present |BDF |Name | |----------------|--------------| |[0000:66:00.1] |RyzenAI-npu4 | You want a D

本文内容来源于互联网,版权归原作者所有
查看原文