Skip to content

Add SVE2 optimizations for SynetQuantizedMergedConvolution Cdc/Cd/Dc - #856

Merged
ermig1979 merged 3 commits into
devfrom
cursor/sve2-synet-quantized-merged-conv-b772
Aug 13, 2026
Merged

Add SVE2 optimizations for SynetQuantizedMergedConvolution Cdc/Cd/Dc#856
ermig1979 merged 3 commits into
devfrom
cursor/sve2-synet-quantized-merged-conv-b772

Conversation

@ermig1979

@ermig1979 ermig1979 commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Add SVE/SVE2 kernels for quantized merged convolution on ARM/ARM64, covering SynetQuantizedMergedConvolutionCdc, SynetQuantizedMergedConvolutionCd, and SynetQuantizedMergedConvolutionDc.

Changes

  • SVE2 input 1x1 GEMM (Set4 + Madd4), depthwise preprocess/any/3x3 (Madd2 on packed int16 rows), output 1x1 GEMM, and residual AddInputToOutput.
  • Dispatch via SimdSynetQuantizedMergedConvolutionInit (SIMD_SVE2_FUNC before NEON).
  • Tests compare Simd::Sve2::SynetQuantizedMergedConvolutionInit with the public Init.
  • VS2022 Sve2.vcxproj / .filters entries and release 7.2.165 notes in docs/2026.html.
  • Bias/norm are passed as individual SVE vectors (sizeless types cannot be used in arrays).
  • Quantized store/add now use NearbyInt (svrintn + convert, ties to even) to match Base::NearByInt and NEON NearbyInt. The previous Round (half away from zero) caused off-by-one errors such as 1x32x56x56-192x1x1-5x2-56x1x1.

Based on dev (including NEON quantized merged convolution). Vector-length agnostic (svcntw() as miC).

AArch64 cross-compile of the new SVE2 sources and the corresponding test translation unit succeeds with -march=armv9-a+sve+sve2+i8mm+bf16. This environment is x86_64, so native SVE2 Test was not run. Please re-run ./Test "-r=.." -fi=SynetQuantizedMergedConvolution on ARM.

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 13, 2026 09:06
Implement SVE/SVE2 kernels for quantized merged convolution input GEMM,
depthwise (any/3x3), output GEMM, and residual add, and wire them into
Init, tests, VS2022 project files, and release 7.2.165 notes.

Co-authored-by: igor.ermolaev <igor.ermolaev@altezza.org>
Pass bias/norm as individual svint32_t/svfloat32_t values instead of
arrays or pointer arithmetic, which GNU C++ rejects for SVE types.

Co-authored-by: igor.ermolaev <igor.ermolaev@altezza.org>
@ermig1979
ermig1979 marked this pull request as ready for review August 13, 2026 09:16
QuntizedTerm8i and residual add used Round (half away from zero), which
disagrees with Base::NearByInt / NEON NearbyInt on ties and caused
off-by-one errors such as 1x32x56x56-192x1x1-5x2-56x1x1.

Co-authored-by: igor.ermolaev <igor.ermolaev@altezza.org>
@ermig1979
ermig1979 merged commit c48881d into dev Aug 13, 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