TI provides strong toolchain support
for EdgeAI for MCUs. Customers with different experience levels can leverage TI
Toolchain to build and deploy AI models on MCUs. Right from data acquisition to data
labeling to training the AI model and compiling and deployment, the TI toolchain
manages the entire process.
The user's guides for different tools
are attached to the References section:
- tinyml-lensorlab release in git
hub [1] and edge AI studio GUI release in TI.com official website [2] contains the models and the whole toolchain for AI model
compiling validated by TI. Users can directly integrate these models into
applications.. In git hub release, users can read the .py file directly to know
how the toolchain works. Those models are all developed for speed, and no need
for external SRAM, users can directly train and validate the model with TI’s
launchpad. The MCU deployment example for those models are included in the
individual MCU device SDKs.
- If users want to do some DIY AI
model with the commonly used AI model developer such as PyTorch, TI Neural
Network Compiler for MCUs [3] can support compiling the .onnx file into MCU .a library file.
In this case, if the MCU on chip NPU must be used as accelerator, the model must
be built with the NPU supported operation [4], and the TI-NPU QAT [5] must be applied to .onnx file, to make the model fit into NPU.
If the model needs to be executed in CPU core, then the DQD is good enough for
quantization. Users must validate the model carefully by themselves. The
compiler also outputs the lib.c file for users to debug the input and output of
each layer. Those highly customized models with different AI training structures
can easily occupy large amounts of memories. One case is AI models using
transformer structures, in which case users need external SDRAM for memory
extending.
With both approaches, the final generated AI model that needs to be embedded into MCU
project is a “.a” file (code and weights library file), and a “.h” header file to
provide the interface of the library.