AISpot

b11730: cuda: cap MMQ Stream-K blocks at available work (#30553)

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

llama.cpp 建置 b11730 調整 CUDA 後端 MMQ 的 Stream-K 排程:網格上限從按 SM 數量啟動改為實際 k-block 數量,並進一步按所有輸出 tile 的 K_vram 迭代總數(部分迭代向上取整)收緊。這能去掉小矩陣下無活可乾的多餘 CUDA 塊及其啟動與 fixup 開銷,有效取整 K 範圍與數值結果不變。代價是部分迭代可能改變 FP32 求和的分組方式,MUL_MAT 與 MUL_MAT_ID 後端測試已在 RTX 5090 上通過。

原標題:b11730: cuda: cap MMQ Stream-K blocks at available work (#30553)
閱讀原文

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

原文

cuda: cap Stream-K blocks at the number of k-blocks Stream-K normally launches one CUDA block per SM. For small matrices, this can exceed the total number of output-tile/k-block pairs, leaving blocks with no work and adding launch and fixup overhead. Cap the grid at that count to remove these excess blocks without changing the useful rounded K ranges or numerical results. Assisted-by: Codex cuda: cap Stream-K blocks at the number of k iterations Cap the grid at the number of K_vram iterations across all output tiles, rounding up partial iterations. This removes extra CUDA blocks left by the k-block cap. Partial iterations can change FP32 summation grouping. MUL_MAT and MUL_MAT_ID backend tests pass on RTX 5090. Update ggml/src/ggml-cuda/mmq.cuh Co-authored-by: Johannes Gäßler [email protected]

相關報導

llama.cpp releasesAI 評分43

b11618: HIP: use 64-row MMQ tiles for some quant types on RDNA3.5 (#28195)

llama.cpp 的 HIP 後端把 64 行/128 執行緒的 MMQ tile 擴充套件到更多量化型別與 J 值組合,覆蓋 RDNA3.5(gfx115x);此前該配置只在 J≤32 時使用,更大的 tile 會佔滿 LDS,無法讓每個 CU 再容納一個工作組。在 gfx1151 上對 100 個 MUL_MAT 形狀做三輪測試,中位提升 2.1%、最佳 26.0%,5 個 MUL_MAT_ID 形狀中位提升 8.0%。J=96 因未獲益被明確排除,其餘條目保持不變。