Skip to content

Commit 197900f

Browse files
abitofevrythingrock3125
authored andcommitted
ggml : correct behaviour of ggml_vec_sum_f32 (ggml-org#390)
1 parent 6b178f6 commit 197900f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1109,8 +1109,8 @@ inline static void ggml_vec_sum_f32(const int n, float * s, const float * x) {
11091109
ggml_float sum = 0.0;
11101110
for (int i = 0; i < n; ++i) {
11111111
sum += x[i];
1112-
*s += sum;
11131112
}
1113+
*s = sum;
11141114
#else
11151115
vDSP_sve(x, 1, s, n);
11161116
#endif

0 commit comments

Comments
 (0)