|
| 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 | +We will now run a health check against your target. Run the following command from the terminal of your host device. |
| 12 | + |
| 13 | +If you are using your host device simultaneously as your target, use `topo health --target localhost`. |
| 14 | + |
| 15 | +```bash |
| 16 | +topo health --target user@my-target |
| 17 | +``` |
| 18 | + |
| 19 | +The output should appear similar to: |
| 20 | + |
| 21 | +```output |
| 22 | +Host |
| 23 | +---- |
| 24 | +SSH: ✅ |
| 25 | +Container Engine: ✅ |
| 26 | +
|
| 27 | +Target |
| 28 | +------ |
| 29 | +Connectivity: ✅ |
| 30 | +Container Engine: ✅ |
| 31 | +Hardware Info: ✅ |
| 32 | +``` |
| 33 | + |
| 34 | +A Topo health check confirms connectivity between the host and target, as well as the verifying the presence of dependencies such as docker. |
| 35 | + |
| 36 | +You should resolve any `❌` errors before moving on. Warnings (`⚠️`) can indicate optional capabilities you can add later. `ℹ️` provides other information. A `✅` confirms the presence of dependencies and no warnings or errors. |
| 37 | + |
| 38 | +If you are using password-based SSH, you will likely see the `❌` error below: |
| 39 | + |
| 40 | +```output |
| 41 | +Connectivity: ❌ (key-based SSH authentication is not setup) |
| 42 | + → run `topo setup-keys --target user@my-target` or manually setup SSH keys for the target |
| 43 | +``` |
| 44 | + |
| 45 | +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. |
| 46 | + |
| 47 | +## Optional: install remoteproc-runtime on heterogeneous devices |
| 48 | + |
| 49 | +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. |
| 50 | + |
| 51 | +[`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`). |
| 52 | + |
| 53 | +[`remoteproc-runtime`](https://github.com/arm/remoteproc-runtime) builds on this by adding a container-style (OCI) 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 (Open Container Initiative) defines open standards for container image formats and runtimes, ensuring compatibility across container tools. |
| 54 | + |
| 55 | +You can use Topo to install `remoteproc-runtime`. Run the following command from the host device: |
| 56 | + |
| 57 | +```bash |
| 58 | +topo install remoteproc-runtime --target user@my-target |
| 59 | +``` |
| 60 | + |
| 61 | +Run the health command again to verify installation. Topo uses `remoteproc-runtime` under the hood when deploying to heterogeneous devices. |
| 62 | + |
| 63 | +## Generate a target description |
| 64 | + |
| 65 | +In this step, you ask Topo to probe your target hardware and create a machine-readable YAML description. |
| 66 | + |
| 67 | +On your host device, run: |
| 68 | + |
| 69 | +```bash |
| 70 | +topo describe --target user@my-target |
| 71 | +``` |
| 72 | + |
| 73 | +This writes a `target-description.yaml` file in your current directory. |
| 74 | + |
| 75 | +The file captures details such as CPU architecture features, which Topo uses to select compatible templates. |
| 76 | + |
| 77 | +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: |
| 78 | + |
| 79 | +```output |
| 80 | +host: |
| 81 | + - model: Neoverse-V1 |
| 82 | + cores: 4 |
| 83 | + features: |
| 84 | + - fp |
| 85 | + - asimd |
| 86 | + - evtstrm |
| 87 | + - aes |
| 88 | + ... |
| 89 | +remoteprocs: [] |
| 90 | +totalmemory_kb: 16044280 |
| 91 | +``` |
| 92 | + |
| 93 | +## List templates compatible with your target |
| 94 | + |
| 95 | +Now that Topo understand the capabilities of your target device, it can advise on the compatibility of templates. |
| 96 | + |
| 97 | +Use the following command on your host device to to list templates according to the target description: |
| 98 | + |
| 99 | +```bash |
| 100 | +topo templates --target-description target-description.yaml |
| 101 | +``` |
| 102 | + |
| 103 | +You can also query templates directly by specifying the target: |
| 104 | + |
| 105 | +```bash |
| 106 | +topo templates --target user@my-target |
| 107 | +``` |
| 108 | + |
| 109 | +An example output for an AWS Graviton instance is shown below: |
| 110 | + |
| 111 | +```output |
| 112 | +✅ topo-welcome | https://github.com/Arm-Examples/topo-welcome.git | main |
| 113 | + A minimal "Hello, World" web app for validating a Topo setup and deployment. |
| 114 | + It runs a single service that exposes a web page on the target, |
| 115 | + with the greeting text customizable via the GREETING_NAME parameter. |
| 116 | +
|
| 117 | +❌ topo-lightbulb-moment | https://github.com/Arm-Examples/topo-lightbulb-moment.git | main |
| 118 | + Features: remoteproc-runtime |
| 119 | + Reads a switch over GPIO pins on an M class cpu, reports switch state over |
| 120 | + Remoteproc Message, then a web application on the A class reads this and |
| 121 | + displays a lightbulb in either the on or off state. The lightbulb state is |
| 122 | + described by an LLM in any user-specified style. |
| 123 | +
|
| 124 | +✅ topo-v9-cpu-chat | https://github.com/Arm-Examples/topo-v9-cpu-chat.git | main |
| 125 | + Features: SVE, NEON |
| 126 | + Complete LLM chat application optimized for Arm CPU inference. |
| 127 | +
|
| 128 | + This project demonstrates running large language models on CPU |
| 129 | + using llama.cpp compiled with Arm baseline optimizations and |
| 130 | + accelerated using NEON SIMD and SVE (when supported and enabled). |
| 131 | +
|
| 132 | + The stack includes: |
| 133 | + - llama.cpp server with Arm NEON optimizations (SVE optional) |
| 134 | + - Quantized Qwen2.5-1.5B-Instruct model bundled in the image (~1.12 GB) |
| 135 | + - Simple web-based chat interface |
| 136 | + - No GPU required - pure CPU inference |
| 137 | +
|
| 138 | + Perfect for demos and testing! The bundled Qwen2.5-1.5B model allows the |
| 139 | + project to run immediately without downloading additional models. |
| 140 | +
|
| 141 | + Ideal for testing LLM workloads on Arm hardware without GPU dependencies, |
| 142 | + showcasing how far you can push NEON acceleration. Rebuild with SVE enabled |
| 143 | + when wider vectors are available. |
| 144 | +
|
| 145 | +✅ topo-simd-visual-benchmark | https://github.com/Arm-Examples/topo-simd-visual-benchmark.git | main |
| 146 | + Features: NEON, SVE |
| 147 | + Visual demonstration of SIMD performance benefits on Arm processors. |
| 148 | + Compare scalar (no SIMD), NEON (128-bit), and SVE (scalable vector) |
| 149 | + implementations running identical image processing workloads side-by-side. |
| 150 | +
|
| 151 | + This demo shows real hardware acceleration through three C++ services |
| 152 | + compiled with different architecture flags, processing the same box blur |
| 153 | + algorithm on images. Performance differences are measured in real-time |
| 154 | + and displayed in an interactive web dashboard. |
| 155 | +
|
| 156 | + Perfect for demonstrating to non-technical audiences the concrete benefits |
| 157 | + of SIMD optimizations, with visual results and quantified speedups. |
| 158 | +``` |
| 159 | + |
| 160 | +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. |
| 161 | + |
| 162 | +## What you've learned and what's next |
| 163 | + |
| 164 | +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. |
| 165 | + |
0 commit comments