Commit d7682b58 for whisper.cpp
commit d7682b5814d21246b3b5e11fbf5f33d77ad7bfc8
Author: Yash Raj Pandey <55940078+devYRPauli@users.noreply.github.com>
Date: Fri Oct 2 10:47:30 2026 -0400
ggml-cuda : fix cpy transposed path corrupting non-contiguous dst (llama/27663)
diff --git a/ggml/src/ggml-cuda/cpy.cu b/ggml/src/ggml-cuda/cpy.cu
index 7a998458..90a06b97 100644
--- a/ggml/src/ggml-cuda/cpy.cu
+++ b/ggml/src/ggml-cuda/cpy.cu
@@ -459,7 +459,8 @@ void ggml_cuda_cpy(ggml_backend_cuda_context & ctx, const ggml_tensor * src0, gg
const bool contiguous_srcs = ggml_is_contiguous(src0) && ggml_is_contiguous(src1);
const bool can_be_transposed = nb01 == (int64_t)ggml_element_size(src0) &&
- src0->ne[3] == 1 && nb02 == ne00 * ne01 * (int64_t)ggml_element_size(src0);
+ src0->ne[3] == 1 && nb02 == ne00 * ne01 * (int64_t)ggml_element_size(src0) &&
+ ggml_is_contiguous(src1);
size_t mc_width = 0, mc_height = 0, mc_spitch = 0, mc_dpitch = 0;