|
| 1 | +--- |
| 2 | +title: Use Topo to assess target compatibility |
| 3 | +weight: 3 |
| 4 | + |
| 5 | +### FIXED, DO NOT MODIFY |
| 6 | +layout: learningpathall |
| 7 | +--- |
| 8 | + |
| 9 | +## Run Topo health checks |
| 10 | + |
| 11 | +### Prepare host environment |
| 12 | + |
| 13 | +Confirm that the required dependencies are available on the host by running this command in your host terminal: |
| 14 | + |
| 15 | +```bash |
| 16 | +topo health |
| 17 | +``` |
| 18 | + |
| 19 | +The output should appear similar to the following: |
| 20 | + |
| 21 | +```bash |
| 22 | +Host |
| 23 | +---- |
| 24 | +SSH: ✅ (ssh) |
| 25 | +Container Engine: ✅ (docker) |
| 26 | + |
| 27 | +Target |
| 28 | +------ |
| 29 | +ℹ️ provide --target or set TOPO_TARGET to check target health |
| 30 | +``` |
| 31 | + |
| 32 | +If Docker is missing, please use [Install Docker](https://learn.arm.com/install-guides/docker/). |
| 33 | + |
| 34 | +If SSH is missing, please use [Install SSH](https://learn.arm.com/install-guides/ssh/). |
| 35 | + |
| 36 | +## Prepare target environment |
| 37 | + |
| 38 | +Now that the host device is prepared, we will setup the target. On the host device, connect to your target with SSH. |
| 39 | + |
| 40 | +```bash |
| 41 | +ssh user@my-target |
| 42 | +``` |
| 43 | + |
| 44 | +Once connected to the target, use the following commands to verify both Docker and `lscpu` are installed: |
| 45 | + |
| 46 | +```bash |
| 47 | +docker --version |
| 48 | +lscpu |
| 49 | +``` |
| 50 | + |
| 51 | +The output should apear similar to the following: |
| 52 | + |
| 53 | +```output |
| 54 | +Docker version xx.x.x |
| 55 | +Architecture: aarch64 |
| 56 | +CPU(s): ... |
| 57 | +``` |
| 58 | + |
| 59 | +### Prepare Topo for target |
| 60 | + |
| 61 | +We will now run a health check against your target. Run the following command from the terminal of your host device. |
| 62 | + |
| 63 | +If you are using your host device simultaneously as your target, use `topo health --target localhost`. |
| 64 | + |
| 65 | +```bash |
| 66 | +topo health --target user@my-target |
| 67 | +``` |
| 68 | + |
| 69 | +The output should appear similar to the example from a heterogeneous SoC below, but will differ depending on your hardware: |
| 70 | + |
| 71 | +```output |
| 72 | +Host |
| 73 | +---- |
| 74 | +SSH: ✅ (ssh) |
| 75 | +Container Engine: ✅ (docker) |
| 76 | +
|
| 77 | +Target |
| 78 | +------ |
| 79 | +Connectivity: ✅ |
| 80 | +Container Engine: ✅ (docker) |
| 81 | +Remoteproc Runtime: ✅ (remoteproc-runtime) |
| 82 | +Remoteproc Shim: ✅ (containerd-shim-remoteproc-v1) |
| 83 | +Hardware Info: ✅ (lscpu) |
| 84 | +Subsystem Driver (remoteproc): ✅ (m33, m0) |
| 85 | +``` |
| 86 | + |
| 87 | +A Topo health check confirms connectivity between the host and target, as well as the verifying the presence of dependencies such as docker. |
| 88 | + |
| 89 | +You should resolve any `❌` errors before moving on. Warnings (⚠️) can indicate optional capabilities that may be needed in certain projects. `ℹ️` provides other information. A `✅` confirms the presence of dependencies and no warnings or errors. |
| 90 | + |
| 91 | +If you are using password-based SSH, you will likely see the `❌` error below: |
| 92 | + |
| 93 | +```output |
| 94 | +Connectivity: ❌ (key-based SSH authentication is not setup) |
| 95 | + → run `topo setup-keys --target user@my-target` or manually setup SSH keys for the target |
| 96 | +``` |
| 97 | + |
| 98 | +This is because Topo requires key-based SSH. You can use the command specified above, and Topo will setup the key-based SSH for you. Ensure that if prompted to set a passphrase, you leave it empty. Afterwards, run `topo health` again to confirm it has correctly setup the key-based authentication. |
| 99 | + |
| 100 | +## Optional: install remoteproc-runtime on heterogeneous devices |
| 101 | + |
| 102 | +If using a Cortex-A + Cortex-M device, such as the i.MX 93, you may see a `⚠️` warning if `remoteproc-runtime` is not installed on the target. |
| 103 | + |
| 104 | +[`remoteproc`](https://docs.kernel.org/staging/remoteproc.html) is a Linux kernel framework for managing remote / auxiliary processors in a heterogeneous SoC. It allows the main CPU (e.g., Cortex-A) to load firmware on to the auxiliary processors (e.g., Cortex-M), start and stop them, and to communicate with them (e.g. using [`rpmsg`](https://docs.kernel.org/staging/rpmsg.html)). |
| 105 | + |
| 106 | +[`remoteproc-runtime`](https://github.com/arm/remoteproc-runtime) builds on this by adding a container-style (OCI - Open Container Initiative) interface. This lets you package and manage firmware like container images using standard tools (e.g. Docker or containerd), even though the code runs as firmware on the Cortex-M. [OCI](https://opencontainers.org/) defines open standards for container image formats and runtimes, ensuring compatibility across container tools. |
| 107 | + |
| 108 | +You can use Topo to install `remoteproc-runtime`. Run the following command from the host device: |
| 109 | + |
| 110 | +```bash |
| 111 | +topo install remoteproc-runtime --target user@my-target |
| 112 | +``` |
| 113 | + |
| 114 | +Run the health command again to verify installation. Topo uses `remoteproc-runtime` under the hood when deploying to heterogeneous devices. |
| 115 | + |
| 116 | +## Generate a target description |
| 117 | + |
| 118 | +In this step, you ask Topo to probe your target and create a machine-readable YAML description of the hardware. |
| 119 | + |
| 120 | +On your host device, run: |
| 121 | + |
| 122 | +```bash |
| 123 | +topo describe --target user@my-target |
| 124 | +``` |
| 125 | + |
| 126 | +This writes a `target-description.yaml` file in your current directory. |
| 127 | + |
| 128 | +The file captures details such as CPU architecture features, which Topo uses to select compatible templates. |
| 129 | + |
| 130 | +Open the file and have a look. An example snippet from an AWS Graviton instance is shown below, showing the main processor and its features, an absence of any remote / auxiliary processors, and the total memory: |
| 131 | + |
| 132 | +```output |
| 133 | +host: |
| 134 | + - model: Neoverse-V1 |
| 135 | + cores: 4 |
| 136 | + features: |
| 137 | + - fp |
| 138 | + - asimd |
| 139 | + - evtstrm |
| 140 | + - aes |
| 141 | + ... |
| 142 | +remoteprocs: [] |
| 143 | +totalmemory_kb: 16044280 |
| 144 | +``` |
| 145 | + |
| 146 | +## List templates compatible with your target |
| 147 | + |
| 148 | +Now that Topo understand the capabilities of your target device, it can advise on the compatibility of templates. |
| 149 | + |
| 150 | +Use the following command on your host device to to list templates according to the target description: |
| 151 | + |
| 152 | +```bash |
| 153 | +topo templates --target-description target-description.yaml |
| 154 | +``` |
| 155 | + |
| 156 | +You can also query templates directly by specifying the target: |
| 157 | + |
| 158 | +```bash |
| 159 | +topo templates --target user@my-target |
| 160 | +``` |
| 161 | + |
| 162 | +An example output for an AWS Graviton instance is shown below: |
| 163 | + |
| 164 | +```output |
| 165 | +✅ topo-welcome | https://github.com/Arm-Examples/topo-welcome.git | main |
| 166 | + A minimal "Hello, World" web app for validating a Topo setup and deployment. |
| 167 | + It runs a single service that exposes a web page on the target, |
| 168 | + with the greeting text customizable via the GREETING_NAME parameter. |
| 169 | +
|
| 170 | +❌ topo-lightbulb-moment | https://github.com/Arm-Examples/topo-lightbulb-moment.git | main |
| 171 | + Features: remoteproc-runtime |
| 172 | + Reads a switch over GPIO pins on an M class cpu, reports switch state over |
| 173 | + Remoteproc Message, then a web application on the A class reads this and |
| 174 | + displays a lightbulb in either the on or off state. The lightbulb state is |
| 175 | + described by an LLM in any user-specified style. |
| 176 | +
|
| 177 | +✅ topo-cpu-ai-chat | https://github.com/Arm-Examples/topo-cpu-ai-chat.git | main |
| 178 | + Features: SVE, NEON |
| 179 | + Complete LLM chat application optimized for Arm CPU inference. |
| 180 | +
|
| 181 | + This project demonstrates running large language models on CPU |
| 182 | + using llama.cpp compiled with Arm baseline optimizations and |
| 183 | + accelerated using NEON SIMD and SVE (when supported and enabled). |
| 184 | +
|
| 185 | + The stack includes: |
| 186 | + - llama.cpp server with Arm NEON optimizations (SVE optional) |
| 187 | + - Quantized Qwen2.5-1.5B-Instruct model bundled in the image (~1.12 GB) |
| 188 | + - Simple web-based chat interface |
| 189 | + - No GPU required - pure CPU inference |
| 190 | +
|
| 191 | + Perfect for demos and testing! The bundled Qwen2.5-1.5B model allows the |
| 192 | + project to run immediately without downloading additional models. |
| 193 | +
|
| 194 | + Ideal for testing LLM workloads on Arm hardware without GPU dependencies, |
| 195 | + showcasing how far you can push NEON acceleration. Rebuild with SVE enabled |
| 196 | + when wider vectors are available. |
| 197 | +
|
| 198 | +✅ topo-simd-visual-benchmark | https://github.com/Arm-Examples/topo-simd-visual-benchmark.git | main |
| 199 | + Features: NEON, SVE |
| 200 | + Visual demonstration of SIMD performance benefits on Arm processors. |
| 201 | + Compare scalar (no SIMD), NEON (128-bit), and SVE (scalable vector) |
| 202 | + implementations running identical image processing workloads side-by-side. |
| 203 | +
|
| 204 | + This demo shows real hardware acceleration through three C++ services |
| 205 | + compiled with different architecture flags, processing the same box blur |
| 206 | + algorithm on images. Performance differences are measured in real-time |
| 207 | + and displayed in an interactive web dashboard. |
| 208 | +
|
| 209 | + Perfect for demonstrating to non-technical audiences the concrete benefits |
| 210 | + of SIMD optimizations, with visual results and quantified speedups. |
| 211 | +``` |
| 212 | + |
| 213 | +In the above example, `topo-lightbulb-moment` is marked as incompatible, since it requires an SoC with both a Cortex-A and a Cortex-M. The Graviton instance used contains Arm Neoverse cores only. All other templates are marked as compatible. You may see different results depending on the target hardware you use. |
| 214 | + |
| 215 | +## What you've learned and what's next |
| 216 | + |
| 217 | +You have performed a health check on your target device and generated a description of its hardware features. Topo has informed you which templates are compatible with your target. In the next step, you will choose and deploy a template containerized workload. |
| 218 | + |
0 commit comments