From fb851cb52f1c6073857291684f931a16b29ec71b Mon Sep 17 00:00:00 2001 From: Abitofevrything Date: Sun, 8 Jan 2023 18:58:23 +0100 Subject: [PATCH] ggml: correct behaviour of ggml_vec_sum_f32 --- 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