Skip to content

Improve SVE2 optimizations of Gemm32fNT - #827

Merged
ermig1979 merged 1 commit into
devfrom
cursor/sve2-gemm32fnt-c215
Aug 6, 2026
Merged

Improve SVE2 optimizations of Gemm32fNT#827
ermig1979 merged 1 commit into
devfrom
cursor/sve2-gemm32fnt-c215

Conversation

@ermig1979

@ermig1979 ermig1979 commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

Improves ARM SVE/SVE2 optimizations of SimdGemm32fNT in SimdSve2Gemm32fNT.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 style.
  • Use unpredicated svmla_f32_x in full-vector body loops instead of always-predicated svmla_f32_m.
  • Add dual accumulators for smaller kernels (1xN / 2x1 / 3x1) to hide FMLA latency across DF unrolling.
  • Fix remainder handling: process a full F-wide chunk after the DF loop before the masked tail (previously a single masked step could drop lanes when remaining K was in (F, 2F)).
  • Add Add4ExtractedSums helper for 4-column kernels.
  • Update docs/2026.html (release 7.2.165 Algorithms → Improving).

Validation

  • Native x86 Release: ./Test "-r=.." -fi=Gemm32fNT -tt=1 -ts=1 — passed.
  • aarch64 cross-build with -DSIMD_SVE2=ON: Simd::Sve2::Gemm32fNT linked in libSimd.so.
  • QEMU aarch64 (-cpu max,sve=on, VL=512): Gemm32fNT AutoTest passed for Base/NEON/SVE2, including odd-K shapes that exercise the remainder path.
Open in Web Open in Cursor 

Rewrite Gemm32fNT microkernels with explicit NEON/AVX512-style code,
unpredicated svmla_f32_x in the main loops, dual accumulators where
register pressure allows, and a correct F-sized remainder before the
masked tail. Document the change 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 09:55
@ermig1979
ermig1979 merged commit eca1414 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