You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/cross-platform/explore-model-artifacts-with-model-explorer/1-what-is-model-explorer.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ layout: "learningpathall"
10
10
11
11
## Model Explorer and Arm extensions
12
12
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.
14
14
15
15
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.
16
16
@@ -77,15 +77,15 @@ TOSA is not inherently ExecuTorch-specific. TOSA is an intermediate representati
77
77
for workflows using the ML extensions for Vulkan
78
78
```
79
79
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.
81
81
82
82
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.
83
83
84
84
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.
85
85
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.
87
87
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.
89
89
90
90
## Terminology
91
91
@@ -104,14 +104,14 @@ The following is a glossary of different terms used in this Learning Path:
104
104
| Intermediate representation | A representation between the original model and the final target artifact. TOSA is the main intermediate representation in this Learning Path. |
105
105
| 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. |
106
106
| 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. |
109
109
| ETRecord | An ExecuTorch export-time debug artifact that preserves graph and delegate metadata for profiling attribution. |
110
110
| 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. |
111
111
112
112
## What models you will use
113
113
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 artifactsprovided purely for educational purposes:
115
115
116
116
```output
117
117
ml-model-artifacts/
@@ -146,8 +146,8 @@ ml-model-artifacts/
146
146
└── mobilenetv2_lrn_int8_ethosu.etdp
147
147
```
148
148
149
-
## What you have learned
149
+
## What you've learned and what's next
150
150
151
151
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.
152
152
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.
Copy file name to clipboardExpand all lines: content/learning-paths/cross-platform/explore-model-artifacts-with-model-explorer/2-install-and-open-pte.md
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.
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">}}
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