Skip to content

Commit c515fc5

Browse files
authored
ggml : fix scalar path for computing norm (ggml-org#16558)
1 parent f9bc66c commit c515fc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml/src/ggml-cpu/vec.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,9 +463,9 @@ ggml_float ggml_vec_cvar_f32(const int n, float * y, const float * x, const floa
463463
#endif
464464
for (; i < n; ++i) {
465465
float val = x[i] - mean;
466+
y[i] = val;
466467
val *= val;
467468
sum += (ggml_float)val;
468-
y[i] = val;
469469
}
470470
return sum/n;
471471
}

0 commit comments

Comments
 (0)