Skip to content

Improve SVE2 optimizations of SimdSobelDx - #890

Merged
ermig1979 merged 1 commit into
devfrom
cursor/improve-sve2-sobel-dx-b85a
Aug 19, 2026
Merged

Improve SVE2 optimizations of SimdSobelDx#890
ermig1979 merged 1 commit into
devfrom
cursor/improve-sve2-sobel-dx-b85a

Conversation

@ermig1979

@ermig1979 ermig1979 commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Rewrite the ARM SVE2 implementation of SimdSobelDx so it is no longer slower than the NEON path.

The previous SVE2 version loaded half-width 16-bit lanes (svld1ub_s16) and processed only svcnth() pixels per iteration. The new path:

  • loads full 8-bit SVE vectors
  • uses SVE2 widening even/odd subtracts (svsublb / svsublt)
  • reorders even/odd 16-bit results with svzip1 / svzip2 and scalar stores
  • reuses per-row left/right differences across 2 and 4 output rows
  • unrolls two vectors in the inner loop
  • keeps first/last columns as scalar edge cases

docs/2026.html release 7.2.165 Improving section is updated. Test::SobelDxAutoTest extra SVE2 sizes now use svcntb().

Testing

  • Native Test -fi=SobelDx (Base / SSE4.1 / AVX2 / AVX-512BW): passed
  • Cross-compiled SVE2 vs Base under QEMU, 19008 cases each at VL=16/32/64 and neoverse-n2: all passed
Open in Web Open in Cursor 

Load full 8-bit SVE vectors and use SVE2 even/odd widening subtracts
instead of half-width svld1ub_s16, reuse row differences across 2/4
output rows, and unzip even/odd results with zip stores.

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