TGViewer
Linux - Reddit Linux - Reddit @r_linux · 1.06K subscribers
Post #42234 45
AMD says XDNA1 Linux LLM support isn't available. I used AI-assisted development to get a full transformer layer running on a Ryzen 7 8845HS NPU.

I've been experimenting with the NPU in my Ryzen 7 8845HS laptop (Hawk Point / XDNA1) on Fedora Linux.

A lot of the current AMD Ryzen AI documentation focuses on XDNA2 hardware, and community projects like FastFlowLM don't currently support XDNA1. I was curious whether the hardware was actually incapable of running LLM workloads on Linux, or if the software support had simply moved on.

Full disclosure: I used ChatGPT and Codex heavily throughout this project. I am not an AI compiler engineer and I couldn't have done this without AI-assisted code investigation, debugging and porting work.

The rough progression was:

* Verified the NPU was working through `amdxdna`
* Investigated older RyzenAI-SW releases
* Found public Phoenix/XDNA1 artifacts (`1x4.xclbin`, qlinear\_2, transaction binaries)
* Built the modern Linux XRT/XDNA userspace stack
* Got AMD's old Phoenix GEMM transactions executing on Linux
* Validated 24 transformer-relevant GEMM shapes
* Validated real quantized int4/BF16 inference paths
* Built a reusable Linux `XDNA1QLinear` wrapper
* Executed a complete synthetic Llama-2-style transformer layer

Current status:

* Quantized int4 weights
* BF16 activations
* Q/K/V/O projections on the NPU
* MLP projections on the NPU
* RMSNorm, RoPE, attention and activation functions on CPU
* Deterministic repeatable results
* No Windows involved

Some interesting numbers:

* \~6 ms per transformer layer (warm)
* \~116 MiB resident memory per layer
* 8-layer test stack completed successfully
* Memory scaling appears linear
* No kernel/XRT leaks observed so far

What I have not done:

* No real model weights yet
* No llama.cpp integration
* No token generation
* No end-to-end LLM inference

At this point it looks less like a hardware limitation and more like an engineering project. The old XDNA1 path appears to still be functional under Linux when paired with the modern amdxdna stack.

I'm mostly posting because I couldn't find many examples of people doing anything substantial with XDNA1 NPUs on Linux, and I thought others might find it interesting.

If there's interest, I'm happy to clean up the code and publish the project on GitHub.

https://redd.it/1u2tld0
@r_linux
Reddit From the linux community on Reddit Explore this post and more from the linux community
More from @r_linux
  1. Oct 8, 2026SpaceScan: configurable visualizations of file storage, how much, how many, and what type…
  2. Oct 8, 2026Elan 04f3:0c6e Fingerprint Reader fix for Asus (and other) laptops Hey all, recently I got…
  3. Oct 8, 2026word-sys's PDF Editor v1.11.2 Officially Released on Flathub https://redd.it/1x0l2dq @r_li…
  4. Oct 8, 2026Article: Will Linux phones become a viable alternative to the Android/iOS duopoly? /r/Puri…
  5. Oct 8, 2026I counted who wrote every change to xz, sudo, bash, tz and 19 other projects over the last…
  6. Oct 8, 2026After nearly 40 years with Emacs, I think i'm ready to move on. I started programming on a…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →