返回全部动态
llama.cpp b11047 修复 CUDA CUB argsort 原地键损坏问题
原标题:b11047
AI 摘要
llama.cpp 发布 b11047 版本,修复了 CUDA 后端中 CUB argsort 因原地键缓冲区导致的排序损坏问题。原实现将 d_keys_in 与 d_keys_out 指向同一缓冲区,违反 CUB 双缓冲要求,导致排序结果错乱并引发下游 get_rows 越界读取。修复方案是在全部六个调用点使用独立的 keys-out 缓冲区,并同步提供各平台预编译二进制。
以上摘要由 AI 生成,可能存在误差。事实请以原文为准。
正文节选
<details open> cuda : fix CUB argsort corruption caused by in-place keys (#28389) argsort_f32_i32_cuda_cub called the one-shot DeviceRadixSort::SortPairs API with d_keys_in == d_keys_out (temp_keys, temp_keys). CUB's internal double-buffer ping-pong requires distinct key buffers: with aliased buffers the sort partially overwrites its own input mid-pass and emits a corrupted permutation, surfacing as intermittent garbage indices (e.g. backend top_k over a 248k-column vocab on Maxwell/CUDA 12.5/
发布时间:2026-09-19 15:24
抓取时间:2026-09-19 18:01
来源机构:ggml-org