From: Herman Semenov Date: Fri, 17 May 2024 07:08:49 +0000 (+0000) Subject: ggml-quants, llama : removed excess checks (llama/7274) X-Git-Tag: upstream/0.0.1642~680 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=518c4afb3da0b3d15ad06926095e36655b544a93;p=pkg%2Fggml%2Fsources%2Fggml ggml-quants, llama : removed excess checks (llama/7274) --- diff --git a/src/ggml-quants.c b/src/ggml-quants.c index f13599f6..9b291d52 100644 --- a/src/ggml-quants.c +++ b/src/ggml-quants.c @@ -1986,7 +1986,7 @@ static void quantize_row_q3_K_impl(const float * restrict x, block_q3_K * restri for (int j = 0; j < QK_K/16; ++j) { if (quant_weights) { - const float * qw = quant_weights ? quant_weights + QK_K * i + 16*j : NULL; + const float * qw = quant_weights + QK_K * i + 16*j; for (int l = 0; l < 16; ++l) weight[l] = qw[l] * sqrtf(sigma2 + x[16*j+l]*x[16*j+l]); } else { for (int l = 0; l < 16; ++l) weight[l] = x[16*j+l]*x[16*j+l];