ST Edge AI Core for ISPU
for ISPU target, based on ST Edge AI Core Technology 2.2.0
r1.2
Overview
ST Edge AI Core supports the ISPU, an ultralow-power, high-performance programmable core embedded inside ST’s sensors (https://www.st.com/content/st_com/en/ecosystems/MEMS-Sensors-Ecosystem-for-Machine-Learning.html).
For most topics on how to use ST Edge AI Core, you can refer to the common (not target specific) articles in this documentation. In addition, you can find some articles specific for the ISPU:
- For how to perform validation on target with the ISPU: On-target ISPU validation flow
- For how to integrate the converted model on the ISPU in order to test it and deploy it: How to integrate generated code
In the remainder of this article, some ISPU specific extensions to the command line of ST Edge AI Core are described.
Validate command extension
Specific options
--ispu-conf
The option takes as argument the path to the ISPU configuration
file (JSON format) of the model to validate when performing
validation on target ('validate --mode target'
command). The ISPU configuration file must contain the program
to load to the ISPU to perform the validation. For how to generate
the ISPU configuration file, refer to On-target ISPU validation
flow.
--ucf
(deprecated)
The option takes as argument the path to the UCF of the model to
validate when performing validation on target ('validate --mode target'
command). The UCF must contain the program to load to the ISPU
to perform the validation. For how to generate the UCF, refer to On-target ISPU validation
flow. This option is deprecated and will be removed in the next
release.
If neither option (--ispu-conf
or
--ucf
) is specified, the tool will automatically
generate the ISPU configuration file in JSON format (the ISPU
toolchain must be installed and available in the environment
PATH). This means that the 'validate --mode target'
command can be executed directly without the need to execute the
generate
command first. For details, refer to On-target ISPU validation
flow.
Generate command extension
Description
The generate command for ISPU generates both the files of the runtime library and the files of the specific converted model. The files are structured in inc, lib and src subfolders. This structure allows the generated code to be directly used in the validation and integration templates described in the articles “On-target ISPU validation flow” and “How to integrate generated code”.
$ stedgeai generate -m <model_file_path> --target ispu -o <output-directory-path>
...
Copied runtime header files (90) to <output-directory-path>/inc/ai
Copied runtime library files (1) to <output-directory-path>/lib/ai
Generated files (5)
----------------------------------------------------------------------------------
<output-directory-path>/inc/network_data.h
<output-directory-path>/src/network_data.c
<output-directory-path>/inc/network.h
<output-directory-path>/src/network.c
<output-directory-path>/inc/network_details.h
Creating txt report file <output-directory-path>/network_generate_report.txt
...
Additional resources
For additional resources, refer to ST’s GitHub repository for ISPU: https://github.com/STMicroelectronics/st-mems-ispu.