Inspect model artifacts and runtime profiles with Google Model Explorer and Arm extensions
Introduction
Understand Model Explorer and the artifacts you will inspect
Install Model Explorer and the Arm extensions
Open and inspect a Cortex-M PTE with Model Explorer
Compare portable and XNNPACK PTE files with Model Explorer
Inspect Ethos-U PTE delegation with Model Explorer
Inspect TOSA artifacts with Model Explorer
Inspect VGF artifacts with Model Explorer
Inspect ETRecord and ETDump overlays with Model Explorer
Next Steps
Inspect model artifacts and runtime profiles with Google Model Explorer and Arm extensions
Introduction
Understand Model Explorer and the artifacts you will inspect
Install Model Explorer and the Arm extensions
Open and inspect a Cortex-M PTE with Model Explorer
Compare portable and XNNPACK PTE files with Model Explorer
Inspect Ethos-U PTE delegation with Model Explorer
Inspect TOSA artifacts with Model Explorer
Inspect VGF artifacts with Model Explorer
Inspect ETRecord and ETDump overlays with Model Explorer
Next Steps
Clone the repository of example models
You’ll download the example model artifacts and install Model Explorer with the Arm extensions in a clean Python virtual environment. In the next section, you’ll confirm the installation by opening a Cortex-M .pte file.
First, clone the repository of example models that you’ll use.
Use a machine capable of displaying a browser. For example, a laptop.
The repository uses Git Large File Storage (LFS) for model artifacts. Install and configure Git LFS for your operating system:
- If you use WSL on Windows, follow the Linux commands.
- You need to run
git lfs installonly once for your user account.
sudo apt update
sudo apt install -y git-lfs
git lfs install
brew install git-lfs
git lfs install
winget install -e --id GitHub.GitLFS
git lfs install
Clone the artifacts repository, then use git lfs pull to download the model files:
git clone https://github.com/arm-education/ml-model-artifacts.git
cd ml-model-artifacts
git lfs pull
Create a virtual environment
Use a separate Python 3.10, 3.11, or 3.12 environment to avoid dependency conflicts with any ExecuTorch build, notebook, or application environment that you already use:
python3 -m venv model_explorer_env
source model_explorer_env/bin/activate
python -m pip install --upgrade pip
py -m venv model_explorer_env
.\model_explorer_env\Scripts\Activate.ps1
python -m pip install --upgrade pip
If Windows PowerShell blocks Activate.ps1, allow local activation scripts for your user account:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Install Arm extensions with TOSA and VGF adapters
Install the combined ExecuTorch extension with the separate Tensor Operator Set Architecture (TOSA) and VGF adapters:
python -m pip install executorch-extension-model-explorer tosa-adapter-model-explorer vgf-adapter-model-explorer
The ExecuTorch extension provides the PTE adapter, ETRecord adapter, and ETDump profiling data provider. The separate TOSA and VGF adapters open standalone .tosa and .vgf files.
For component development or focused debugging, install the ExecuTorch components separately as pte-adapter-model-explorer, etrecord-adapter-model-explorer, and etdump-data-provider-model-explorer. For this Learning Path, use the combined executorch-extension-model-explorer package.
What you’ve accomplished and what’s next
You’ve downloaded the example model artifacts, created a Python virtual environment, and installed Model Explorer with the combined ExecuTorch extension and separate TOSA and VGF adapters.
Next, you’ll launch Model Explorer and confirm the installation by opening and inspecting a Cortex-M .pte artifact.