Skip to content

Improve SVE2 SynetInnerProduct16bGemmNN with svbfdot_f32 - #823

Merged
ermig1979 merged 1 commit into
devfrom
cursor/sve2-synet-innerproduct16b-gemmnn-b955
Aug 5, 2026
Merged

Improve SVE2 SynetInnerProduct16bGemmNN with svbfdot_f32#823
ermig1979 merged 1 commit into
devfrom
cursor/sve2-synet-innerproduct16b-gemmnn-b955

Conversation

@ermig1979

@ermig1979 ermig1979 commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

Improves the existing SVE2 optimization of Base::SynetInnerProduct16bGemmNN by using svbfdot_f32 for direct BF16 accumulation instead of converting BF16 to FP32 and using svmla_f32.

Changes

  • src/Simd/SimdSve2SynetInnerProduct16bGemmNN.cpp — GemmNN microkernel now loads packed BF16 K-pairs (LoadBf16x2 / BroadcastBf16x2) and accumulates with svbfdot_f32, matching the existing microK=2 B packing layout.
  • docs/2026.html — note under release 7.2.165 Improving.

Validation

  • aarch64 cross-compile of libSimd.so + Test with -DSIMD_SVE2=ON succeeded; object code contains bfdot (1080 sites in libSimd.so).
  • x86_64 Release build + ./Test "-r=.." -fi=SynetInnerProduct16b -tt=1 -ts=1 passed (Base/Sse41/Avx2/Avx512bw/AmxBf16 paths).
  • Under qemu-aarch64-static -cpu max, default SynetInnerProduct16b AutoTest passed (Base/Neon/Sve2).
  • Temporarily expanded aligned/unaligned Convert/Reorder A/B and M/N-tail cases also passed under qemu (Sve2 vs Base/Neon); test-source edits were reverted and not committed.
Open in Web Open in Cursor 

Replace BF16-to-FP32 unpack + svmla in the GemmNN microkernel with
direct BF16 accumulation via svbfdot_f32, matching the packed Kx2
layout already used for B.

Co-authored-by: Ihar Yermalayeu <ermig1979@gmail.com>
@ermig1979
ermig1979 marked this pull request as ready for review August 5, 2026 12:05
@ermig1979
ermig1979 merged commit 9dcedc9 into dev Aug 5, 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