diff options
author | Cebtenzzre <cebtenzzre@gmail.com> | 2023-09-01 09:34:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-01 16:34:50 +0300 |
commit | ef156499721c67748cde01a5436cb6f0648bb4b4 (patch) | |
tree | f979837d94e3deab68d38b08ce70441123c888c8 /k_quants.c | |
parent | d8d6977f48f1fa402ade38ad32c5b5fb1358d059 (diff) |
build : fix most gcc and clang warnings (#2861)
* fix most gcc and clang warnings
* baby-llama : remove commented opt_params_adam
* fix some MinGW warnings
* fix more MinGW warnings
Diffstat (limited to 'k_quants.c')
-rw-r--r-- | k_quants.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -183,13 +183,9 @@ static float make_qkx1_quants(int n, int nmax, const float * restrict x, uint8_t int ntry, float alpha) { float min = x[0]; float max = x[0]; - float sum_x = 0; - float sum_x2 = 0; for (int i = 1; i < n; ++i) { if (x[i] < min) min = x[i]; if (x[i] > max) max = x[i]; - sum_x += x[i]; - sum_x2 += x[i]*x[i]; } if (max == min) { for (int i = 0; i < n; ++i) L[i] = 0; @@ -2060,7 +2056,7 @@ void ggml_vec_dot_q3_K_q8_K(const int n, float * restrict s, const void * restri __m256 acc = _mm256_setzero_ps(); - uint32_t *aux; + const uint32_t *aux; for (int i = 0; i < nb; ++i) { @@ -2070,7 +2066,7 @@ void ggml_vec_dot_q3_K_q8_K(const int n, float * restrict s, const void * restri const int8_t * restrict q8 = y[i].qs; // Set up scales - aux = (uint32_t *)x[i].scales; + aux = (const uint32_t *)x[i].scales; __m128i scales128 = _mm_set_epi32( ((aux[1] >> 4) & kmask2) | (((aux[2] >> 6) & kmask1) << 4), ((aux[0] >> 4) & kmask2) | (((aux[2] >> 4) & kmask1) << 4), |