Improve SVE2 SynetInnerProduct16bGemmNN with svbfdot_f32 - #823
Merged
Conversation
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
marked this pull request as ready for review
August 5, 2026 12:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improves the existing SVE2 optimization of
Base::SynetInnerProduct16bGemmNNby usingsvbfdot_f32for direct BF16 accumulation instead of converting BF16 to FP32 and usingsvmla_f32.Changes
src/Simd/SimdSve2SynetInnerProduct16bGemmNN.cpp— GemmNN microkernel now loads packed BF16 K-pairs (LoadBf16x2/BroadcastBf16x2) and accumulates withsvbfdot_f32, matching the existing microK=2 B packing layout.docs/2026.html— note under release 7.2.165 Improving.Validation
libSimd.so+Testwith-DSIMD_SVE2=ONsucceeded; object code containsbfdot(1080 sites inlibSimd.so)../Test "-r=.." -fi=SynetInnerProduct16b -tt=1 -ts=1passed (Base/Sse41/Avx2/Avx512bw/AmxBf16 paths).qemu-aarch64-static -cpu max, defaultSynetInnerProduct16bAutoTest passed (Base/Neon/Sve2).