Add SVE2 BackgroundAdjustRange optimization - #371
Merged
Conversation
Co-authored-by: Ihar Yermalayeu <ermig1979@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an ARM SVE2-optimized implementation of SimdBackgroundAdjustRange, wires it into the runtime dispatch layer, extends the existing background auto-tests to exercise the new SVE2 path, and documents the optimization in the 2026 release notes.
Changes:
- Implement
Simd::Sve2::BackgroundAdjustRangeusing SVE2 intrinsics and proper tail handling. - Add SVE2 dispatch for
SimdBackgroundAdjustRangein the public C API entry point. - Extend background auto-tests and 2026 release notes to include the new SVE2 optimization.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Test/TestBackground.cpp | Adds SVE2 coverage to the BackgroundAdjustRange auto-test dispatch. |
| src/Simd/SimdSve2Background.cpp | Introduces the SVE2 vectorized BackgroundAdjustRange implementation. |
| src/Simd/SimdSve2.h | Declares the new SVE2 BackgroundAdjustRange API. |
| src/Simd/SimdLib.cpp | Adds runtime dispatch to route SimdBackgroundAdjustRange to SVE2 when available. |
| docs/2026.html | Documents the new SVE2 optimization in 2026 release notes. |
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
SimdBackgroundAdjustRange.Testing
cmake ./prj/cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DSIMD_TOOLCHAIN="g++" -DSIMD_TARGET="" -DSIMD_AVX512VNNI=ON -DSIMD_AMXBF16=ON -DSIMD_TEST_FLAGS="-march=native" -DSIMD_SHARED=ONcmake --build build --parallel$(nproc)export LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" && ./Test "-r=.." -fi=BackgroundAdjustRange -tt=1 -ts=1aarch64-linux-gnu-g++ -march=armv9-a+sve2 -msve-vector-bits=scalable -std=c++11 -I src -c src/Simd/SimdSve2Background.cpp -o /tmp/SimdSve2Background.oaarch64-linux-gnu-g++ -march=armv9-a+sve2 -msve-vector-bits=scalable -std=c++11 -I src -c src/Test/TestBackground.cpp -o /tmp/TestBackground.ogit diff --check