grant-arm opened a new pull request, #10962:
URL: https://github.com/apache/tvm/pull/10962
Currently there is no way to pass an output module name to tvmc on the
command line when compiling a model.
This means that (for the use cases we are interested in) generated C code is
always placed in files named `default_lib*.c` and that functions are named
`tvmgen_default*()`.
If we want to compile multiple models for use with a single application, the
C source file names and function names are not unique, resulting in failure
when building the generated C code.
This PR allows module-name to be passed to tvmc on the command line, for
example:
```
tvmc compile --target=cmsis-nn,c \
--target-cmsis-nn-mcpu=cortex-m55 \
--runtime=crt \
--executor=aot \
--executor-aot-interface-api=c \
--executor-aot-unpacked-api=1 \
--pass-config tir.usmp.enable=1 \
--pass-config tir.usmp.algorithm=hill_climb \
--pass-config tir.disable_storage_rewrite=1 \
--pass-config tir.disable_vectorize=1 ./mobilenet_v2_1.0_224_INT8.tflite
\
--output-format=mlf \
--module-name=classify
```
In this case, the generated C code is placed in files name `classify_lib*.c`
and functions are named `tvmgen_classify*()`.
Additionally, this PR updates the microNPU and CMSIS-NN graph partitioners
to pass the module name to PartitionGraph().
This is necessary to ensure that the C code function names generated for
microNPU and CMSIS-NN include the module name and not `default`.
@leandron @Mousius @manupa-arm @areusch
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]