Who is this for?

This is an introductory topic for software developers interested in learning how to use the Scalable Vector Extension 2 (SVE2) on Arm powered mobile devices running Android.

What will you learn?

Upon completion of this Learning Path, you will be able to:

  • Enable Scalable Vector Extension 2 (SVE2) support in Android Studio.
  • Implement an Android application that uses the Android Native Development Kit (NDK) to calculate the fused multiply-add (FMA).
  • Measure the performance uplift by using SVE2 intrinsics.

Prerequisites

Before starting, you will need the following:

  • A x86_64 or Apple development machine with Android Studio installed.
  • A 64-bit Arm powered smartphone running Android.
  • Knowledge of Single instruction Multi Data (SIMD)
  • Knowledge of Neon
  • Knowledge of Scalable Vector Extension (SVE)

Summary

AI-assisted

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.

Close
?
You’ll enable SVE2 in an Android Studio project with the Android NDK, then implement and benchmark a fused multiply-add operation. First, you’ll add native C++ helpers, create two FMA implementations, and time them on a 64-bit Arm Android device. Then, you’ll compare the results to validate a minimal SVE2 example and measure its performance difference.

Frequently asked questions

AI-assisted

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.

Close
?
Where do I add the SVE2 intrinsics and helper code?
Edit native-lib.cpp under app/cpp/. Add the necessary includes, helper functions, both FMA implementations with and without SVE2, and the measureExecutionTime template in that file.
How do I know SVE2 support is enabled in Android Studio?
Your project should compile SVE2 intrinsics without errors and build successfully for your target. After you rebuild, run the app to execute both code paths and obtain timing results.
What result should I expect from the two fused multiply-add (FMA) implementations?
Both FMA implementations should return the same output. The FMA implementation with SVE2 should compute the result 3 to 4 times faster than the FMA without SVE2, depending on vector length.
How many iterations should I pass to `measureExecutionTime`?
Choose a value large enough to get stable timings on your device, then keep it the same for both implementations. The function returns a duration you can compare directly between the SVE2 and non-SVE2 runs.
What should I check if the project fails to build after enabling SVE2?
Verify you edited the correct source file and included the headers listed in the steps. Then, sync and rebuild the project to apply the configuration changes.
Next