AISpot

llama.cpp Vulkan 為 AMD 最佳化 f16/bf16 KV 複製

llama.cpp releases版本更新地端推論開源

llama.cpp 建置 b11647 的 Vulkan 後端為 AMD 顯示卡最佳化了 f16/bf16 KV cache 的 strided 複製:先把 KV 一次性拷到 scratch,使跨記憶體通道的讀取分散,而不是集中在少數通道上。改動刪掉了專用的反量化 shader,改為複用已有的通用 copy pipeline——f16 分支只需要 strided copy,不需要 dequant;複製按源記憶體順序描述,讓跨步訪問落在順序寫入端。

原標題:b11647
閱讀原文

評分42 / 42(平均 42,門檻 60)
狀態未入選

原文

vulkan : copy strided f16 KV once on AMD so reads spread across memory channels ( #27703 ) vulkan : copy strided f16 KV once so reads spread across memory channels Assisted-by: Claude (Opus 4.8 / Opus 5) tests : cover the f16 KV copy to scratch Assisted-by: Claude (Opus 4.8 / Opus 5) vulkan : gate the f16 KV scratch copy to AMD Assisted-by: Claude (Opus 4.8 / Opus 5) vulkan : reuse the generic copy shader for the f16 KV scratch fill The f16 clause needs only a strided copy, not a dequant, so drop the dedicated shader and dispatch the existing copy pipeline instead. The copy is described in source memory order so the strided access lands on the writes, which stream, instead of the reads, which would concentrate on a few memory channels. Assisted-by: Claude (Opus 4.8 / Opus 5 / Fable 5) vulkan : extend the strided KV scratch copy to bf16 Assisted-by: Claude Opus 5 vulkan : clean up comments Assisted-by: Claude Opus 5 consolidate copy shaders disable on RDNA4 Co-authored-by: Ruben Ortlam [email protected] Website: https://llama.app Attestations: https://github.com/ggml-org/llama.cpp/attestations/56251780 macOS/iOS: macOS Apple Silicon (arm64) macOS Apple Silicon (arm64, KleidiAI enabled) DISABLED macOS Intel (x64) iOS XCFramework Linux: Ubuntu x64 (CPU) Ubuntu arm64 (CPU) Ubuntu s390x (CPU) Ubuntu x64 (Vulkan) Ubuntu arm64 (Vulkan) Ubuntu x64 (CUDA 12) - CUDA 12.8 libraries Ubuntu x64 (CUDA 13) - CUDA 13.4 libraries Ubuntu arm64 (CUDA 13) - CUDA 13.4 libraries Ubuntu x64 (ROCm 10.0) Ubuntu x64 (OpenVINO) Ubuntu x64 (SYCL FP32) Ubuntu x64 (SYCL FP16) Linux arm64 (Snapdragon: CPU, Adreno GPU, Hexagon NPU) - setup guide Android: Android arm64 (CPU) Android arm64 (Snapdragon: CPU, Adreno GPU, Hexagon NPU) - setup guide Windows: Windows x64 (CPU) Windows arm64 (CPU) Windows arm64 (OpenCL Adreno) Windows x64 (CUDA 12) - CUDA 12.4 DLLs Windows x64 (CUDA 13) - CUDA 13.4 DLLs Windows arm64 (CUDA 13) - CUDA 13.4 DLLs Windows x64 (Vulkan) Windows arm64 (Vulkan) Windows x64 (OpenVINO) Windows x64 (SYCL) Windows x64 (ROCm 10.0) openEuler: DISABLED openEuler x86 (310p) openEuler x86 (910b, ACL Graph) openEuler aarch64 (310p) openEuler aarch64 (910b, ACL Graph) UI: UI

相關報導

llama.cpp releasesAI 評分43

llama.cpp b11564:Vulkan 後端專門化 CM2 量化塊大小

llama.cpp 發布 b11564 建置,Vulkan 後端為 CM2 matmul 專門化量化塊大小,並改用三元表示式避免 switch 降低帶來的開銷,同時澄清了相關注釋。該版本照例附帶全平台建置,涵蓋 macOS/iOS、Linux、Windows、Android 與 openEuler,包括 CUDA 12/13、ROCm 10.0、Vulkan、SYCL、OpenVINO 等後端。

llama.cpp releasesAI 評分45

llama.cpp b11573:Vulkan 後端用打包 FMA 替代點積運算元做 f16 累加

llama.cpp 發布 b11573 建置,Vulkan 後端改用打包 FMA 做 f16 累加,不再使用獨立的點積運算元。新的 dot_product 實現每次 f16 FMA 打包兩行,並更名為 dot_product_v2。該版本照例提供各平台預編譯包,覆蓋 CUDA 12/13、ROCm 10.0、SYCL、OpenVINO、Vulkan,以及 Snapdragon 的 CPU、Adreno GPU 與 Hexagon NPU;

llama.cpp releasesAI 評分36

llama.cpp 修復 Vulkan 後端 RDNA4 矩陣向量調優

llama.cpp 發布 b11389 版本,修復了 Vulkan 後端在 RDNA4 架構上的矩陣向量運算調優問題(PR #29934)。該版本繼續提供覆蓋 macOS、Linux、Windows、Android 等平台的預編譯二進位制,包括 Vulkan、CUDA、ROCm、SYCL 等後端,其中 macOS Apple Silicon 的 KleidiAI 啟用版和 openEuler 建置被停用。

llama.cpp releases● 精選AI 評分68

llama.cpp 為 Metal 新增 F16 KV 張量 API flash attention 核心

llama.cpp 合併 PR #29570,在 Metal 後端為 F16 KV 快取加入基於張量 API 的 flash attention 核心。該核心覆蓋 DK=DV=512、DK=576/DV=512、DK=192/DV=128 等配置,並支援 attention sinks、ALiBi 與 logit softcap。改動隨 b11362 建置發布,覆蓋 macOS Apple Silicon、iOS 及 Linux、Windows、Android 等多平台建置。

llama.cpp releasesAI 評分42

llama.cpp 發布 b11424,修復 Vulkan Flash Attention 共享記憶體越界寫

llama.cpp 發布 b11424 建置版本,修復 Vulkan 後端 Flash Attention 的共享記憶體越界寫問題(#29988)。該版本照例提供 macOS/iOS、Linux、Windows、Android 的預編譯包,涵蓋 Vulkan、CUDA 12/13、ROCm 10.0、OpenVINO、SYCL、OpenCL 等後端,並附驍龍 CPU/Adreno GPU/Hexagon NPU 的安裝指引。