# Accelerate LiteRT Models on Android with KleidiAI and SME2

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/litert-sme/)
- [Explore LiteRT, XNNPACK, KleidiAI, and SME2](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/litert-sme/1-litert-kleidiai-sme2/)
- [Create LiteRT models](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/litert-sme/2-build-model/)
- [Build the LiteRT benchmark tool](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/litert-sme/3-build-tool/)
- [Benchmark the LiteRT model](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/litert-sme/4-benchmark/)
- [Next Steps](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/litert-sme/_next-steps/)

## About this Learning Path

| Skill level:     | Advanced                      |
|------------------|-------------------------------|
| Reading time:    | 45 min                        |
| Last updated:    | 19 Aug 2026                   |

| Author:          | Jiaming Guo                  |
|------------------|-------------------------------|
| Arm IP:          | [Cortex-A](https://support.arm.com/?tab=compute-ip&Product%20Type=Application%20Processors) [Cortex-X](https://developer.arm.com/Processors#q=Cortex-X) [Arm C1](https://support.arm.com/?tab=compute-ip&Product%20Type=Application%20Processors) |
| Tags:            | [ML](/tag/ml) [Android](/tag/android) [C](/tag/c) [Python](/tag/python) [SME2](/tag/sme2) |

### Who is this for?
This is an advanced topic for developers looking to leverage Arm's Scalable Matrix Extension 2 (SME2) instructions to accelerate LiteRT model inference on Android.

### What will you learn?
Upon completion of this Learning Path, you will be able to:
- Understand how KleidiAI integrates with LiteRT
- Build the LiteRT benchmark tool and enable XNNPACK and KleidiAI with SME2 support in LiteRT
- Create LiteRT models that can be accelerated by SME2 through KleidiAI
- Use the benchmark tool to evaluate and validate the SME2 acceleration performance of LiteRT models

### Prerequisites
Before starting, you will need the following:
- An Arm64 Linux development machine
- An Android device that supports Arm SME2 architecture features - see this [list of devices with SME2 support](/learning-paths/cross-platform/multiplying-matrices-with-sme2/1-get-started/#devices)

### Summary
You’ll accelerate LiteRT inference on Android with KleidiAI SME2 microkernels through XNNPACK. First, you’ll create models using supported operators and data types, then build a KleidiAI-enabled benchmark and a baseline. After verifying SME2 support, you’ll run both on the same model and compare results, including fallback behavior for unsupported operators.

### Frequently asked questions
<details>
<summary>What do I need on the Android device before running benchmarks?</summary>
Copy your LiteRT model file and two `benchmark_model` binaries to the device: one built with KleidiAI and SME2 enabled and one baseline build. Run both against the same model on the same device.
</details>

<details>
<summary>How do I check whether my Android device supports SME2?</summary>
From an `adb` shell, run `cat /proc/cpuinfo` and look for `sme2` in the `Features` line. If it is present, the CPU supports SME2.
</details>

<details>
<summary>Which LiteRT operators are accelerated by SME2 through KleidiAI?</summary>
Only the subset of KleidiAI SME2 micro-kernels integrated into XNNPACK are accelerated. Operators outside the supported data types and quantization configurations use XNNPACK’s default implementation.
</details>

<details>
<summary>What result should I expect when comparing the two benchmark binaries?</summary>
The SME2-enabled binary demonstrates performance gains for models that use supported operators and data types. Both runs should complete successfully so you can compare their reported measurements.
</details>

<details>
<summary>What should I check if I don’t see an improvement with the SME2-enabled build?</summary>
Verify the device reports SME2 support, and confirm your model uses the supported operator configurations. Also ensure you ran the SME2-enabled binary under the same conditions as the baseline.
</details>
