Skip to content

Improve SVE2 optimizations of Gemm32fNN - #830

Merged
ermig1979 merged 1 commit into
devfrom
cursor/improve-sve2-gemm32fnn-30fe
Aug 6, 2026
Merged

Improve SVE2 optimizations of Gemm32fNN#830
ermig1979 merged 1 commit into
devfrom
cursor/improve-sve2-gemm32fnn-30fe

Conversation

@ermig1979

@ermig1979 ermig1979 commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

Improves ARM SVE/SVE2 optimizations of SimdGemm32fNN in SimdSve2Gemm32fNN.cpp and documents the change under release 7.2.165.

Changes

  • Remove SIMD_SVE2_GEMM_* macros; expand microkernels to explicit code matching the NEON/AVX-512BW / Gemm32fNT style.
  • Use unpredicated svmla_f32_x on full-vector N panels; keep masked svmla_f32_m only for the N remainder.
  • Add dedicated 1/2/3/4-panel kernels for M = 1..6 (hot path Kernel6x4nn loads B first, then streams A rows).
  • Add L1/L2/L3 cache blocking around the microkernels.
  • Update docs/2026.html (release 7.2.165 Algorithms → Improving).

Validation

  • Native x86 Release: ./Test "-r=.." -fi=Gemm32fNN -tt=1 -ts=1 — passed.
  • aarch64 cross-build with -DSIMD_SVE2=ON: Simd::Sve2::Gemm32fNN linked in libSimd.so.
  • QEMU aarch64 (-cpu max,sve=on, VL=512): Gemm32fNN AutoTest passed for Base/NEON/SVE2.
  • Additional odd M/N shapes (remainder panels) passed under QEMU at SVE VL=128/256/512.
Open in Web Open in Cursor 

Rewrite SimdSve2Gemm32fNN microkernels in explicit NEON/AVX-512BW style:
remove SIMD_SVE2_GEMM_* macros, use unpredicated svmla_f32_x on full
vector panels, add 1/2/3/4-panel N kernels, B-first FMLA order for the
6-row kernels, and L1/L2/L3 cache blocking. Document under release 7.2.165.

Co-authored-by: Ihar Yermalayeu <ermig1979@gmail.com>
@ermig1979
ermig1979 marked this pull request as ready for review August 6, 2026 14:09
@ermig1979
ermig1979 merged commit df402b7 into dev Aug 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants