Metraipolis › archive › dc_da9d10f2b921

Programming AMD XDNA NPUs with Open-source Compiler Tools: A FlashAttention Case Study — arXiv:2609.21264

Source
arXiv (en)
Original
https://arxiv.org/abs/2609.21264
License (as archived)
CC0-1.0
Archived
2026-10-10T01:40:22.860Z
SHA-256 of the archived text
e0108c74f0eb0409cbaae079819ca0448efd1608673d203c0c03257fa613814d
Stable URL of this page
https://metraipolis.com/documento/dc_da9d10f2b921

How to cite

Programming AMD XDNA NPUs with Open-source Compiler Tools: A FlashAttention Case Study — arXiv:2609.21264 — arXiv (en), https://arxiv.org/abs/2609.21264 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_da9d10f2b921 (Metraipolis archive dc_da9d10f2b921, sha256 e0108c74f0eb0409cbaae079819ca0448efd1608673d203c0c03257fa613814d)
BibTeX
@misc{dcda9d10f2b921,
  title = {Programming AMD XDNA NPUs with Open-source Compiler Tools: A FlashAttention Case Study — arXiv:2609.21264},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2609.21264},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_da9d10f2b921; sha256 e0108c74f0eb0409cbaae079819ca0448efd1608673d203c0c03257fa613814d},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.21264. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Spatial NPUs such as AMD XDNA place compute tiles beside small local memories and leave data movement between them to software. Mapping a multi-stage workload onto such a device is largely a question of where the intermediate tensors live. We report what we learned making those choices for FlashAttention with the open-source IRON and MLIR-AIR flows. We compare four reference designs on XDNA 1 and XDNA 2: one runs each operator separately, two stream between operators on chip, and one fuses all three attention stages into a single kernel. The fused kernel holds the $\boldsymbol{QK}^{\mathsf T}$ scores in compute-tile local memory and reduces partial results over the cascade interconnect, so the scores never return to shared MemTile memory. On XDNA 2, it reaches 3.62 TFLOP/s over complete end-to-end execution, twice the IRON design, with 5.3 to 7.2 times the energy efficiency of the integrated GPU on the same chip at 2K tokens and above. It covers twelve LLM configurations, from BERT to DeepSeek, up to 128K tokens. Roofline analysis at each memory level explains this result and shows when to stop. XDNA 1 has lower ridge points, so streaming on chip already reaches the compute-bound regime: the same fusion that doubles throughput on XDNA 2 is nearly wasted on XDNA 1. Comparing a mapping's operational intensity against each level's ridge point predicts which case applies before writing any code. Fuse until the mapping clears that ridge point, then stop. We release the reference designs as maintained open source.

Tema degli esploratori: calcolo e infrastrutture (retro-catalogo arXiv: annunci del 2026-09-21 in cs.AR).
Categorie arXiv: Hardware Architecture (cs.AR) ; Machine Learning (cs.LG).
Pagina del lavoro: https://arxiv.org/abs/2609.21264 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-10T01:07:48.203Z dalla pagina https://arxiv.org/catchup/cs.AR/2026-09-21?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).