]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
CANN: handle in-place ROPE on non-contiguous f32 tensors (llama/20274)
authorChenguang Li <redacted>
Thu, 19 Mar 2026 06:05:01 +0000 (14:05 +0800)
committerGeorgi Gerganov <redacted>
Sat, 28 Mar 2026 11:39:09 +0000 (13:39 +0200)
commit69c7b6dfaa1e5d2f7daae003d30addb07a81e797
tree7cd71f4c657daaad5bd0b823a231240ad3cf97a6
parent9d36602e3d37a32889895968cefd1b6d1b06c716
CANN: handle in-place ROPE on non-contiguous f32 tensors (llama/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>
src/ggml-cann/aclnn_ops.cpp