ik_llama_opt/ggml
markaalonzo 52efa12fda
fix: add missing __syncthreads in delta net CUDA kernel (#1649)
The token loop reads sK[] in the state update (bottom of loop) but has
no barrier before the next iteration overwrites sK[] (top of loop).
Without an explicit memory fence, hardware/compiler reordering can
cause non-deterministic reads from shared memory.

Per review: with this barrier in place, the prior __syncthreads() after
the cross-warp reduction and the one immediately after loop exit are
both redundant. The new barrier is a full block-level fence that also
orders all_sum1/all_sum2 reads vs. the next iteration's writes, and
every thread reaches it before leaving the loop. Both redundant
barriers removed.

No performance impact — GPU utilization is 31-33% during inference,
bottlenecked by CPU MoE expert computation, not the CUDA kernel.

Co-authored-by: Mark Alonzo <mark.alonzo@outlook.com>
2026-04-17 21:45:46 +02:00
..
cmake Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
include Fused fused_rms_norm + fused_rms_norm + add (#1627) 2026-04-13 13:24:39 +02:00
src fix: add missing __syncthreads in delta net CUDA kernel (#1649) 2026-04-17 21:45:46 +02:00
.gitignore Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
CMakeLists.txt Enable all CPU-backend FA supported quants by default (#1549) 2026-03-29 14:36:09 +02:00