Skip to content

Commit 2a3fa9f

Browse files
Fix q3_K dot product error in test-quantize-fns on s390x
Array q8bytes had only 4 elements allocated, but 8 elements accessed. This lead to write out of bounds and later read of overwritten values out of bounds and incorrect result. Signed-off-by: Aaron Teo <[email protected]>
1 parent d29864c commit 2a3fa9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml/src/ggml-cpu/arch/s390/quants.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ void ggml_vec_dot_q3_K_q8_K(int n, float * GGML_RESTRICT s, size_t bs, const voi
733733
uint8x16_t q3h[4];
734734
uint8x16_t q3b[2];
735735
int8x16_t q3bytes[4];
736-
int8x16_t q8bytes[4];
736+
int8x16_t q8bytes[8];
737737
uint8x16_t qhbits[2];
738738

739739
float sum = 0;

0 commit comments

Comments
 (0)