Source snapshot of github.com/Scottcjn/npu-linux-kit, also on GitLab with full history. Code only: nothing here runs on Hugging Face infrastructure.
π§° npu-linux-kit
Practical applications for the AMD XDNA NPU on Linux β the things the NPU is actually good at, in one kit. Built on the open-xdna gen-1 (XDNA1 / Phoenix) bring-up.
Why
AMD's NPU is underused on Linux: the official LLM stack targets XDNA2, and the NPU's real strengths (low-power, conv/vision, batchable compute, offload) aren't packaged into usable Linux apps. This kit does that β each module plays to a measured NPU strength, and the status of each is stated honestly (no "coming soon" dressed up as done).
Modules
| Module | What it does | NPU fit | Status |
|---|---|---|---|
| camera/ | Real-time webcam effects β a v4l2 virtual camera (Zoom/OBS/browser) | conv/vision β its native strength | β working (edge-stylize) |
| camera/ β background blur | Sharp foreground + blurred background (real MODNet segmentation) | conv/CNN | β working (clean CPU blur + real seg; NPU blur path experimental) |
| embeddings/ | Batch sentence/RAG embeddings, offloaded from CPU/iGPU | batchable matmul β amortizes dispatch | π¬ candidate |
| audio/ | Wake-word / real-time denoise | the NPU's classic edge job | π¬ candidate (untested) |
| ggml-backend/ | XDNA backend for ggml/llama.cpp | foundational enabler | π§ planned (biggest lift) |
Featured: camera effects (working today)
Live webcam β NPU effect β virtual camera, measured on a Ryzen 7 8845HS (XDNA1):
- Full per-frame conv/colorspace pipeline: 220 FPS @1080p / 451 FPS @720p (incl. host DMA round-trip).
- In the live daemon the NPU effect adds ~2 ms/frame at ~6.6 W β end-to-end is camera-capture-bound, never NPU-bound. So there's large headroom for heavier effects (segmentation).
- Outputs to a v4l2loopback device β any app sees
NPU Camera.
# (after the open-xdna NPU stack is up + this kit's requirements installed)
sudo modprobe v4l2loopback video_nr=10 card_label="NPU Camera" exclusive_caps=1
python3 camera/npu_camera_fps.py # FPS feasibility gate
python3 camera/npu_camera_daemon.py --loopback /dev/video10 --stream-frames 0 # live β virtual cam
# then pick "NPU Camera" in Zoom/OBS/your browser
Requirements
A working XDNA NPU stack (XRT + amd/xdna-driver + IRON/mlir-aie + Peano) β see
open-xdna for the bring-up. Plus host deps:
pip install -r requirements.txt (opencv-python-headless, pyvirtualcam, numpy, ml_dtypes) and
v4l2loopback for the virtual camera.
Honesty / scope
Verified on XDNA1 (Phoenix), Ubuntu 25.10 / kernel 6.17. The camera module is real and measured; the other modules are marked candidate/planned and make no working claims until built. Research/community project, not a production stack.
License
AGPLv3 + commercial dual-license β see LICENSE and COMMERCIAL.md. Β© 2026 Scott Boudreaux / Elyan Labs.