From: Georgi Gerganov Date: Mon, 13 Oct 2025 08:22:27 +0000 (+0300) Subject: ggml : fix scalar path for computing norm (llama/16558) X-Git-Tag: upstream/1.8.2~17 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=ccac1b4772c7229405a9aa3b4e4c93bdbbcc7bea;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp ggml : fix scalar path for computing norm (llama/16558) --- diff --git a/ggml/src/ggml-cpu/vec.cpp b/ggml/src/ggml-cpu/vec.cpp index b8e37052..43dc7537 100644 --- a/ggml/src/ggml-cpu/vec.cpp +++ b/ggml/src/ggml-cpu/vec.cpp @@ -463,9 +463,9 @@ ggml_float ggml_vec_cvar_f32(const int n, float * y, const float * x, const floa #endif for (; i < n; ++i) { float val = x[i] - mean; + y[i] = val; val *= val; sum += (ggml_float)val; - y[i] = val; } return sum/n; }