Skip to content

Commit 21a5b8b

Browse files
ikawrakowIwan Kawrakow
andauthored
Fix ARM_NEON build failure due to q8_2 (#303)
Co-authored-by: Iwan Kawrakow <[email protected]>
1 parent 190e786 commit 21a5b8b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ggml/src/ggml-alloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ static size_t ggml_dyn_tallocr_alloc(struct ggml_dyn_tallocr * alloc, size_t siz
174174
// this should never happen
175175
fprintf(stderr, "%s: not enough space in the buffer to allocate %zu bytes, largest block available %zu bytes\n",
176176
__func__, size, max_avail);
177-
fprintf(stderr, "%s: tensor was %s with %zu elements and %zu bytes\n", __func__, tensor->name,
178-
ggml_nelements(tensor), ggml_nbytes(tensor));
177+
fprintf(stderr, "%s: tensor was %s with %g elements and %zu bytes\n", __func__, tensor->name,
178+
1.*ggml_nelements(tensor), ggml_nbytes(tensor));
179179
GGML_ABORT("not enough space in the buffer");
180180
}
181181
}

ggml/src/iqk/iqk_quantize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -860,9 +860,9 @@ void quantize_row_q8_1_x4_T(const float * x, Block * y, int64_t k) {
860860
}
861861
} else {
862862
if (i < nb4) {
863-
y4[i4].s[ir] = vaddvq_s32(accv);
863+
y4[i4].d[ir+4] = GGML_FP32_TO_BF16(d * vaddvq_s32(accv)).bits;
864864
} else {
865-
y[i].s = vaddvq_s32(accv);
865+
y[i].s = GGML_FP32_TO_BF16(d * vaddvq_s32(accv)).bits;
866866
}
867867
}
868868
}

0 commit comments

Comments
 (0)