The llama.cpp project released build b10353, which addresses a critical bug in the ggml_roll operation on CUDA and Metal backends. Previously, permuted (non-contiguous) source tensors produced silently incorrect results because these backends ignored stride information.

  • The fix adds a contiguous source requirement to both CUDA and Metal roll kernels, matching the existing GGML_OP_ROPE guard.
  • This change ensures the scheduler falls back to the CPU implementation for non-contiguous inputs, which correctly handles strides.
  • A permuted test_roll case was added to verify the fix.

This update prevents data corruption in models relying on ROLL operations with non-standard memory layouts.