Skip to content

Refine SVE2 Gemm32fNT zero init and Kernel6x4nt A/B order - #828

Merged
ermig1979 merged 2 commits into
devfrom
cursor/sve2-gemm32fnt-optimize-f60d
Aug 6, 2026
Merged

Refine SVE2 Gemm32fNT zero init and Kernel6x4nt A/B order#828
ermig1979 merged 2 commits into
devfrom
cursor/sve2-gemm32fnt-optimize-f60d

Conversation

@ermig1979

@ermig1979 ermig1979 commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

Further refines ARM SVE/SVE2 optimizations of SimdGemm32fNT in SimdSve2Gemm32fNT.cpp on top of #827.

Changes

  • Initialize all microkernel accumulators from const svfloat32_t zero = svdup_n_f32(0.0f);.
  • Keep kernels macro-free (explicit NEON/AVX-512-style loops).
  • Change A/B order in Kernel6x4nt: load the four B rows first, then stream A rows, using svmla(c, b, a) to cut register pressure versus holding six A vectors.

Validation

  • Native x86 Release: ./Test "-r=.." -fi=Gemm32fNT -tt=1 -ts=1 — passed.
  • aarch64 cross-build with -DSIMD_SVE2=ON: SimdSve2Gemm32fNT.cpp compiles; Simd::Sve2::Gemm32fNT linked in libSimd.so.
  • QEMU aarch64 (-cpu max,sve=on, VL=512): Gemm32fNT AutoTest passed for Base/NEON/SVE2.
Open in Web Open in Cursor 

cursoragent and others added 2 commits August 6, 2026 10:50
Initialize accumulators from const svfloat32_t zero = svdup_n_f32(0.0f).
In Kernel6x4nt, load B rows first and use svmla(c, b, a) to reduce
register pressure versus holding six A vectors.

Co-authored-by: Ihar Yermalayeu <ermig1979@gmail.com>
Reuse the existing a0 register when processing the second F-wide
chunk inside the DF unrolled loop.

Co-authored-by: Ihar Yermalayeu <ermig1979@gmail.com>
@ermig1979
ermig1979 marked this pull request as ready for review August 6, 2026 11:15
@ermig1979
ermig1979 merged commit 5b22906 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