返回全部动态

llama.cpp b10321 修复 Metal 归一化计算错误

原标题:b10321

llama.cpp Releases一手来源产品发布质量 76

AI 摘要

llama.cpp 发布 b10321 版本,修复了 Metal 后端中 NORM/RMS_NORM 操作在行长度非 simdgroup 倍数时计算错误的问题。该问题导致部分行求和结果偏小,进而影响均值和方差计算。修复通过向上取整线程组大小至完整 simdgroup 数解决,并新增了相关测试用例。修复后,M3 Pro 上的测试通过率从 25/50 和 26/51 提升至全部通过。

以上摘要由 AI 生成,可能存在误差。事实请以原文为准。

正文节选

<details open> metal : fix NORM/RMS_NORM for row lengths that leave a partial simdgroup (#26708) ggml_metal_op_norm sized the threadgroup with `nth = std::min(nth, args.ne00_t)`, which can leave nth not a multiple of the simdgroup size. The kernels finish their row reduction with a cross-simdgroup step where each lane of the last simdgroup reads one per-simdgroup partial sum out of shmem_f32: if (tiisg == 0) { shmem_f32[sgitg] = sumf; } threadgroup_barrier(mem_flags::mem_threadgroup);


发布时间:2026-08-08 03:07
抓取时间:2026-08-08 03:53
来源机构:ggml-org
阅读原文github.com