From ffe841cdd97323eeacbb63dd871c4398ecd13ed8 Mon Sep 17 00:00:00 2001 From: 0cc4m Date: Tue, 30 Jan 2024 19:57:10 +0100 Subject: [PATCH] Fix bug in Vulkan CPY op --- ggml-vulkan.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ggml-vulkan.cpp b/ggml-vulkan.cpp index 7a09fc400..9532e242b 100644 --- a/ggml-vulkan.cpp +++ b/ggml-vulkan.cpp @@ -2873,7 +2873,8 @@ static void ggml_vk_op_f32(vk_context * ctx, const ggml_tensor * src0, const ggm if (op == GGML_OP_CPY) { GGML_ASSERT(!transfer_src0); GGML_ASSERT(!transfer_src1); - d_sz = dst->ne[1] * dst->nb[1]; + x_sz = ggml_nbytes(src0); + d_sz = ggml_nbytes(dst); if (extra->offset + d_sz >= d_D->size) { d_sz = VK_WHOLE_SIZE;