From 563aca0b561aa354cd88e51ca4f83d2638bcac3a Mon Sep 17 00:00:00 2001 From: Xuan Son Nguyen Date: Wed, 9 Jul 2025 11:55:56 +0200 Subject: [PATCH] vDSP_vsmsa --- ggml/src/ggml-cpu/vec.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ggml/src/ggml-cpu/vec.h b/ggml/src/ggml-cpu/vec.h index 80f2eb550e..91b441d33a 100644 --- a/ggml/src/ggml-cpu/vec.h +++ b/ggml/src/ggml-cpu/vec.h @@ -353,8 +353,7 @@ inline static void ggml_vec_mad_f32_unroll(const int n, const int xs, const int inline static void ggml_vec_mad1_f32(const int n, float * y, const float s, const float b) { #if defined(GGML_USE_ACCELERATE) - vDSP_vsmul(y, 1, &s, y, 1, n); - vDSP_vsadd(y, 1, &b, y, 1, n); + vDSP_vsmsa(y, 1, &s, &b, y, 1, n); #elif defined(GGML_SIMD) #if defined(__ARM_FEATURE_SVE) const int sve_register_length = ggml_cpu_get_sve_cnt() * 8;