1. Installing the Compiler

Note

The typical use model for the compiler is to invoke it from within EdgeAI Studio Model Composer. The following steps are required only if the compiler is used directly from the command-line.

1.1. Supported Platforms

  • Ubuntu 22.04, Python 3.10

  • Windows 10/11, Python 3.10

1.2. Installing

TI Neural Network Compiler for MCUs is distributed as a prebuilt Python package in wheel format for either Linux or Windows. Using a Python 3.10 virtual environment is recommended. Install the package using the standard Python wheel installation mechanism. For example:

Linux/Windows

pip3 install --extra-index-url https://software-dl.ti.com/mctools/esd/tvm/mcu ti_mcu_nnc

By default, the above command installs the latest ti_mcu_nnc release. You can use the == operator to install a specific version, for example, ti_mcu_nnc==2.1.0.

1.3. Verifying Install

After installation, verify that the compiler is available as follows:

Linux

pip3 show ti_mcu_nnc
which tvmc
python3 -c "import tvm; print(tvm.__file__)"
ls `python3 -c "import tvm; print(tvm.__path__[0])"`/ti_docs/index.html

Windows Git BASH

pip3 show ti_mcu_nnc
which tvmc
python -c "import tvm; print(tvm.__file__)"
ls `python -c "import tvm; print(tvm.__path__[0])"`/ti_docs/index.html

Windows PowerShell

pip3 show ti_mcu_nnc
get-command tvmc
python -c "import tvm; print(tvm.__file__)"

A local copy of the user guide is also available in the installation, inside the ti_docs directory.

TI Neural Network Compiler (NNC) for MCUs is built on top of Apache TVM, so you will see “tvmc” as the compiler command name and “tvm” as the installation directory name.