From bc2cc6e69a95ed693e3ea430c3217c4e62781fdd Mon Sep 17 00:00:00 2001 From: slaren Date: Wed, 13 Dec 2023 19:26:57 +0100 Subject: [PATCH] cuda : fix bin bcast when src1 and dst have different types ggml-ci --- ggml-cuda.cu | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ggml-cuda.cu b/ggml-cuda.cu index 204facec2..019648bdd 100644 --- a/ggml-cuda.cu +++ b/ggml-cuda.cu @@ -5406,10 +5406,10 @@ struct bin_bcast_cuda { size_t nb12 = cnb1[2]; size_t nb13 = cnb1[3]; - size_t s0 = nb0 / sizeof(src1_t); - size_t s1 = nb1 / sizeof(src1_t); - size_t s2 = nb2 / sizeof(src1_t); - size_t s3 = nb3 / sizeof(src1_t); + size_t s0 = nb0 / sizeof(dst_t); + size_t s1 = nb1 / sizeof(dst_t); + size_t s2 = nb2 / sizeof(dst_t); + size_t s3 = nb3 / sizeof(dst_t); size_t s10 = nb10 / sizeof(src1_t); size_t s11 = nb11 / sizeof(src1_t);