From 8d7b29cedd7ff50cb29bc03dfed49756d8fe0057 Mon Sep 17 00:00:00 2001 From: Abitofevrything <54505189+abitofevrything@users.noreply.github.com> Date: Sun, 8 Jan 2023 19:06:09 +0100 Subject: [PATCH] ggml : correct behaviour of ggml_vec_sum_f32 (#390) --- ggml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml.c b/ggml.c index ccbd6c7..3ea1e61 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