]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/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>
Sun, 29 Mar 2026 12:04:36 +0000 (15:04 +0300)
commit2a6de29364870e524efc88fd0a470139ddf28332
tree8874212b02be9e64bfea523351c48dd1ec029dfb
parent3d004fbf0af918d2bcca0b43b63371dc9666446a
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>
ggml/src/ggml-cann/aclnn_ops.cpp