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

Đang mở
#1,080 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp, linux
Lĩnh vực
backend, performance

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C++
Star
2.1k
Fork
184
Merge trung bình
12 giờ 22 phút
Pull request đã merge (30 ngày)
239

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ROCm/FastFlowLM

Tất cả issue của ROCm/FastFlowLM

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.