ik_llama_opt/ggml
Joel Farthing 86d8e9a13c
CUDA: fix MUL with non-contiguous src0 and scalar src1 (#2072)
The scalar fast-path in ggml_cuda_op_mul routes to ggml_cuda_op_scale_tensor,
which reads src0 and writes dst as flat contiguous buffers. With a non-contiguous
src0 (for example a row-gapped view) this ignored the per-row strides: only the
first row was correct and later rows read the wrong memory. The CPU backend
respects the strides, so the two backends diverged.

Guard the fast-path on contiguous src0 and dst; non-contiguous inputs now fall
through to the general bin_bcast path, which honours the strides.

Add a non-contiguous test_bin_bcast variant covering both the scalar (scale) and
vector (general) paths.

Co-authored-by: Joel Farthing <262452229+joelfarthing@users.noreply.github.com>
2026-07-03 08:27:03 +02:00
..
cmake Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
include deepseek2 : GLM-DSA sparse attention (lightning indexer), --dsa off by default (#2045) 2026-07-02 09:36:49 +02:00
src CUDA: fix MUL with non-contiguous src0 and scalar src1 (#2072) 2026-07-03 08:27:03 +02:00
.gitignore Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
CMakeLists.txt cmake: drop ggml-blas.h from GGML_PUBLIC_HEADERS (#2007) 2026-06-21 07:49:09 +02:00