# [Profile the Performance of AI and ML Mobile Applications on Arm](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/profiling-ml-on-arm/)

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/profiling-ml-on-arm/)
- [Why should you profile your ML application?](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/profiling-ml-on-arm/why-profile/)
- [Profile your application with Streamline](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/profiling-ml-on-arm/app-profiling-streamline/)
- [Memory Profiling with Android Studio](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/profiling-ml-on-arm/app-profiling-android-studio/)
- [Profiling the Neural Network](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/profiling-ml-on-arm/nn-profiling-general/)
- [ML Profiling of a LiteRT model with ExecuteNetwork](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/profiling-ml-on-arm/nn-profiling-executenetwork/)
- [ML Profiling of an ExecuTorch model](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/profiling-ml-on-arm/nn-profiling-executorch/)
- [Next Steps](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/profiling-ml-on-arm/_next-steps/)

## About this Learning Path

| Skill level: | Introductory |
|--------------|--------------|
| Reading time: | 1 hr |
| Last updated: | 24 Aug 2026 |

| Author: | Ben Clark, Arm |
|---------|----------------|
| Arm IP: | [Cortex-A](https://support.arm.com/?tab=compute-ip&Product%20Type=Application%20Processors), [Mali](https://support.arm.com/?tab=compute-ip&Product%20Type=Graphics%20Processors), [Immortalis](https://support.arm.com/?tab=compute-ip&Product%20Type=Graphics%20Processors) |
| Tags: | [ML](https://learn.arm.com/tag/ml), [Android](https://learn.arm.com/tag/android), [Linux](https://learn.arm.com/tag/linux), [Android Studio](https://learn.arm.com/tag/android-studio), [LiteRT](https://learn.arm.com/tag/litert), [Hugging Face](https://learn.arm.com/tag/hugging-face) |

### Who is this for?
This is an introductory topic for software developers who want to learn how to profile the performance of Machine Learning (ML) models running on Arm devices.

### What will you learn?
Upon completion of this Learning Path, you will be able to:
- Profile the execution times of ML models on Arm devices.
- Profile ML application performance on Arm devices.
- Describe how profiling can help optimize the performance of Machine Learning applications.

### Prerequisites
Before starting, you will need the following:
- An Arm-powered Android smartphone, and a USB cable to connect to it.
- For profiling the ML inference, [Arm NN ExecuteNetwork](https://github.com/ARM-software/armnn/releases) or [ExecuTorch](https://github.com/pytorch/executorch).
- For profiling the application, [Arm Performance Studio with Streamline](https://developer.arm.com/Tools%20and%20Software/Arm%20Performance%20Studio).
- Android Studio Profiler.

### Summary
You’ll profile the performance of an ML application on an Arm-powered Android device. First, you’ll use Streamline to sample system performance metrics and view them on a timeline, then use Android Studio Profiler to investigate memory use and leaks. You’ll also use Arm NN `ExecuteNetwork` to run a LiteRT model outside your app, examine its layer timings, and identify model bottlenecks. Finally, you’ll adapt ExecuTorch profiling tools for Android.

### Frequently asked questions

<details>
<summary>How do I know Android Studio is profiling the correct app process?</summary>
Open the **Profiler** window, attach your device in **Developer Mode** with a USB cable, and select your app’s process.
</details>

<details>
<summary>What timeline scale should I use to see the example app's annotations?</summary>
Set the Streamline timeline view scale to 10 µs. The example app’s inference is fast, so this scale makes its Custom Activity Map annotations easier to see.
</details>

<details>
<summary>Why does the ExecuteNetwork command run the model twice?</summary>
Running the ExecuteNetwork command runs the model twice because of the `--iterations 2` flag. The first run includes startup costs and one-off optimizations, so a second run is useful as the more representative performance measurement. The command writes layer timings to `modelout.txt`.
</details>

<details>
<summary>How do I check whether inference is the main bottleneck?</summary>
Use Streamline annotations to mark inference, preprocessing, and postprocessing in the timeline. You can then see where your app spends time and how busy the CPU or GPU is during each part. For LiteRT with Arm NN, use `ExecuteNetwork` for layer timings. Without Arm NN, treat `ExecuteNetwork` results as indicative rather than definitive.
</details>

<details>
<summary>Can I profile a PyTorch model with ExecuTorch on Android?</summary>
Yes. ExecuTorch provides profiling tools for PyTorch models. The tools target Linux, but you can adapt the Linux instructions for Android by generating the ETDump file on your Android device and analyzing it with an ExecuTorch Inspector.
</details>
