mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-11-18 11:46:58 +00:00
ggml : fix conv2d_dw SVE path (ggml/1380)
* Fix test-conv2d-dw failure on ARM SVE by using runtime vector length The ggml_compute_forward_conv_2d_dw_cwhn function was using a hardcoded GGML_F32_EPR (8) for SIMD vectorization, but on ARM SVE the actual vector length varies by hardware. This caused incorrect computation when processing CWHN layout tensors on ARM machines. Fix by using svcntw() to get the runtime SVE vector length instead of the compile-time constant. Co-authored-by: ggerganov <1991296+ggerganov@users.noreply.github.com> * ci : reduce sam score threshold * ci : update bbox checks for sam test --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ggerganov <1991296+ggerganov@users.noreply.github.com>
This commit is contained in:
@@ -7084,7 +7084,11 @@ static void ggml_compute_forward_conv_2d_dw_cwhn(
|
|||||||
const int64_t row_end = MIN(row_start + rows_per_thread, rows_total);
|
const int64_t row_end = MIN(row_start + rows_per_thread, rows_total);
|
||||||
|
|
||||||
#ifdef GGML_SIMD
|
#ifdef GGML_SIMD
|
||||||
|
#if defined(__ARM_FEATURE_SVE)
|
||||||
|
const int64_t pkg_size = svcntw();
|
||||||
|
#else
|
||||||
const int64_t pkg_size = GGML_F32_EPR;
|
const int64_t pkg_size = GGML_F32_EPR;
|
||||||
|
#endif
|
||||||
const int64_t pkg_count = c / pkg_size;
|
const int64_t pkg_count = c / pkg_size;
|
||||||
const int64_t c_pkg_end = pkg_count * pkg_size;
|
const int64_t c_pkg_end = pkg_count * pkg_size;
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user