ggml-cpu: use runtime SVE width in FWHT (#24059)
This commit is contained in:
@@ -8955,7 +8955,12 @@ static void ggml_compute_forward_flash_attn_ext_f16(
|
|||||||
k->type == v->type &&
|
k->type == v->type &&
|
||||||
neq1 >= Q_TILE_SZ);
|
neq1 >= Q_TILE_SZ);
|
||||||
#ifdef GGML_SIMD
|
#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
|
#endif
|
||||||
int current_chunk = ith;
|
int current_chunk = ith;
|
||||||
|
|
||||||
@@ -11358,7 +11363,11 @@ static void ggml_compute_forward_fwht_f32(const ggml_compute_params * params, gg
|
|||||||
|
|
||||||
// Scalar passes
|
// Scalar passes
|
||||||
#if defined(GGML_SIMD)
|
#if defined(GGML_SIMD)
|
||||||
|
#if defined(__ARM_FEATURE_SVE)
|
||||||
|
const int step = svcntw();
|
||||||
|
#else
|
||||||
const int step = GGML_F32_EPR;
|
const int step = GGML_F32_EPR;
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
const int step = n;
|
const int step = n;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user