9. Deployment
A Tiny ML ModelZoo run produces a compiled model library (mod.a), the model header
(tvmgen_default.h), the feature-extraction configuration (user_input_config.h) and
golden vectors (test_vector.c). Deploying means dropping these four files into a
ready-made example from the device SDK and confirming on the board that the model gives the same
answer as on your PC.
Note
Deployment in 1.5.0 is based on the SDK examples in tinyml-sdk (C2000Ware,
F29H85x SDK, MSPM33 SDK, AM13 MCU-SDK, AM26x MCU-PLUS-SDK). The 1.4.0 flow of writing your
own main.c around mod_inference() and extract_features() is gone; the SDK
examples already contain the application, the feature-extraction library calls and the
test harness.
9.1. Start Here
The 4 files, which SDK and example to pick, and the expected “All tests have passed.” output.
Importing, building, flashing and debugging the example in Code Composer Studio.
What changes for F28P55, MSPM0G5187 and AM13E2 (NPU initialization, memory, debugging).
CPU-only devices: C28x, F29H85, MSPM0G3507, MSPM33C32, AM26x.
The deck Deploying to an SDK example summarizes the same steps as slides.
Contents
- 9.1.1. Deploying a ModelZoo Run to an SDK Example (Golden-Vector Check)
- 9.1.1.1. At a Glance: the 4 Files
- 9.1.1.2. Step 1: Pick the SDK and the Example
- 9.1.1.3. Step 2: Import the Example into CCS
- 9.1.1.4. Step 3: Replace the 4 Files
- 9.1.1.5. Step 4: Build, Flash, Check
- 9.1.1.6. Step 5: Try the Other Test Sets
- 9.1.1.7. Troubleshooting
- 9.1.1.8. After the Golden Vectors Pass
- 9.1.2. CCS Integration Guide
- 9.1.3. NPU Device Deployment
- 9.1.4. Non-NPU Deployment
- 9.1.5. Project Compilation Guide: Timeseries Classification Examples
- 9.1.6. Deploying Regression Models from ModelMaker to Device
- 9.1.7. Deploying Forecasting Models from ModelMaker to Device
- 9.1.8. Deploying Anomaly Detection Models from ModelZoo to Device
9.2. Deployment Workflow
Train and compile with a config that has
compilation: enable: True(see Quickstart). Check the device-support matrix in Device Overview.Open the run folder
data/projects/<project_name>/run/<date-time>/<model_name>/(see Understanding the Run Output).Pick the SDK and example for your
target_deviceandtask_type(tables in Deploying a ModelZoo Run to an SDK Example (Golden-Vector Check)).Import the example in CCS, replace the four files, build, flash.
Read the console:
Feature extraction mismatches 0,All tests have passed.,Golden vectors matched: X not matched: 0.Replace the test vector input with your ADC or sensor data in
application_main.c.
Per-task walkthroughs (with screenshots) are the four task readmes in the toctree above.