ggml : correct behaviour of ggml_vec_sum_f32 (#390)

pull/404/head
Abitofevrything 2 years ago committed by GitHub
parent 08dc705a69
commit 8d7b29cedd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1109,8 +1109,8 @@ inline static void ggml_vec_sum_f32(const int n, float * s, const float * x) {
ggml_float sum = 0.0; ggml_float sum = 0.0;
for (int i = 0; i < n; ++i) { for (int i = 0; i < n; ++i) {
sum += x[i]; sum += x[i];
*s += sum;
} }
*s = sum;
#else #else
vDSP_sve(x, 1, s, n); vDSP_sve(x, 1, s, n);
#endif #endif

Loading…
Cancel
Save