返回全部动态

llama.cpp b12220:修复 Metal 后端 ggml_tri 的 NaN 问题

原标题:b12220

llama.cpp Releases一手来源开源质量 64

AI 摘要

llama.cpp 发布 b12220 版本,主要修复 Metal 后端 ggml_tri 内核的数值行为:原实现将 0/1 比较结果作为乘数,导致三角形外的 +-inf 变成 NaN,而 CPU 内核在该位置写入 0;新实现改为与 CPU 一致的 select 语义。同时新增 test_tri_special 测试,覆盖四种三角形类型并验证该修复。发布包覆盖 macOS、iOS、Linux、Android、Windows 等多平台及 CUDA、Vulkan、ROCm、SYCL、OpenVINO 等后端。

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

正文节选

<details open> metal : make ggml_tri select instead of scaling by the comparison (#30711) * metal: make ggml_tri select instead of scaling by the comparison The kernel multiplied by the 0/1 comparison, which turns a +-inf outside the triangle into NaN, while the CPU kernel writes a plain zero there. Select, like the CPU does. Adds test_tri_special, which puts +-inf into the cells that have to be discarded, for all four triangle types. It fails against the previous kernel and passes with this


发布时间:2026-11-09 20:00
抓取时间:2026-11-09 20:57
来源机构:ggml-org
阅读原文github.com