Use the Eigen Linear Algebra Library on Arm
Introduction
About Eigen
Eigen examples
Eigen on Arm
Build and Run TensorFlow with SVE
Next Steps
Use the Eigen Linear Algebra Library on Arm
Who is this for?
This is an advanced topic for C/C++ developers who want to create high performance applications using the Eigen linear algebra library.
What will you learn?
Upon completion of this Learning Path, you will be able to:
- Describe how to use Eigen on Arm systems.
- Build TensorFlow with SVE on Arm systems.
Prerequisites
Before starting, you will need the following:
- An Arm-based computer running Linux and a recent version of a C++ compiler (Clang or GCC).
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 apply Eigen’s vectorized math on Arm by writing and running small C++ programs that exercise Neon/ASIMD and Scalable Vector Extension (SVE) code paths. You’ll implement two concrete examples: summing elements in a 100×100 matrix over multiple iterations, and performing repeated 512×512 matrix multiplications that use fused multiply-add operations. After validating the Eigen examples on an Arm Linux system, you’ll build TensorFlow with SVE enabled by following the documented build flow and required dependencies. You’ll then compile and run Eigen-based workloads and complete an SVE-capable TensorFlow build on Arm.
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.
Example 1 prints a single numeric value representing the sum of all elements. Example 2 prints one number from
C.norm(). The exact values can vary because the matrices are randomized.Yes. Edit the
N constant or the matrix sizes in the sample code, then rebuild. Larger matrices or a higher N increase runtime.The example is structured so Eigen can use FMA on CPUs that support it. You don’t need to verify FMA usage to continue. A correct run still prints a single numeric norm.
Use a recent version of GCC or Clang on Linux as listed in the prerequisites. A successful build runs and prints the expected single-number outputs without errors.
Follow the TensorFlow build-from-source flow in this path, including the SVE-related steps and required dependencies. A successful outcome completes the build and allows TensorFlow to run on your Arm system.