mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-01-03 20:48:59 +01:00
ggml : correct behaviour of ggml_vec_sum_f32 (#390)
This commit is contained in:
parent
08dc705a69
commit
8d7b29cedd
2
ggml.c
2
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;
|
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…
Reference in New Issue
Block a user