llama.cpp b11721:CUDA 融合 qwen4exp 门控计算链
原标题:b11721
AI 摘要
llama.cpp 发布 b11721 版本,在 CUDA 后端将 qwen4exp 的 SCALE -> SIGMOID -> SCALE -> hc_post 计算链融合为单个 kernel,这是对 Vulkan HC_POST_GATE 融合(#29520)的移植。改动后 hc_post 权重由 2*sigmoid(inject/hc) 构建,dsv4_hc_post_f32 通过 gated 模板标志直接从原始权重计算 scale_out*sigmoid(scale_in*p),使原本四个 kernel 的链路合并为一个。该版本同时提供 macOS、Linux、Windows、Android 等多平台及 CUDA、Vulkan、ROCm、SYCL、OpenVINO 等后端的预编译包。
正文节选
<details open> cuda : fuse qwen4exp's SCALE -> SIGMOID -> SCALE -> hc_post chain (#30602) Port of the Vulkan HC_POST_GATE fusion (#29520). hc_combine builds the hc_post weights as 2*sigmoid(inject/hc); dsv4_hc_post_f32 now takes a gated template flag and computes scale_out*sigmoid(scale_in*p) from the raw weights, so the chain runs as one kernel instead of four. </details> **Website:** - <https://llama.app> **Attestations:** - <https://github.com/ggml-org/llama.cpp/attestations/57168730> *