From: Charles Xu Date: Wed, 3 Jun 2026 10:45:10 +0000 (+0200) Subject: ggml-cpu: use runtime SVE width in FWHT (llama/24059) X-Git-Tag: upstream/1.9.2~240 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=750fa4ca35c4b39a487724f854bfc788a2d9db53;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp ggml-cpu: use runtime SVE width in FWHT (llama/24059) --- diff --git a/ggml/src/ggml-cpu/ops.cpp b/ggml/src/ggml-cpu/ops.cpp index dc73696a..3a1912ae 100644 --- a/ggml/src/ggml-cpu/ops.cpp +++ b/ggml/src/ggml-cpu/ops.cpp @@ -8955,7 +8955,12 @@ static void ggml_compute_forward_flash_attn_ext_f16( k->type == v->type && neq1 >= Q_TILE_SZ); #ifdef GGML_SIMD - use_tiled &= (DV % GGML_F32_EPR == 0); +#if defined(__ARM_FEATURE_SVE) + const int64_t f32_epr = svcntw(); +#else + const int64_t f32_epr = GGML_F32_EPR; +#endif + use_tiled &= (DV % f32_epr == 0); #endif int current_chunk = ith; @@ -11358,7 +11363,11 @@ static void ggml_compute_forward_fwht_f32(const ggml_compute_params * params, gg // Scalar passes #if defined(GGML_SIMD) +#if defined(__ARM_FEATURE_SVE) + const int step = svcntw(); +#else const int step = GGML_F32_EPR; +#endif #else const int step = n; #endif