[Bug] MicroTVM Compilation fails for ARM Cortex-M4 ,with CMSIS-NN=false
theicett opened this issue · comments
Expected behavior
I wanted to port MicroTVM as easily as possible on a cortex-m4 (float)-based stm32g474 to test the inference speed of the MCU that was not optimized. Simplest HelloWorld model porting (predicted_sine_model.tflite) is selected under the option to remove CMSIS-NN (no CMSIS-NN) and bare metal (no zephyr)
Actual behavior
My source file is from:9. Bring microTVM to your own development environment Jupyter notebook: micro_custom_ide
First I changed the CMSIS option, USE_CMSIS_NN = False
,so that the TVMSystemLibEntryPoint()
function is missing, which is Github issue #10237 .I followed this link to solve the problem, but this issue only solved the arduino-based python generated file, so I manually changed the runtime to: RUNTIME = Runtime("crt", {"system-lib": True})
After solving this problem (the main difference is default_lib0.c
), a new problem arises: the generated tvmgen_default_run()
and tvmgen_default___tvm_main__()
function definitions are contradictory.
Environment
colab:micro_custom_ide.ipynb
pip install apache-tvm==0.13.dev295
ARM Keil MDK 5(In order to port to another MCU that only supports keil, I had to do without ST cubeide)
ARM Compiler 6
C11 C++11
Files
script:copy_ipynb_file.txt
model:sine_model.zip
keil project:G474_MicroTVM_Helloworld.zip
This is my first time raising an issue, and the English may not be written well, if there is something bad about the question, please let me know, thank you
@mehrdadh , @mkatanbaf , @guberti , @tqchen
I am also experiencing this issue although I am just trying to get something working on x86 currently
I use the command
python -m tvm.driver.tvmc compile test.onnx --verbose --target='c -keys=cpu' --runtime=crt --runtime-crt-system-lib=1 --executor=aot --executor-aot-interface-api=c --executor-aot-unpacked-api=1 --pass-config tir.disable_vectorize=1 --output-format=mlf --output=model_tvm.tar
I can manually fix it by changing/removing the conflicts, but it is quite annoying.