Skip to content

Add SVE2 optimizations of class SynetQuantizedInnerProductGemmV0 - #860

Merged
ermig1979 merged 2 commits into
devfrom
cursor/sve2-synet-quantized-inner-product-fcfe
Aug 14, 2026
Merged

Add SVE2 optimizations of class SynetQuantizedInnerProductGemmV0#860
ermig1979 merged 2 commits into
devfrom
cursor/sve2-synet-quantized-inner-product-fcfe

Conversation

@ermig1979

@ermig1979 ermig1979 commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Adds ARM/ARM64 SVE/SVE2 SIMD optimizations for SynetQuantizedInnerProductGemmV0, following the AVX512BW 12-row GemmV0 layout and existing SVE2 quantized GEMM kernels (svusdot / Madd4<false>, scalable F = svcntw()).

Changes

  • New Sve2::SynetQuantizedInnerProductGemmV0 in SimdSve2SynetQuantizedInnerProductGemmV0.cpp
  • Sve2::SynetQuantizedInnerProductInit dispatch in SimdSve2SynetQuantizedInnerProduct.cpp
  • C API dispatch via SIMD_SVE2_FUNC in SimdLib.cpp
  • Test::SynetQuantizedInnerProductForwardAutoTest covers SVE2 (full int8 range / USDOT), extra M/N/K tail shapes, and controlDiffMax=3 when overflow is disabled
  • VS2022 Sve2.vcxproj / .filters updated
  • Release notes in docs/2026.html (7.2.165)

SVE-BF16 is part of the existing SVE2 CPU feature gate (HWCAP2_SVEBF16); this kernel is int8×int8 via SVE2 USDOT rather than BF16 MMA.

Testing

Cross-compiled for aarch64 (aarch64-linux-gnu-g++, -DSIMD_SVE2=ON) and ran under qemu-user:

./Test -r=.. -fi=SynetQuantizedInnerProduct -tt=1 -mt=1 -ts=1 -wu=0
  • qemu-aarch64 -cpu max (SVE VL=512): ALL TESTS ARE FINISHED SUCCESSFULLY
  • qemu-aarch64 -cpu neoverse-n2 (SVE VL=128): ALL TESTS ARE FINISHED SUCCESSFULLY

Base vs SVE2 is an exact uint8 match with overflow-safe weights. SVE2 vs the float32 quantized control stays within controlDiffMax (2 with overflow, 3 for full int8 USDOT).

Qemu-on-x86 timings are not representative of native ARM. On VL=512 large GEMMs, SVE2 is about 2.3–4.4× vs Base and about 1.1× vs Neon.

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 14, 2026 09:21
Port the AVX512BW/NEON GemmV0 quantized inner-product kernel to ARM64
SVE/SVE2 (USDOT, 12x2 micro-kernel, scalable F), including Init dispatch,
tests, VS2022 Sve2 project files, and release notes.

Co-authored-by: igor.ermolaev <igor.ermolaev@altezza.org>
SVE2 USDOT uses the full int8 range, which can differ from the float32
quantized control by 3 on large GEMMs.

Co-authored-by: igor.ermolaev <igor.ermolaev@altezza.org>
@ermig1979
ermig1979 marked this pull request as ready for review August 14, 2026 09:44
@ermig1979
ermig1979 merged commit 7e8e555 into dev Aug 14, 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