The ExecuTorch project introduces an advanced benchmarking infrastructure designed to measure the performance of models on Android and iOS devices. It supports various backend delegates and devices, enabling reproducible performance measurements and facilitating collaborative efforts in performance tuning and debugging. This infrastructure is built on top of the Nova reusable mobile workflow powered by PyTorch test-infra.
Multiple Models: Supports a variety of ExecuTorch-enabled models such as MobileNetV2 etc. Integration with compatible Hugging Face models is coming soon.
Device Support: Includes popular phones like latest Apple iPhone, Google Pixel, and Samsung Galaxy, etc.
Backend Delegates: Supports XNNPACK, Apple CoreML and MPS, Qualcomm QNN, and more in the near future.
Benchmark Apps: Generic apps that support both GenAI and non-GenAI models, capable of measuring performance offline. Android App | iOS App. Popular Android and iOS profilers with in-depth performance analysis will be integrated with these apps in the future.
Performance Monitoring: Stores results in a database with a dashboard for tracking performance and detecting regressions.
Disclaimer: The infrastructure is new and experimental. We're working on improving its accessibility and stability over time.
The ExecuTorch Benchmark Dashboard tracks performance metrics for various models across different backend delegates and devices. It enables users to compare metrics, monitor trends, and identify optimizations or regressions in Executorch. The dashboard is accessible at ExecuTorch Benchmark Dashboard.
Comprehensive Comparisons:
Metrics Tracking:
Visualizations:
The benchmarking infrastructure currently supports two major use-cases:
On-Demand Model Benchmarking: Users can trigger benchmarking requests via GitHub Actions workflow dispatch UI. This feature will help backend developers collaborate with the ExecuTorch team to debug performance issues and advance state-of-the-art (SOTA) performance.
Automated Nightly Batched Benchmarking: The infrastructure performs automated nightly benchmarking to track and monitor performance over time. This allows for consistent performance monitoring and regression detection.
Users can schedule a benchmarking workflow on a pull request through GitHub Actions using the workflow dispatch UI. Follow the steps below to trigger benchmarking:
pytorch/executorch repository on GitHub and navigate to the “Actions” tab.android-perf or apple-perf workflow from the list of workflows.Note: Write permission to the repo will be needed in order to run the on-demand workflow.
The easiest way to view benchmark results is on the dashboard, while raw results for individual configurations can be manually accessed by downloading the Customer_Artifacts.zip from the CI.
We encourage users to share feedback or report any issues while using the infra. Please submit your feedback via GitHub Issues.