Skip to content

Commit 5e1c40b

Browse files
committed
Update Topo NPU deployment
1 parent 6b332d3 commit 5e1c40b

5 files changed

Lines changed: 69 additions & 66 deletions

File tree

content/learning-paths/embedded-and-microcontrollers/deploy-ml-model-to-npu-with-topo/_index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ who_is_this_for: This is an introductory topic for embedded/edge software develo
99

1010
learning_objectives:
1111
- Explain how Topo deploys an application that spans Cortex-A, Cortex-M, and Ethos-U
12-
- Deploy the topo-imx93-npu-deployment Template, which operates across Cortex-A, Cortex-M, and Ethos-U, to perform image classification using an ExecuTorch MobileNetV2 model
13-
- Describe how the Template is bootstrapped from Compose services, Remoteproc Runtime metadata, and Topo arguments and follow this process yourself
14-
- Understand how to take similar projects and create Topo Templates, including using Agent Skills
12+
- Deploy the topo-imx93-npu-deployment Topo Project, which operates across Cortex-A, Cortex-M, and Ethos-U, to perform image classification using an ExecuTorch MobileNetV2 model
13+
- Describe how the project is bootstrapped from Compose services, Remoteproc Runtime metadata, and Topo parameters and follow this process yourself
14+
- Understand how to take similar projects and create Topo Projects, including using Agent Skills
1515

1616
prerequisites:
1717
- A host machine (x86 or Arm) with Linux, macOS, or Windows
@@ -40,7 +40,7 @@ generated_summary_faq:
4040
faq_source_hash: 6469ed1daadf6dd4fe5436b42234282d32e14c97f772447009eabda8350f130b
4141
summary: >-
4242
You'll build and deploy a heterogeneous image classification
43-
application to an NXP FRDM i.MX 93 board using Topo. First, you'll assemble a Topo Template from two
43+
application to an NXP FRDM i.MX 93 board using Topo. First, you'll assemble a Topo Project from two
4444
base projects: a Cortex-A web application and a Cortex-M33 ExecuTorch runner, then convert
4545
the combined sources into a Compose project with Topo metadata and Remoteproc Runtime services.
4646
The application preprocesses images on Cortex-A, shares model and tensor data through shared
@@ -58,17 +58,17 @@ generated_summary_faq:
5858
The Cortex-A side runs the web application that prepares images, writes model and tensor
5959
data into shared memory, and sends inference commands. The Cortex-M33 runs the ExecuTorch
6060
firmware and receives commands over RPMsg.
61-
- question: What should I expect after deploying the Topo Template?
61+
- question: What should I expect after deploying the Topo Project?
6262
answer: >-
6363
Topo builds images on the host, transfers them to the target, and starts services on the
6464
board. Remoteproc Runtime starts the Cortex-M firmware, and the browser-based MobileNetV2
6565
classifier becomes available.
66-
- question: What are the key steps to turn the two base projects into a Topo Template?
66+
- question: What are the key steps to turn the two base projects into a Topo Project?
6767
answer: >-
6868
Combine the Cortex-A web app and the Cortex-M33 ExecuTorch firmware sources into a single
6969
repository, make it a normal Compose project, then add Topo metadata and Remoteproc Runtime
70-
services. The Template is bootstrapped from Compose services, Remoteproc Runtime metadata,
71-
and Topo arguments.
70+
services. The Topo Project is bootstrapped from Compose services, Remoteproc Runtime metadata,
71+
and Topo parameters.
7272
- question: What should I check if `topo health` reports a failure?
7373
answer: >-
7474
Resolve the specific errors shown by `topo health` before continuing. Confirm SSH access to
@@ -106,8 +106,8 @@ further_reading:
106106
link: https://github.com/arm/topo
107107
type: documentation
108108
- resource:
109-
title: Topo template format
110-
link: https://github.com/arm/topo-template-format
109+
title: Topo Project specification
110+
link: https://github.com/arm/topo/tree/main/docs/project-specification
111111
type: documentation
112112
- resource:
113113
title: Topo releases

content/learning-paths/embedded-and-microcontrollers/deploy-ml-model-to-npu-with-topo/build-the-template.md renamed to content/learning-paths/embedded-and-microcontrollers/deploy-ml-model-to-npu-with-topo/build-the-project.md

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
2-
title: Build the Topo Template from scratch
3-
description: Create a Topo Template from the web application and Cortex-M33 firmware sources by adding Compose services, build artifacts, remoteproc-runtime metadata, and Topo arguments.
2+
title: Build the Topo Project from scratch
3+
description: Create a Topo Project from the web application and Cortex-M33 firmware sources by adding Compose services, build artifacts, remoteproc-runtime metadata, and Topo parameters.
4+
aliases:
5+
- /learning-paths/embedded-and-microcontrollers/deploy-ml-model-to-npu-with-topo/build-the-template/
46
weight: 4
57

68
### FIXED, DO NOT MODIFY
@@ -9,7 +11,7 @@ layout: learningpathall
911

1012
## What you will build
1113

12-
In this section, you'll build the `topo-imx93-npu-deployment` Topo Template starting from two non-Topo, non-Compose projects:
14+
In this section, you'll build the `topo-imx93-npu-deployment` Topo Project starting from two non-Topo, non-Compose projects:
1315

1416
- a Cortex-A web application that prepares images, writes model and tensor data into shared memory, and sends inference commands over `RPMsg`
1517
- a Cortex-M33 ExecuTorch runner firmware project for the FRDM i.MX 93
@@ -18,12 +20,12 @@ You'll combine those sources into one repository, then make the repository a nor
1820

1921
## Create the repository from the base projects
2022

21-
Start by copying the original base projects from the Topo Template.
23+
Start by copying the original base projects from the Topo Project.
2224

23-
Clone the Topo Template Format repository for the validation schema, clone the original Topo Template for the source files, and start a new empty repository:
25+
Clone the Topo repository for the Topo Project specification and validation schema, clone the original Topo Project for the source files, and start a new empty repository:
2426

2527
```bash
26-
git clone https://github.com/arm/topo-template-format.git
28+
git clone https://github.com/arm/topo.git
2729
git clone https://github.com/Arm-Examples/topo-imx93-npu-deployment.git
2830
mkdir new-topo-npu-template
2931
cd new-topo-npu-template
@@ -58,16 +60,16 @@ cp -R ../topo-imx93-npu-deployment/licenses .
5860
cp ../topo-imx93-npu-deployment/.gitignore .
5961
```
6062

61-
You have two sets of source code combined into one repository. It's not a Compose project and it's not a Topo Template.
63+
You have two sets of source code combined into one repository. It's not a Compose project and it's not a Topo Project.
6264

63-
You'll now create a Compose project and Topo Template around the source code.
65+
You'll now create a Compose project and Topo Project around the source code.
6466

65-
The Compose project provides the container build and runtime structure. A Dockerfile describes how to build one image. A Compose file describes the services that use those images, their build contexts, ports, volumes, dependencies, and runtime settings. In this Template:
67+
The Compose project provides the container build and runtime structure. A Dockerfile describes how to build one image. A Compose file describes the services that use those images, their build contexts, ports, volumes, dependencies, and runtime settings. In this Topo Project:
6668

6769
- `webapp/Dockerfile` builds the Flask image.
6870
- `webapp/compose.yaml` keeps the web app's build context and Linux runtime settings close to the web app source.
6971
- `executorch-runner/Dockerfile` builds the ExecuTorch `.pte` model and Cortex-M33 runner ELF through multi-stage Docker builds.
70-
- the root `compose.yaml` is the Topo Template entry point. It combines the web app, artifact build services, the Remoteproc Runtime service, and the root-level `x-topo` metadata.
72+
- the root `compose.yaml` is the Topo Project entry point. It combines the web app, artifact build services, the Remoteproc Runtime service, and the root-level `x-topo` metadata.
7173

7274
For a general introduction to Compose projects, services, and the `compose.yaml` file, see Docker's [How Compose works](https://docs.docker.com/compose/intro/compose-application-model/) documentation.
7375

@@ -304,7 +306,7 @@ x-topo:
304306
description: "Runs a Cortex-A web application that sends image inference commands to a resident CM33 ExecuTorch runner over RPMsg."
305307
features:
306308
- "remoteproc-runtime"
307-
args:
309+
parameters:
308310
EXECUTORCH_BASE_CACHE_IMAGE:
309311
description: Optional GHCR image used as a BuildKit cache source for the ExecuTorch PTE build.
310312
required: false
@@ -315,9 +317,9 @@ x-topo:
315317
default: ghcr.io/arm-examples/topo-imx93-npu-deployment/imx93-runner-build:mcux-v25.09.00-armgcc14.2-ubuntu24.04
316318
```
317319

318-
The `features` value tells Topo that this template requires `remoteproc-runtime` support on the target. This is useful when checking for project compatibility with the `topo templates --target <target>` command.
320+
The `features` value tells Topo that this project requires `remoteproc-runtime` support on the target. This is useful when checking for project compatibility with the `topo projects --target <target>` command.
319321

320-
The `args` entries describe configurable build inputs. Compose consumes those values through the `cache_from` interpolation that you added earlier:
322+
The `parameters` entries describe configurable build inputs. Compose consumes those values through the `cache_from` interpolation that you added earlier:
321323

322324
```output
323325
cache_from:
@@ -326,44 +328,45 @@ cache_from:
326328

327329
The root `webapp.build.args` block also makes the Topo-provided values visible in the Compose build model while preserving the `webapp/` build context inherited through `extends`.
328330

329-
Keep runtime settings such as `WEBAPP_PORT` as normal Compose interpolation unless you intentionally want Topo to collect them as Topo Template setup arguments.
331+
Keep runtime settings such as `WEBAPP_PORT` as normal Compose interpolation unless you intentionally want Topo to collect them as Topo Project setup arguments.
330332

331333
## (Optional) Use an Agent Skill to add the Topo metadata
332334

333-
The [Topo Template Format](https://github.com/arm/topo-template-format) repository includes public authoring skills for agents that support skill installation:
335+
[Topo](https://github.com/arm/topo) currently provides the following skills:
334336

335-
- `topo-template-context`: provides Topo and Topo Template reference context for `x-topo` metadata, schema, docs, and CLI template behavior.
336-
- `topo-template-bootstrap`: converts a Compose repository into a Topo Template by adding or improving `compose.yaml` and `x-topo` metadata.
337-
- `topo-template-lint`: reviews a Topo Template for schema correctness, metadata consistency, deployment success messages, and build argument wiring.
337+
- `topo-project-context`: provides Topo and Topo Project reference context for questions about x-topo metadata, schema, docs, and CLI project behavior.
338+
- `topo-project-bootstrap`: converts a repository into a Topo Project by adding or improving `compose.yaml` and `x-topo` metadata.
339+
- `topo-project-lint`: reviews an existing Topo Project for correctness, consistency, and authoring best practices.
340+
- `topo-project-optimize-deployment`: optimizes feedback loop by measuring and applying the highest-leverage Docker build improvement.
338341

339342
Install the skills with `npx skills`:
340343

341344
```bash
342-
npx skills add arm/topo-template-format
345+
npx skills add arm/topo
343346
```
344347

345-
If your agent doesn't use `npx skills`, manually copy or symlink the directories under `../topo-template-format/skills/` into your agent's skills directory.
348+
If your agent doesn't use `npx skills`, manually copy or symlink the skill directories from Topo into your agent's skills directory.
346349

347350
Restart your agent after installing or updating the skills.
348351

349-
From the root of the Compose project, ask your agent to use `topo-template-bootstrap`:
352+
From the root of the Compose project, ask your agent to use `topo-project-bootstrap`:
350353

351354
```
352-
Use topo-template-bootstrap on this repository.
353-
Treat the root compose.yaml as the Template root.
355+
Use topo-project-bootstrap on this repository.
356+
Treat the root compose.yaml as the project root.
354357
Preserve plain docker compose behavior.
355358
Add x-topo metadata only where it reflects the actual services, hardware requirements, and build arguments.
356359
```
357360

358-
After bootstrap, ask the agent to use `topo-template-lint`:
361+
After bootstrap, ask the agent to use `topo-project-lint`:
359362

360363
```
361-
Use topo-template-lint on this repository.
362-
Validate compose.yaml against the Topo Template Format schema.
363-
Check README alignment, Remoteproc Runtime metadata, and x-topo.args wiring.
364+
Use topo-project-lint on this repository.
365+
Validate compose.yaml against the Topo Project specification schema.
366+
Check README alignment, Remoteproc Runtime metadata, and x-topo.parameters wiring.
364367
```
365368

366-
## Validate the final Topo Template
369+
## Validate the final Topo Project
367370

368371
Check the Compose model and check that the Topo metadata is present:
369372

@@ -392,11 +395,11 @@ export PATH="$HOME/.local/bin:$PATH"
392395
{{< /tab >}}
393396
{{< /tabpane >}}
394397

395-
Validate the root Compose file with the schema in the Topo Template Format:
398+
Validate the root Compose file with the schema in the Topo Project specification:
396399

397400
```bash
398401
check-jsonschema \
399-
--schemafile ../topo-template-format/schema/topo-template-format.json \
402+
--schemafile ../topo/docs/project-specification/schema/topo-project-specification.json \
400403
compose.yaml
401404
```
402405

@@ -410,10 +413,10 @@ Review these points:
410413
- `cm33-runner` has `remoteproc.name: imx-rproc`.
411414
- `webapp` depends on `cm33-runner`.
412415
- `webapp` imports the `.pte` file through `additional_contexts`.
413-
- every `x-topo.args` entry is consumed by Compose interpolation.
416+
- every `x-topo.parameters` entry is consumed by Compose interpolation.
414417

415418
## What you've accomplished and what's next
416419

417-
You started with two non-Topo, non-Compose projects, made them a standard Compose project, and then converted that Compose project into a Topo Template. You created the web app image, added artifact builds for the ExecuTorch `.pte` model and Cortex-M33 ELF, packaged the firmware as a Remoteproc Runtime service, and exposed the build cache inputs as Topo arguments.
420+
You started with two non-Topo, non-Compose projects, made them a standard Compose project, and then converted that Compose project into a Topo Project. You created the web app image, added artifact builds for the ExecuTorch `.pte` model and Cortex-M33 ELF, packaged the firmware as a Remoteproc Runtime service, and exposed the build cache inputs as Topo parameters.
418421

419-
Next, you'll prepare the FRDM i.MX 93 target, deploy the template with Topo, and run the image classification application.
422+
Next, you'll prepare the FRDM i.MX 93 target, deploy the project with Topo, and run the image classification application.

content/learning-paths/embedded-and-microcontrollers/deploy-ml-model-to-npu-with-topo/deploy.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Clone and deploy the application with Topo
3-
description: Prepare the NXP FRDM i.MX 93 target, deploy the image classification Topo Template, and validate MobileNetV2 inference through the browser application.
3+
description: Prepare the NXP FRDM i.MX 93 target, deploy the image classification Topo Project, and validate MobileNetV2 inference through the browser application.
44
weight: 5
55

66
### FIXED, DO NOT MODIFY
@@ -9,7 +9,7 @@ layout: learningpathall
99

1010
## Prepare the target
1111

12-
Before deploying the Topo Template, confirm that the FRDM i.MX 93 board is reachable from your host and that it's ready for deployment:
12+
Before deploying the Topo Project, confirm that the FRDM i.MX 93 board is reachable from your host and that it's ready for deployment:
1313

1414
```bash
1515
topo health --target <user>@<target-ip>
@@ -135,7 +135,7 @@ topo health --target <user>@<target-ip>
135135

136136
## Deploy to the board
137137

138-
You can choose to deploy from the original Topo Template, or from the template you built from scratch. If you haven't already cloned the original template, clone it now:
138+
You can choose to deploy from the original Topo Project, or from the project you built from scratch. If you haven't already cloned the original project, clone it now:
139139

140140
```bash
141141
topo clone https://github.com/Arm-Examples/topo-imx93-npu-deployment.git
@@ -225,6 +225,6 @@ Try this out with an image from an ImageNet-supported class.
225225

226226
## What you've accomplished
227227

228-
You've prepared an FRDM i.MX 93 board for shared-memory NPU inference, deployed the `topo-imx93-npu-deployment` template with Topo, and started Cortex-M33 firmware through `remoteproc-runtime`. You used a browser-based application to stage the ExecuTorch `.pte` program and input tensor for MobileNetV2 classification with Ethos-U65 acceleration.
228+
You've prepared an FRDM i.MX 93 board for shared-memory NPU inference, deployed the `topo-imx93-npu-deployment` Topo Project with Topo, and started Cortex-M33 firmware through `remoteproc-runtime`. You used a browser-based application to stage the ExecuTorch `.pte` program and input tensor for MobileNetV2 classification with Ethos-U65 acceleration.
229229

230230
You can now use the deployed application as a reference for your own heterogeneous Arm applications, or adapt the model, firmware runner, web interface, or Topo metadata for another target.

0 commit comments

Comments
 (0)