From: Abitofevrything Date: Sun, 8 Jan 2023 18:06:09 +0000 (+0100) Subject: ggml : correct behaviour of ggml_vec_sum_f32 (#390) X-Git-Tag: upstream/1.7.4~1625 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=8d7b29cedd7ff50cb29bc03dfed49756d8fe0057;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp ggml : correct behaviour of ggml_vec_sum_f32 (#390) --- diff --git a/ggml.c b/ggml.c index ccbd6c74..3ea1e61b 100644 --- a/ggml.c +++ b/ggml.c @@ -1109,8 +1109,8 @@ inline static void ggml_vec_sum_f32(const int n, float * s, const float * x) { ggml_float sum = 0.0; for (int i = 0; i < n; ++i) { sum += x[i]; - *s += sum; } + *s = sum; #else vDSP_sve(x, 1, s, n); #endif