]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
ggml : fix mul_mat src1 indexing when not contiguous and non-F32 (#386)
authorGeorgi Gerganov <redacted>
Fri, 14 Jul 2023 08:13:55 +0000 (11:13 +0300)
committerGeorgi Gerganov <redacted>
Fri, 14 Jul 2023 08:13:55 +0000 (11:13 +0300)
src/ggml.c

index 256b826556fddc9f8574edc9a22029300615fda3..7a9f84ef4b75c8e113699d4c1a2e12ef51e31fc8 100644 (file)
@@ -10836,7 +10836,7 @@ static void ggml_compute_forward_mul_mat(
         //       the original src1 data pointer, so we should index using the indices directly
         // TODO: this is a bit of a hack, we should probably have a better way to handle this
         const char * src1_col = (const char *) wdata +
-            (src1_cont
+            (src1_cont || src1->type != vec_dot_type
              ? (i11      + i12*ne11 + i13*ne12*ne11)*row_size
              : (i11*nb11 + i12*nb12 + i13*nb13));