From: Sigbjørn Skjæret Date: Sun, 28 Sep 2025 21:15:03 +0000 (+0200) Subject: ggml : fix GGML_F32_VEC_FMA argument order in ggml_vec_mad1_f32 (llama/16307) X-Git-Tag: upstream/1.8.0~23 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=5c6e7956077c4154eabd860bad2f4baeaf3c207b;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp ggml : fix GGML_F32_VEC_FMA argument order in ggml_vec_mad1_f32 (llama/16307) * fix GGML_F32_VEC_FMA argument order in ggml_vec_mad1_f32 * add test that fails on simd --- diff --git a/ggml/src/ggml-cpu/vec.h b/ggml/src/ggml-cpu/vec.h index ef334d08..341e64e6 100644 --- a/ggml/src/ggml-cpu/vec.h +++ b/ggml/src/ggml-cpu/vec.h @@ -610,7 +610,7 @@ inline static void ggml_vec_mad1_f32(const int n, float * y, const float * x, co for (int i = 0; i < np; i += GGML_F32_STEP) { for (int j = 0; j < GGML_F32_ARR; j++) { ay[j] = GGML_F32_VEC_LOAD(x + i + j*GGML_F32_EPR); - ay[j] = GGML_F32_VEC_FMA(ay[j], vs, vb); + ay[j] = GGML_F32_VEC_FMA(vb, ay[j], vs); GGML_F32_VEC_STORE(y + i + j*GGML_F32_EPR, ay[j]); }