Silicon Labs Machine Learning Model Profiler#

Overview#

The Silicon Labs Machine Learning Model Profiler is a performance analysis tool designed to help engineers understand how TensorFlow Lite for Microcontrollers models (.tflite) execute on Silicon Labs embedded devices. The purpose of this tool is also to help developers optimize their models before deploying to production.

The profiler enables users to:

  • Correlate layer execution with power usage, clock rate, and memory pressure (Power usage profiling is a planned feature)

  • Build intuition for optimizing models to reduce stalls and improve inference latency

  • Identify performance bottlenecks during inference

  • Understand trade-offs between execution on the ARM Cortex-M MCU and the Matrix Vector Processor (MVP).

The tool is available as:

  • a standalone GUI

  • a command-line interface (CLI) called sml

  • a Python API (planned feature)

It can also be launched directly from Simplicity Studio v6.

Who This Tool Is For#

This documentation is written primarily for embedded and ML engineers.
Product managers, data scientists, and sales engineers are expected to be sufficiently familiar with machine learning concepts to interpret the results.

The profiler focuses exclusively on execution performance, not model accuracy or output quality.

Key Concepts and Terminology#

Term

Meaning

Inference

One complete execution of a model

Layer

A neural network layer

Operator

A logical operation within a layer

Kernel

The concrete implementation that executes an operator

MCU

ARM Cortex-M core

MVP

Matrix Vector Processor hardware accelerator

Stall / Wait

Time spent idle due to memory or resource contention

Power

Power consumed during execution

Tensor Arena

Memory allocated for TFLM state

Quantization

Optimization technique to reduce model size

Perfetto

The trace visualization tool used

Installation#

Using Simplicity Installer#

  1. Download Simplicity Installer using this link for your OS.

  2. Once Installed, open Simplicity Installer and navigate to Installation Wizard. Installation WizardInstallation Wizard

  3. Click on Advanced tile. Advanced TileAdvanced Tile

  4. Search for ML Profiler:

    1. Click the Magnifying Glass Icon.

    2. Type ML Profiler, or a part of it, in the Search Box for GUI version, or Silabs Machine Learning for CLI version (sml).

    3. Select the latest ML Profiler by selecting the checkbox beside it. Versioning is based on semantic versioning.

    4. Accept Terms of Service and License Agreement by selecting the checkbox at the bottom.

    5. Click the Install button. Search and Install ML ProfilerSearch and Install ML Profiler

  5. Installation should progress, as shown below. ML Profiler Installation ProgressML Profiler Installation Progress

  6. Once the installation is successful, you should see the following. ML Profiler Installation successfulML Profiler Installation successful

  7. If you installed the CLI version (sml), add its location to your PATH environment variable. You can find the location using slt where sml.

Using SLT on the command line#

  1. Download Silicon Labs Tool (SLT) using this link for your OS.

  2. Unzip the downloaded zip file to your preferred location. Add this location to your PATH environment variable so that slt command is available globally.

  3. Install ML Profiler using slt install ml-profiler for the GUI version or slt install sml for the CLI version.

Running a Profiling Session from the GUI#

  1. Launch the ML Profiler from Simplicity Studio v6

    1. Open Simplicity Studio and navigate to the Tools tab on the left panel.

    2. Hover on ML Profiler and click the Play icon that appears on the right side.

  2. Or, Launch the ML Profiler from the command line:

    slt launch ml-profiler
  3. Step 1 or 2 should launch the ML Profiler. It is recommended to keep the window of ML Profiler maximized or in full-screen for the best user experience. ML Profiler GUI Landing PageML Profiler GUI Landing Page

  4. Connect the board you on which you want to profile your model. The board will be detected automatically.

  5. Select the .tflite model you want to profile by clicking the Browse button and navigating your file system for the model file.

  6. Click the Profile Button Profiling Session Setup and RunProfiling Session Setup and Run

    NOTE: See Troubleshooting section for handling any errors.

Outputs#

  • Summary tab: inference time, MCU vs MVP cycles, power Profiling Summary Tab 1Profiling Summary Tab 1 Profiling Summary Tab 2Profiling Summary Tab 2

  • Perfetto trace tab: time-based execution and resource traces Profiling Perfetto Trace TabProfiling Perfetto Trace Tab (Zoomed in view) Profiling Perfetto Trace Tab Zoomed InProfiling Perfetto Trace Tab Zoomed In

    NOTE: The profiler currently tracks only the ARM Cortex‑M MCU processor timeline. Usage and cycle information for the Matrix Vector Processor (MVP) is instead provided in the summary tab.

Running a Profiling Session from the CLI#

  1. Connect the board on which you want to profile your model. The board will be detected automatically, once connected.

  2. Find the "device ID" of the connected board.

    1. Linux/macOS

      $ ~/.silabs/slt/installs/archive/sdm-darwin-arm64/sdm adapter list
      πŸ‘‰ Total adapter count: 1
      ↳ xxxxx [ usb wstk 440339411 xxxxx 127.0.0.1 ]
    2. Windows

    PS> $HOME\.silabs\slt\installs\archive\sdm-windows-amd64\sdm.exe adapter list
    πŸ‘‰ Total adapter count: 1
      ↳ xxxxx [ usb wstk 440339411 xxxxx 127.0.0.1 ]

    The device ID is "440339411".

  3. Run Profiling

    sml profile /path/to/model_name.tflite 440339411

    NOTE: See Usage for more command line arguments. See Troubleshooting section for handling any errors.

Output#

The following is an example of the output you can expect to see on the command line terminal. Usernames and other sensitive information has been stubbed.

The log below includes:

  • Inference time

  • MCU vs MVP cycle breakdown

  • Power consumption (planned feature)

You can access:

  • text summary

  • detailed JSON report

πŸ” Checking SDM server status...
βœ… SDM server is connected and accessible

πŸ” Checking if device exists in connected adapters...
βœ… Device "440339411" found in connected adapters

πŸ” Checking board support...
βœ… Board "BRD2608A" is supported

πŸ” Checking model file...
βœ… Model file found: /path/to/model_name.tflite (534336 bytes)
πŸš€ Starting ML Profiler...

SDM Service connected

πŸš€ Starting profiling workflow...
   Device: 440339411 (BRD2608A)
   Model:  model_name

πŸ“‘ Step 1: Connecting to debug channel...
   Terminal socket opened
   Debug channel connected, ready to capture packets...

⚑ Step 2: Combining model with firmware and flashing...
   Using firmware: aiml_soc_profiler_firmware_efr32_brd2608a_mvp.s37
   Combined: model_name_combined.s37 (2447 KB)
   Flashing to 440339411...
   Firmware flashed successfully

πŸ“¦ Step 3: Capturing packets and generating trace...
   Captured 313 packets, building trace...
   Decoded 681 packets, generated 648 trace events

╔══════════════════════════════════════════════════════════╗
β•‘           ML PROFILER - PROFILING SUMMARY                β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

SESSION SUMMARY
────────────────────────────────────────────────────────────
  Model Name                               model_name
  Arena size                               82 KB
...more session summary...
  Board                                    BRD2608A
...truncated for this documentation...
  Total number of MACs                     6,115,960

PER-LAYER SUMMARY
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
                 |      Input       |      Output      |           MCU           |           Acc           |
-----------------+------------------+------------------+-------------------------+-------------------------+---------
Layer            | Shape            | Shape            | Cycles     | Stalls     | Cycles     | Stalls     | Time(ms)
-----------------+------------------+------------------+------------+------------+------------+------------+---------
CONV_2D          | 1 x 98 x 1 x 104 | 1 x 98 x 1 x 40  | 7,252      | 0          | 929,071    | 304,673    | 12.004
...more per-layer summary...
DEPTHWISE_CONV_2 | 1 x 98 x 1 x 120 | 1 x 49 x 1 x 120 | 53,617     | 0          | 94,539     | 36,008     | 1.899
...truncated for this documentation...
SOFTMAX          | 1 x 3            | 1 x 3            | 3,144      | 0          | 0          | 65         | 0.04
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

────────────────────────────────────────────────────────────
Generated: YYYY-MM-DDTHH:MM:SS.SSSZ

πŸ“ Profile data saved to:
   /path/to/profiling/data/model_name-YYYY-MM-DDTHH-MM-SSZ

   Includes:
   β€’ model_name.pftrace (Perfetto trace)
   β€’ captured-packets.json (decoded packets)
   β€’ report.json (profiling data)
   β€’ summary.txt (readable summary)

   πŸ“„ See summary.txt for the complete profiling summary.

🌐 Step 4: Starting Perfetto UI server...
   Perfetto server started on port 10000

βœ… Profiling completed successfully!

πŸ“Š Trace URL: http://localhost:10000#!/?url=http%3A%2F%2Flocalhost%3A10000%2Ftrace%2FL1VzZXJzL3JhYW5zYXJpLy5zaWxhYnMvbWwtcHJvZmlsZXIva2V5d29yZF9zcG90dGluZ19vbl9vZmZfdjMtMjAyNi0wMS0wN1QwNi0xMS0xNlova2V5d29yZF9zcG90dGluZ19vbl9vZmZfdjMucGZ0cmFjZQ%2Fmodel_name.pftrace
Use --gui to open GUI after profiling.

Press Ctrl+C to exit the profiling session.

Usage#

sml --help
Usage: sml [options] [command]

Silicon Labs ML tooling.

Options:
  -v, --version                       Show version and exit.
  --gui                               Open GUI after command completes (if supported).
  --dry-run                           Validate and print the effective configuration, but do not
                                      execute the command.
  -h, --help                          display help for command

Commands:
  profile [options] <model> <device>  Profile a machine learning model on a Silicon Labs device. Emits
                                      a Perfetto-compatible trace (.pftrace) or JSON summary (.json).
  version                             Show the version number
  help [command]                      display help for command

Understanding Performance#

The profiler presents a hierarchical execution view:

Inference β†’ Layer β†’ Operator β†’ Kernel

Time-aligned tracks allow correlation between:

  • MCU vs MVP execution

  • memory usage

  • clock rate

  • power consumption

Idle time per kernel helps identify when:

  • accelerator overhead dominates

  • memory stalls occur

  • MCU execution may be more efficient

Limitations#

  • Requires real Silicon Labs hardware, currently only supports xG24, xG26, and xG28 devices, specifically BRD2601B, BRD2608A, and BRD2705A dev kits.

  • Simulator support is in development

  • Does not auto-compare MCU vs MVP

  • Does not measure model accuracy. This is not a target of this tool. It is geared exclusively towards execution performance analysis.

Summary#

The Silicon Labs Machine Learning Model Profiler helps engineers reason about embedded ML performance by making execution behavior visible, comparable, and intuitive.

Troubleshooting#

"SDM Service is not available" warning#

SDM Service is not available warningSDM Service is not available warning

Solution#

  1. Verify if Simplicity Device Manager (SDM) is installed using, slt locate sdm.

  2. If you see no output on the console, install SDM using:

    1. slt install sdm through the CLI, or

    2. Simplicity Installer by following the steps mentioned in the Install using Simplicity Installer section. Search for "Simplicity Device Manager" instead of "ML Profiler".

  3. Start SDM server.

    1. Linux/macOS

      ~/.silabs/slt/installs/archive/sdm-darwin-arm64/sdm server start
    2. Windows

    PS> $HOME\.silabs\slt\installs\archive\sdm-windows-amd64\sdm.exe server start

"No devices connected" message in the "Select Device" field#

No Device ConnectedNo Device Connected

Solution#

Connect the desired board on which you want to profile your models.

Any type of "Firmware preparation/flashing failed: Failed to combine model with firmware" error#

Examples of this type of error:

  1. Firmware preparation/flashing failed: Failed to combine model with firmware: 404 Not Found: Not Found

  2. Firmware preparation/flashing failed: Failed to combine model with firmware: Combine binary job failed: Error: Could not find function simpleCombineConvertBinaries. It is either typed wrong, you miss an adapter pack, or you need to upgrade one.

Solution#

  1. This issue is most commonly caused due to an older version of either Simplicity Device Manager or Simplicity Commander.

  2. Update Simplicity Commander to v1.22+. Install using slt install commander. Verify using slt locate commander.

  3. Update Simplicity Device Manager to v0.101.4+. Install using slt install sdm. Verify using slt locate sdm.

No Profiling Output#

GUI

no-profiling-summary-outputno-profiling-summary-output no-profiling-trace-outputno-profiling-trace-output

CLI

πŸ“¦ Step 3: Capturing packets and generating trace...
   Captured 43 packets, building trace...
   Decoded 0 packets, generated 0 trace events

╔══════════════════════════════════════════════════════════╗
β•‘           ML PROFILER - PROFILING SUMMARY                β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

────────────────────────────────────────────────────────────

Solution#

  1. Verify Simplicity Device Manager Service is up: sdm server status. If not, invoke sdm server start.

  2. Find the device ID, see Running a Profiling Session From the CLI section.

  3. Jump into admin console of your device: sdm terminal -a <device_id> -c admin.

  4. Verify the debug message version: dch message version, If the output is Message protocol version : 3, use Step 5 below.

  5. Invoke dch message version 2. The output must show Current version = 2.

  6. Execute a Profiling session again.