Skip to content

Commit 83a412b

Browse files
another pass of edits
1 parent e24a91e commit 83a412b

9 files changed

Lines changed: 240 additions & 211 deletions

File tree

content/learning-paths/cross-platform/explore-model-artifacts-with-model-explorer/1-what-is-model-explorer.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ layout: "learningpathall"
1010

1111
## Model Explorer and Arm extensions
1212

13-
[Model Explorer](https://ai.google.dev/edge/model-explorer) is an open-source, web-based graph visualizer and debugger from Google AI Edge. The visualizer provides a hierarchical view of model graphs. You can expand and collapse layers, search for nodes, inspect metadata, highlight inputs and outputs, compare models, and add overlays to graph nodes. The default version, [contained in the Model Explorer GitHub repository](https://github.com/google-ai-edge/model-explorer/) supports TFLite, TF, TFJS, MLIR, and PyTorch (Exported Program) formats.
13+
[Model Explorer](https://ai.google.dev/edge/model-explorer) is an open-source, web-based graph visualizer and debugger from Google AI Edge. The visualizer provides a hierarchical view of model graphs. You can expand and collapse layers, search for nodes, inspect metadata, highlight inputs and outputs, compare models, and add overlays to graph nodes. The default version, [contained in the Model Explorer GitHub repository](https://github.com/google-ai-edge/model-explorer/), supports TFLite, TF, TFJS, MLIR, and PyTorch (Exported Program) formats.
1414

1515
Model Explorer uses adapters and data providers to load formats beyond the built-in model types. The [ExecuTorch extension for Model Explorer](https://github.com/arm/executorch-extension-model-explorer) combines support for `.pte`, `.etrecord`, and `.etdp` files. Standalone `.tosa` and `.vgf` files use separate Tensor Operator Set Architecture (TOSA) and VGF adapters. You'll install all three packages together in the next section.
1616

@@ -77,15 +77,15 @@ TOSA is not inherently ExecuTorch-specific. TOSA is an intermediate representati
7777
for workflows using the ML extensions for Vulkan
7878
```
7979

80-
For VGF, the ExecuTorch Arm VGF backend uses the [Arm ML SDK Model Converter](https://github.com/arm/ai-ml-sdk-model-converter) to produce a VGF backend payload from TOSA. But the Arm ML SDK Model Converter can be used to convert `.tosa` files generated from a different flow, so VGF is also not specific to just ExecuTorch.
80+
For VGF, the ExecuTorch Arm VGF backend uses the [Arm ML SDK Model Converter](https://github.com/arm/ai-ml-sdk-model-converter) to produce a VGF backend payload from TOSA. But the Arm ML SDK Model Converter can be used to convert `.tosa` files generated from a different flow, so VGF is also not specific to ExecuTorch.
8181

8282
When ExecuTorch is used for VGF, a `.pte` is emitted as well. Use that VGF-backend `.pte` when you want to run through ExecuTorch. Use the standalone `.vgf` when you want to inspect or integrate the VGF artifact used with the ML extensions for Vulkan, such as in a neural graphics workflow.
8383

8484
If you've used the [Arm Neural Graphics Model Gym](https://github.com/arm/neural-graphics-model-gym), then you've been using ExecuTorch to export your neural graphics model to VGF. To learn more, see the [Fine-tune neural graphics using Model Gym](https://learn.arm.com/learning-paths/mobile-graphics-and-gaming/model-training-gym/#:~:text=Upon%20completion%20of%20this%20Learning,and%20train%20neural%20graphics%20models) Learning Path, which briefly introduces Model Explorer.
8585

86-
ETRecord and ETDump are additional ExecuTorch-specific artifacts. ETRecord is generated at export time and preserves the graph context needed for profiling attribution. ETDump is generated at runtime and records what happened when a `.pte` ran. Together, they let Model Explorer move from static inspection to runtime overlays.
86+
ETRecord and ETDump are additional ExecuTorch-specific artifacts. ETRecord is generated at export time and preserves the graph context needed for profiling attribution. ETDump is generated at runtime and records what happened when a `.pte` ran. Together, these artifacts let Model Explorer move from static inspection to runtime overlays.
8787

88-
You can connect the graph structures you saw in the `.pte`, `.tosa`, and `.vgf` sections to operator and delegate events measured during execution.
88+
You can connect the graph structures that you'll see in the `.pte`, `.tosa`, and `.vgf` sections to operator and delegate events measured during execution.
8989

9090
## Terminology
9191

@@ -104,14 +104,14 @@ The following is a glossary of different terms used in this Learning Path:
104104
| Intermediate representation | A representation between the original model and the final target artifact. TOSA is the main intermediate representation in this Learning Path. |
105105
| Delegate | A backend-specific execution path that handles supported parts of a graph. Unsupported parts can remain outside the delegate, and can run on a CPU path only when the deployed runtime includes compatible kernels. |
106106
| Kernel | The code that executes a model operator for a specific runtime or backend, such as a portable ExecuTorch kernel or a CMSIS-NN kernel. |
107-
| Flatbuffer | A compact binary serialization format. TOSA flatbuffers store TOSA graphs; `.pte` files use a FlatBuffer-based ExecuTorch program format. |
108-
| SPIR-V | Standard Portable Intermediate Representation - Vulkan. SPIR-V modules inside VGF files describe the data graph used by the ML extensions for Vulkan. |
107+
| Flatbuffer | A compact binary serialization format. TOSA flatbuffers store TOSA graphs, and `.pte` files use a FlatBuffer-based ExecuTorch program format. |
108+
| SPIR-V | Standard Portable Intermediate Representation - Vulkan (SPIR-V) modules inside VGF files describe the data graph used by the ML extensions for Vulkan. |
109109
| ETRecord | An ExecuTorch export-time debug artifact that preserves graph and delegate metadata for profiling attribution. |
110110
| ETDump | An ExecuTorch runtime trace artifact that can record operator, delegate, backend, timing, and cycle-count events from execution. The first Model Explorer overlay used in this Learning Path focuses on timing data. |
111111

112112
## What models you will use
113113

114-
The hands-on sections will use a variety of pre-provided model artifacts. These are provided purely for educational purposes.
114+
You'll use the following pre-provided model artifacts provided purely for educational purposes:
115115

116116
```output
117117
ml-model-artifacts/
@@ -146,8 +146,8 @@ ml-model-artifacts/
146146
└── mobilenetv2_lrn_int8_ethosu.etdp
147147
```
148148

149-
## What you have learned
149+
## What you've learned and what's next
150150

151151
You've now learned how the combined ExecuTorch extension and the separate TOSA and VGF adapters add artifact formats to Model Explorer. You've also seen how `.pte`, `.tosa`, `.vgf`, `.etrecord`, and `.etdp` files support Cortex-A, Cortex-M, Ethos-U, the ML extensions for Vulkan, and ExecuTorch profiling workflows.
152152

153-
Next, you'll install Model Explorer and the Arm extensions, then open the first `.pte` artifact.
153+
Next, you'll install Model Explorer and the Arm extensions.

content/learning-paths/cross-platform/explore-model-artifacts-with-model-explorer/2-install-and-open-pte.md

Lines changed: 0 additions & 165 deletions
This file was deleted.
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
title: Install Model Explorer and the Arm extensions
3+
description: Download pre-generated model artifacts and install Model Explorer with Arm extensions in a Python virtual environment.
4+
5+
weight: 3
6+
7+
### FIXED, DO NOT MODIFY
8+
layout: "learningpathall"
9+
---
10+
11+
## Clone the repository of example models
12+
13+
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.
14+
15+
First, clone the repository of example models that you'll use.
16+
17+
Use a machine capable of displaying a browser. For example, a laptop.
18+
19+
The repository uses Git Large File Storage (LFS) for model artifacts. Install and configure Git LFS for your operating system:
20+
21+
{{% notice Note %}}
22+
- If you use WSL on Windows, follow the Linux commands.
23+
- You need to run `git lfs install` only once for your user account.
24+
{{% /notice %}}
25+
26+
{{< tabpane code=true >}}
27+
{{< tab header="Linux" language="bash">}}
28+
sudo apt update
29+
sudo apt install -y git-lfs
30+
git lfs install
31+
{{< /tab >}}
32+
{{< tab header="macOS" language="bash">}}
33+
brew install git-lfs
34+
git lfs install
35+
{{< /tab >}}
36+
{{< tab header="Windows PowerShell" language="powershell">}}
37+
winget install -e --id GitHub.GitLFS
38+
git lfs install
39+
{{< /tab >}}
40+
{{< /tabpane >}}
41+
42+
Clone the artifacts repository, then use `git lfs pull` to download the model files:
43+
44+
```bash
45+
git clone https://github.com/arm-education/ml-model-artifacts.git
46+
cd ml-model-artifacts
47+
git lfs pull
48+
```
49+
50+
## Create a virtual environment
51+
52+
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:
53+
54+
{{< tabpane code=true >}}
55+
{{< tab header="Linux or macOS" language="bash">}}
56+
python3 -m venv model_explorer_env
57+
source model_explorer_env/bin/activate
58+
python -m pip install --upgrade pip
59+
{{< /tab >}}
60+
{{< tab header="Windows PowerShell" language="powershell">}}
61+
py -m venv model_explorer_env
62+
.\model_explorer_env\Scripts\Activate.ps1
63+
python -m pip install --upgrade pip
64+
{{< /tab >}}
65+
{{< /tabpane >}}
66+
67+
{{% notice Note %}}
68+
If Windows PowerShell blocks `Activate.ps1`, allow local activation scripts for your user account:
69+
70+
```powershell
71+
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
72+
```
73+
{{% /notice %}}
74+
75+
## Install Arm extensions with TOSA and VGF adapters
76+
77+
Install the combined ExecuTorch extension with the separate Tensor Operator Set Architecture (TOSA) and VGF adapters:
78+
79+
```bash
80+
python -m pip install executorch-extension-model-explorer tosa-adapter-model-explorer vgf-adapter-model-explorer
81+
```
82+
83+
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.
84+
85+
{{% notice Note %}}
86+
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.
87+
{{% /notice %}}
88+
89+
## What you've accomplished and what's next
90+
91+
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.
92+
93+
Next, you'll launch Model Explorer and confirm the installation by opening and inspecting a Cortex-M `.pte` artifact.

0 commit comments

Comments
 (0)