From: Winston Ma Date: Thu, 28 May 2026 10:48:34 +0000 (+0800) Subject: vulkan: fix wrong index variable in inner loop (#23665) X-Git-Tag: upstream/0.0.10438~1056 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=7c48fb81ce69e37ff98151b6fc8f1c50c53aa141;p=pkg%2Fggml%2Fsources%2Fllama.cpp vulkan: fix wrong index variable in inner loop (#23665) --- diff --git a/ggml/src/ggml-vulkan/ggml-vulkan.cpp b/ggml/src/ggml-vulkan/ggml-vulkan.cpp index b8ac4a9c2..238ee8223 100644 --- a/ggml/src/ggml-vulkan/ggml-vulkan.cpp +++ b/ggml/src/ggml-vulkan/ggml-vulkan.cpp @@ -7233,7 +7233,7 @@ static void ggml_vk_buffer_write_nc_async(ggml_backend_vk_context * ctx, vk_cont const uint64_t s_off = buf_offset + i3*nb3 + i2*nb2 + i1*nb1; const uint64_t d_off = offset + i3*dstnb3 + i2*dstnb2 + i1*dstnb1; for (uint64_t i0 = 0; i0 < ne0; i0++) { - slices.push_back({ s_off + i1*nb0, d_off + i0*dstnb0, dstnb0 }); + slices.push_back({ s_off + i0*nb0, d_off + i0*dstnb0, dstnb0 }); } } }