返回全部动态
llama.cpp b11064:Metal 支持 dsv4_hc_pre 任意 hc
原标题:b11064
AI 摘要
llama.cpp 发布 b11064 版本,主要修复 Metal 后端 dsv4_hc_pre 算子的问题:此前该算子通过 constexpr 将 hc 硬编码为 4,导致其他 hc 值被 supports_op 拒绝并回退到 CPU。本次改动将 n_hc 作为函数常量(FC_DSV4_HC)传入,并为不同 n_hc 生成流水线变体,同时新增 hc = 1、2、3、5、8、65 的测试用例。该修复使 Kimi-K3 等使用可变 hc 的模型能在 Metal 上正确运行。
以上摘要由 AI 生成,可能存在误差。事实请以原文为准。
正文节选
<details open> metal : support arbitrary hc in dsv4_hc_pre (#29169) the dsv4_hc_pre kernels hardcoded hc = 4 via a constexpr used with simd_shuffle, so the op was rejected by supports_op for any other hc and fell back to CPU. Kimi-K3 uses dsv4_hc_pre with hc equal to the number of banked checkpoints in the cross-layer residual stack, which grows with the layer index. pass n_hc as a function constant (FC_DSV4_HC) with per-n_hc pipeline variants, and loop over it in both pre kernels with direct
发布时间:2026-09-20 23:19
抓取时间:2026-09-20 23:34
来源机构:ggml-org