]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
CANN: handle in-place ROPE on non-contiguous f32 tensors (#20274)
authorChenguang Li <redacted>
Thu, 19 Mar 2026 06:05:01 +0000 (14:05 +0800)
committerGitHub <redacted>
Thu, 19 Mar 2026 06:05:01 +0000 (14:05 +0800)
commit7f2cbd9a4df77a2ce10f31d69f07d4fb75eabc07
tree5542ead5d20afb2be291dffc92cff4a9c5240602
parent509a31d00f87804a466dee983a30ce29aa0441b1
CANN: handle in-place ROPE on non-contiguous f32 tensors (#20274)

RotaryPositionEmbedding on CANN fails when src and dst share the same
non-contiguous buffer (inplace + view), because the operator overwrites
source data before it is fully read.

Add a branch that detects this case and uses contiguous temporary
buffers: copy src to temp, run ROPE into another temp, then copy back
to the non-contiguous dst. Fixes 20 failing ROPE tests (f32, v=1,
inplace=1).

Signed-off-by: noemotiovon <redacted>
ggml/src/ggml-cann/aclnn_ops.cpp