Who is this for?

This is an advanced topic for developers, performance engineers, and ML framework contributors who want to benchmark and optimize KleidiAI micro-kernels within ExecuTorch to accelerate model inference on Arm64 platforms supporting SME/SME2 instructions.

What will you learn?

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

  • Cross-compile ExecuTorch for Arm64 with XNNPACK and KleidiAI enabled, including SME/SME2 instructions
  • Build and export ExecuTorch models that can be accelerated by KleidiAI using SME/SME2 instructions
  • Use the executor_runner tool to run kernel workloads and collect ETDump profiling data.
  • Inspect and analyze ETRecord and ETDump files using the ExecuTorch Inspector API to understand kernel-level performance behavior.

Prerequisites

Before starting, you will need the following:

  • An x86_64 Linux host machine running Ubuntu, with at least 15 GB of free disk space
  • An Arm64 target system with support for SME or SME2 - see the Learning Path Devices with native SME2 support

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 cross-compile ExecuTorch with XNNPACK and KleidiAI for an aarch64 SME or SME2 system. First, you’ll create quantized fully connected and Conv2d benchmark models that can use KleidiAI, then run them with executor_runner. You’ll inspect ETRecord and ETDump traces with the ExecuTorch Inspector API to validate kernel selection and compare behavior across variants.

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
?
Do I need to keep my Python virtual environment active while building and exporting models?
Yes. Keep your virtual environment active so build and runtime dependencies install and import from the same isolated location.
What should I check on the Arm64 target before I run benchmarks?
Verify the device supports SME or SME2. Also confirm that you deploy the AArch64 ExecuTorch binaries and libraries produced by cross-compilation.
Which Conv2d variants does the guide benchmark with KleidiAI?
The guide benchmarks an INT8-quantized Conv2d variant using pqs8_qc8w_gemm. It also benchmarks a FP32 pointwise (1×1) Conv2d variant using pf32_gemm.
Which profiling files do I use with the ExecuTorch Inspector API?
Model export creates an ETRecord file alongside the .pte model. executor_runner writes an ETDump file. Use the matching files with the ExecuTorch Inspector API to analyze kernel behavior.
Which GEMM benchmark variants does the guide export?
The guide exports FP16, FP32, INT8, and INT4 linear-model variants. It also exports FP16 and FP32 matrix-multiply models for comparison.
Next