Windows prefill and the NPU's 4 KB page translations (driver request: amd/xdna-driver#1817)

Aperta
#1,080 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp, linux

Direzione di ricerca

Start by comparing FastFlowLM’s Windows and Linux prefill paths and measuring DMA behavior with different page sizes; the issue names no source files or tests. The driver request amd/xdna-driver#1817 is the starting reference for 2 MB host memory mappings. Done looks like Windows/Linux prefill measurements that show whether page size affects performance.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

On Windows the NPU driver maps host memory in 4 KB pages, and every page a shim DMA row lands on costs a translation: past a cache of about 512 pages, all DMA channels together get 70-80 million translations a second (Krackan Point, Windows 11). On Linux the NPU gets 2 MB pages (transparent huge pages) and pays nothing. Krackan Point, Linux on one laptop and Windows 11 on another:

16 channels, rows 64 KB + one row apart Linux (2 MB pages) Windows 11
gather 256 B rows 89.6 GB/s 15.6 GB/s
write 128 B rows 73.2 GB/s 6.0 GB/s
read stream 96.9 GB/s 81.0 GB/s

A prefill that writes a GEMM's output as one short row per token, a whole activation row apart, pays one translation per row on Windows: for Llama 3.2 1B, 7.5 M per 1024-token chunk with 4 KB pages, 0.22 M with 2 MB pages, ~100 ms of DMA per chunk at Windows' rate. If FastFlowLM's prefill on Windows trails Linux on the same machine, this is likely part of it.

A request to map the NPU's host memory with 2 MB pages, with measurements by page size: amd/xdna-driver#1817. FastFlowLM's Windows / Linux numbers there would strengthen it.

Lingua principale
C++
Stelle
2.1k
Fork
184
Merge medio
12h 22m
PR unite (30g)
239

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ROCm/FastFlowLM

Tutte le issue di ROCm/FastFlowLM

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.