From: Georgi Gerganov Date: Thu, 23 May 2024 14:17:43 +0000 (+0300) Subject: ggml : silence UB sanitizer error during iq2_xxs quantization (llama/0) X-Git-Tag: upstream/0.0.1642~650 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=4dba3dc447a6f6b8c59b6c72bb4174fcadb0774e;p=pkg%2Fggml%2Fsources%2Fggml ggml : silence UB sanitizer error during iq2_xxs quantization (llama/0) --- diff --git a/src/ggml-quants.c b/src/ggml-quants.c index 88f58a33..bb01ce93 100644 --- a/src/ggml-quants.c +++ b/src/ggml-quants.c @@ -12144,7 +12144,7 @@ static void quantize_row_iq2_xxs_impl(const float * restrict x, void * restrict printf("\n"); GGML_ASSERT(false); } - q2[2*ib+0] |= (grid_index << 8*k); + q2[2*ib+0] |= ((uint32_t) grid_index << 8*k); q2[2*ib+1] |= (block_signs[k] << 7*k); } GGML_ASSERT(scale >= 0);