AISpot

llama.cpp Vulkan 支援 MUL_MAT 第三維廣播,不再回退 CPU

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

llama.cpp 建置 b11933 修復 Vulkan 後端:MUL_MAT 允許 src0 與 src1 在第三維(ne3)上不相等時進行廣播,這類矩陣乘不再回退到 CPU 並複製權重。此前 supports_op 會拒絕所有 ne3 不相等的 MUL_MAT,而 mul_mm、mul_mmq、mul_mat_vec 已通過 broadcast3 支援該廣播;回退還使 split 佈局隨 ubatch 的 stream 數量變化。

原標題:b11933
閱讀原文

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

原文

vulkan: fix CI llvmpipe by allowing dim 3 broadcast in MUL_MAT ( #31239 ) vulkan: allow dim 3 broadcast in MUL_MAT supports_op rejected every MUL_MAT whose src0 and src1 differ in ne3, although mul_mm, mul_mmq and mul_mat_vec already broadcast src0 over dim 3 through broadcast3. Such a matmul then ran on the CPU with a copy of the weight, and the split layout changed with the number of streams in the ubatch. Keep the strict check for MUL_MAT_ID only, and route the broadcast cases away from mul_mat_vec_nc, the one path that requires equal ne3. tests : harden MUL_MAT with permuted dim 3 broadcast cases Harden the MUL_MAT coverage with a weight broadcast over dim 3 against a permuted per-stream activation, the shape of an MLA output projection with a non unified KV cache, for a single token, several heads and several tokens per stream. Website: https://llama.app Attestations: https://github.com/ggml-org/llama.cpp/attestations/60437396 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 評分42

llama.cpp b11640:Vulkan 矩陣乘法改用 L2 友好排程

llama.cpp 發布 b11640,Vulkan 後端針對 cm2 mulmat 的矩陣乘法改用對 L2 快取更友好的 workgroup 排程(#30215)。同一版本把 macOS Apple Silicon 的 KleidiAI 建置標記為 DISABLED,並重新整理各平台預編譯包:Ubuntu 與 Windows x64 新增 ROCm 10.0,CUDA 13 建置對應 CUDA 13.4 庫。

llama.cpp releasesAI 評分46

llama.cpp 新版最佳化 Vulkan 上 MoE 重複專家的矩陣乘

llama.cpp 發布 b11554,Vulkan 後端改進了 MoE 推理中 mul_mat_id 對重複專家 id 的處理:不再逐個迴圈,而是在預計算階段統一處理。原本受限的 hoist row ids 最佳化現在預設開啟,會生成緊湊的 tile 描述列表、按需發射多個 tile,從而收緊 workgroup 數量上界,尾部執行緒可直接提前退出。

llama.cpp releasesAI 評分43

llama.cpp 修復 Vulkan 小矩陣乘法分組錯誤

llama.cpp 合併 PR #30106,修復 Vulkan 後端小矩陣乘法的分組錯誤。原實現把 warp tile 寬度 WM 固定為 32(8 寬子組時為 8),不隨 tile 的 BLOCK_SIZE 和 WARP 變化:使用 16 寬子組(Mali)時,同一工作組的第二個子組會寫入下一個 tile 的列;使用 8 寬子組時,部分 _id tile 有行未計算。現在改為按子組推導 WM,保證每個子組一個 warp tile;

llama.cpp releases● 精選AI 評分74

llama.cpp 修復 Metal 後端 MUL_MAT+ADD 融合錯誤

llama.cpp 合併 PR #30100,修復 Metal 後端 MUL_MAT+ADD 融合中殘差運算元的選擇錯誤:當 ADD 的兩個運算元都是矩陣乘法輸出(x = W1@u + W2@v)時,舊邏輯會選中自身從未寫入的輸出緩衝區,導致結果錯誤。Clef 決策模型因此在 Metal 上機率趨近均勻,billing 輸出 0.28,而 CPU 後端為 0.977,且同一檔案在 CPU 上結果正確,說明並非量化問題。