Compare KleidiCV Gaussian blur performance across Neon, SVE2, and SME on Android
Introduction
Set up the Android build environment
Run the standalone SME Gaussian blur example
Build and customize the Gaussian blur performance explorer
Compare Neon, SVE2, and SME performance
Next Steps
Compare KleidiCV Gaussian blur performance across Neon, SVE2, and SME on Android
Who is this for?
This is an advanced topic for C and C++ developers who want to evaluate SIMD image-processing implementations on an Arm-based Android device.
What will you learn?
Upon completion of this Learning Path, you will be able to:
- Build KleidiCV Gaussian blur examples with the Android NDK.
- Run a minimal SME Gaussian blur example on an Android device.
- Explore the performance of Neon, SVE2, and SME implementations with controlled CPU affinity.
- Interpret how kernel size and image resolution affect SME speedup.
Prerequisites
Before starting, you will need the following:
- A Ubuntu or Debian x86_64 Linux development machine with Git, CMake, Python 3, and Android Debug Bridge (
adb) installed - A 64-bit Arm Android device with SVE2 and SME support
- Basic familiarity with C++, CMake, and
adb
Summary
This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
You’ll set up an Android NDK environment, build a KleidiCV SME Gaussian blur example, and run it on a compatible 64-bit Arm Android device. Next, you’ll confirm its output, add and build a performance explorer, and use it to compare Neon, SVE2, and SME. Finally, you’ll run controlled tests with fixed CPU affinity, compare p50 latency, and see how image resolution and kernel size affect SME speedup.
Frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
After the filter runs, compare the printed pixel values with the documented sample. The 20 output rows are identical. Each row has its highest value,
40, at column 10. The 15x15 kernel spreads the original line from columns 3 through 17.Push
build/extract-android-benchmark/gaussian_blur_benchmark to /data/local/tmp/, set it executable, and run /data/local/tmp/gaussian_blur_benchmark with adb shell.Run
adb shell with taskset <mask> before the binary path. On the test device, the masks 1, 10, and 80 select CPUs 0, 4, and 7. Replace them with masks appropriate for your device.Use
--kernel to select 3, 5, 7, 9, or 15. Use --iterations to set the measurement count. The comparison loop uses --iterations 3000, and the explorer completes 100 warm-up calls before timing.Review the CSV output only after the explorer completes without an
output differs from NEON reference error. It compares SVE2 and SME output byte-for-byte with its Neon reference after warm-up and before timing each backend.