-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Clean up uTVM demo runtime, add ONNX model test and tutorial #7557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Use `west attach` instead of `west debug` in commandline to prevent debugger from resetting device. - Fix warning on use of led_pin in zephyr-runtime/src/main.c.
Need to add board-specific prj.conf files.
Added test_onnx unit test. Still need to clean up tutorial.
- Use `west attach` instead of `west debug` in commandline to prevent debugger from resetting device. - Fix warning on use of led_pin in zephyr-runtime/src/main.c.
Need to add board-specific prj.conf files.
Added test_onnx unit test. Still need to clean up tutorial.
Added test_onnx unit test. Still need to clean up tutorial.
|
@mdw-octoml I think we had made exceptions for these file paths before. can you update tests/lint/check_file_type.py? I don't know about the jpg files, @tqchen could comment more. they are also 500 bytes, so I don't think it's a big deal to check them in aside from setting precedent of checking-in test data. |
|
@mdw-octoml I commented in a resolved thread expecting it to re-open, but unsure if it did. please take a look at that one referenced in my latest review. |
|
Filed zephyrproject-rtos/zephyr#33745 to track the underlying Zephyr issue |
|
@areusch Okay, I finally got CI to pass on this. Had to remove the tutorial for now (which I will add back later) since I can't yet figure out how to get it to run under CI. Can I haz approval? |
|
thanks @mdw-octoml the PR is now merged! |
Commit c39a6e2 "Clean up uTVM demo runtime, add ONNX model test and tutorial (apache#7557)" changed the location of the Zephyr code example to apps/ so this commit updates the tutorial examples under tutorials/micro to reflect the new location where src/main.c resides. Since commit c39a6e2 also split Zephyr configuration per boards, under project's boards/, this commits also adds a proper config for the STM32F746 Discovery board and fixes a nit in the comment in boards/nucleo_f746zg.conf. It also removes CONFIG_MAIN_STACK_SIZE=50 for disco and nucleo boards since the MCUs for both boads are Cortex-m7 based, not Contex-m33. For the new boards/stm32f746g_disco.conf board config file CONFIG_TEST_RANDOM_GENERATOR=y is set otherwise when CONFIG_ENTROPY_GENERATOR=y linkage will fail with: rand32.h:33: undefined reference to `z_impl_sys_rand32_get' Finally this commit sets the UART ring buffer size back to 512 bytes, only for disco and nucleo boards, otherwise the new value introduced by commit c39a6e2 makes noinit section not fitting the SRAM region on these devices, so linkage fails with: ld: zephyr_prebuilt.elf section `noinit' will not fit in region `SRAM' ld: section .intList VMA [0000000020050000,00000000200500e7] overlaps section noinit VMA [000000002004f5d8,0000000020050317] ld: region `SRAM' overflowed by 792 bytes Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Commit c39a6e2 "Clean up uTVM demo runtime, add ONNX model test and tutorial (apache#7557)" changed the location of the Zephyr code example to apps/ so this commit updates the tutorial examples under tutorials/micro to reflect the new location where src/main.c resides. Since commit c39a6e2 also split Zephyr configuration per boards, under project's boards/, this commits also adds a proper config for the STM32F746 Discovery board and fixes a nit in the comment in boards/nucleo_f746zg.conf. It also removes CONFIG_MAIN_STACK_SIZE=50 for disco and nucleo boards since the MCUs for both boads are Cortex-m7 based, not Contex-m33. For the new boards/stm32f746g_disco.conf board config file CONFIG_TEST_RANDOM_GENERATOR=y is set otherwise when CONFIG_ENTROPY_GENERATOR=y linkage will fail with: rand32.h:33: undefined reference to `z_impl_sys_rand32_get' Finally this commit sets the UART ring buffer size back to 512 bytes, only for disco and nucleo boards, otherwise the new value introduced by commit c39a6e2 makes noinit section not fitting the SRAM region on these devices, so linkage fails with: ld: zephyr_prebuilt.elf section `noinit' will not fit in region `SRAM' ld: section .intList VMA [0000000020050000,00000000200500e7] overlaps section noinit VMA [000000002004f5d8,0000000020050317] ld: region `SRAM' overflowed by 792 bytes Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Commit c39a6e2 "Clean up uTVM demo runtime, add ONNX model test and tutorial (apache#7557)" changed the location of the Zephyr code example to apps/ so this commit updates the tutorial examples under tutorials/micro to reflect the new location where src/main.c resides. Since commit c39a6e2 also split Zephyr configuration per boards, under project's boards/, this commits also adds a proper config for the STM32F746 Discovery board and fixes a nit in the comment in boards/nucleo_f746zg.conf. It also removes CONFIG_MAIN_STACK_SIZE=50 for disco and nucleo boards since the MCUs for both boads are Cortex-m7 based, not Contex-m33. For the new boards/stm32f746g_disco.conf board config file CONFIG_TEST_RANDOM_GENERATOR=y is set otherwise, when CONFIG_ENTROPY_GENERATOR=y linkage will fail with: rand32.h:33: undefined reference to `z_impl_sys_rand32_get' Finally this commit sets the UART ring buffer size back to 512 bytes, only for disco and nucleo boards, otherwise the new value introduced by commit c39a6e2 makes noinit section not fitting the SRAM region on these devices, so linkage fails with: ld: zephyr_prebuilt.elf section `noinit' will not fit in region `SRAM' ld: section .intList VMA [0000000020050000,00000000200500e7] overlaps section noinit VMA [000000002004f5d8,0000000020050317] ld: region `SRAM' overflowed by 792 bytes Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Commit c39a6e2 "Clean up uTVM demo runtime, add ONNX model test and tutorial (apache#7557)" changed the location of the Zephyr code example to apps/ so this commit updates the tutorial examples under tutorials/micro to reflect the new location where src/main.c resides. Since commit c39a6e2 also split Zephyr configuration per boards, under project's boards/, this commits also adds a proper config for the STM32F746 Discovery board and fixes a nit in the comment in boards/nucleo_f746zg.conf. It also removes CONFIG_MAIN_STACK_SIZE=50 for disco and nucleo boards since the MCUs for both boads are Cortex-m7 based, not Contex-m33. For the new boards/stm32f746g_disco.conf board config file CONFIG_TEST_RANDOM_GENERATOR=y is set otherwise, when CONFIG_ENTROPY_GENERATOR=y linkage will fail with: rand32.h:33: undefined reference to `z_impl_sys_rand32_get' Finally, this commit reduces the UART ring buffer size to ~3K, otherwise the new value introduced by commit c39a6e2 (4K) makes noinit section not fit into the SRAM region on the STM32F746-based boards, so linkage fails with the following error: ld: zephyr_prebuilt.elf section `noinit' will not fit in region `SRAM' ld: section .intList VMA [0000000020050000,00000000200500e7] overlaps section noinit VMA [000000002004f5d8,0000000020050317] ld: region `SRAM' overflowed by 792 bytes The size of ~3K was determined experimentally, so whilst it passes all the microTVM tests using the reference VM it can also produce a firmware that fits into the STM32F746-based boards, however there is currently a trade-off between the size of the model to be transfered to the device and the maximum SRAM available on the target device. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Commit c39a6e2 "Clean up uTVM demo runtime, add ONNX model test and tutorial (apache#7557)" changed the location of the Zephyr code example to apps/ so this commit updates the tutorial examples under tutorials/micro to reflect the new location where src/main.c resides. Since commit c39a6e2 also split Zephyr configuration per boards, under project's boards/, this commit also adds a proper config for the STM32F746 Discovery board and fixes a nit in the comment in boards/nucleo_f746zg.conf. It also removes CONFIG_MAIN_STACK_SIZE=50 for disco and nucleo boards since the MCUs for both boads are Cortex-m7 based, not Contex-m33. For the new boards/stm32f746g_disco.conf board config file CONFIG_TEST_RANDOM_GENERATOR=y is set otherwise, when CONFIG_ENTROPY_GENERATOR=y linkage will fail with: rand32.h:33: undefined reference to `z_impl_sys_rand32_get' Finally, this commit reduces the UART ring buffer size to ~3K, otherwise the new value introduced by commit c39a6e2 (4K) makes noinit section not fit into the SRAM region on the STM32F746-based boards, so linkage fails with the following error: ld: zephyr_prebuilt.elf section `noinit' will not fit in region `SRAM' ld: section .intList VMA [0000000020050000,00000000200500e7] overlaps section noinit VMA [000000002004f5d8,0000000020050317] ld: region `SRAM' overflowed by 792 bytes The size of ~3K was determined experimentally, so whilst it passes all the microTVM tests using the reference VM it can also produce a firmware that fits into the STM32F746-based boards, however there is currently a trade-off between the size of the model to be transfered to the device and the maximum SRAM available on the target device. Also, the size of 'uart_data' temporary buffer is reduced a bit (to 8 bytes) to free some additional bytes in SRAM, since most MCUs have a 1-byte FIFO, like it happens with Cortex-M MCUs. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Commit c39a6e2 "Clean up uTVM demo runtime, add ONNX model test and tutorial (apache#7557)" changed the location of the Zephyr code example to apps/ so this commit updates the tutorial examples under tutorials/micro to reflect the new location where src/main.c resides. Since commit c39a6e2 also split Zephyr configuration per boards, under project's boards/, this commit also adds a proper config for the STM32F746 Discovery board and fixes a nit in the comment in boards/nucleo_f746zg.conf. It also removes CONFIG_MAIN_STACK_SIZE=50 for disco and nucleo boards since the MCUs for both boads are Cortex-m7 based, not Contex-m33. For the new boards/stm32f746g_disco.conf board config file CONFIG_TEST_RANDOM_GENERATOR=y is set otherwise, when CONFIG_ENTROPY_GENERATOR=y linkage will fail with: rand32.h:33: undefined reference to `z_impl_sys_rand32_get' This commit reduces the UART ring buffer size to ~3K, because the new value introduced by commit c39a6e2 (4K) makes noinit section not fit into the SRAM region on the STM32F746-based boards, so linkage fails with the following error: ld: zephyr_prebuilt.elf section `noinit' will not fit in region `SRAM' ld: section .intList VMA [0000000020050000,00000000200500e7] overlaps section noinit VMA [000000002004f5d8,0000000020050317] ld: region `SRAM' overflowed by 792 bytes The size of ~3K was determined experimentally, so whilst it passes all the microTVM tests using the reference VM it can also produce a firmware that fits into the STM32F746-based boards, however there is currently a trade-off between the size of the model to be transfered to the device and the maximum SRAM available on the target device. Finally, the size of 'uart_data' temporary buffer is reduced a bit (to 8 bytes) to free some additional bytes in SRAM, since most MCUs have a 1-byte FIFO, like it happens with Cortex-M MCUs. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Commit c39a6e2 "Clean up uTVM demo runtime, add ONNX model test and tutorial (apache#7557)" changed the location of the Zephyr code example to apps/ so this commit updates the tutorial examples under tutorials/micro to reflect the new location where src/main.c resides. Since commit c39a6e2 also split Zephyr configuration per boards, under project's boards/, this commit also adds a proper config for the STM32F746 Discovery board and fixes a nit in the comment in boards/nucleo_f746zg.conf. It also removes CONFIG_MAIN_STACK_SIZE=50 for disco and nucleo boards since the MCUs for both boads are Cortex-m7 based, not Contex-m33. For the new boards/stm32f746g_disco.conf board config file CONFIG_TEST_RANDOM_GENERATOR=y is set otherwise, when CONFIG_ENTROPY_GENERATOR=y linkage will fail with: rand32.h:33: undefined reference to `z_impl_sys_rand32_get' This commit reduces the UART ring buffer size to ~3K, because the new value introduced by commit c39a6e2 (4K) makes noinit section not fit into the SRAM region on the STM32F746-based boards, so linkage fails with the following error: ld: zephyr_prebuilt.elf section `noinit' will not fit in region `SRAM' ld: section .intList VMA [0000000020050000,00000000200500e7] overlaps section noinit VMA [000000002004f5d8,0000000020050317] ld: region `SRAM' overflowed by 792 bytes The size of ~3K was determined experimentally, so whilst it passes all the microTVM tests using the reference VM it also produces a firmware that fits into the STM32F746-based boards. Since it's a demo, that value is ok, however it needs to be evaluated carefully on real cases. Finally, the size of 'uart_data' temporary buffer is reduced a bit (to 8 bytes) to free some additional bytes in SRAM, since most MCUs have a 1-byte FIFO, like it happens with Cortex-M MCUs. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Commit c39a6e2 "Clean up uTVM demo runtime, add ONNX model test and tutorial (apache#7557)" changed the location of the Zephyr code example to apps/ so this commit updates the tutorial examples under tutorials/micro to reflect the new location where src/main.c resides. Since commit c39a6e2 also split Zephyr configuration per boards, under project's boards/, this commit also adds a proper config for the STM32F746 Discovery board and fixes a nit in the comment in boards/nucleo_f746zg.conf. It also removes CONFIG_MAIN_STACK_SIZE=50 for disco and nucleo boards since the MCUs for both boads are Cortex-m7 based, not Contex-m33. For the new boards/stm32f746g_disco.conf CONFIG_TEST_RANDOM_GENERATOR=y is set, otherwise when CONFIG_ENTROPY_GENERATOR=y linking will fail with the following error: rand32.h:33: undefined reference to `z_impl_sys_rand32_get' This commit also reduces the UART ring buffer size to ~3K, because the new value introduced by commit c39a6e2 (4K) makes noinit section not fit into the SRAM region on the STM32F746-based boards, so linkage fails with the following error: ld: zephyr_prebuilt.elf section `noinit' will not fit in region `SRAM' ld: section .intList VMA [0000000020050000,00000000200500e7] overlaps section noinit VMA [000000002004f5d8,0000000020050317] ld: region `SRAM' overflowed by 792 bytes The size of ~3K was determined experimentally, so whilst it passes all the microTVM tests using the reference VM it also produces a firmware that fits into the STM32F746-based boards. Since it's a demo, that value is ok, however it needs to be evaluated carefully on real cases. Finally, the size of 'uart_data' temporary buffer is reduced a bit (to 8 bytes) to free some additional bytes in SRAM, since most MCUs have a 1-byte FIFO, like it happens with Cortex-M-based MCUs. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Commit c39a6e2 "Clean up uTVM demo runtime, add ONNX model test and tutorial (apache#7557)" changed the location of the Zephyr code example to apps/ so this commit updates the tutorial examples under tutorials/micro to reflect the new location where src/main.c resides. Since commit c39a6e2 also split Zephyr configuration per boards, under project's boards/, this commit also adds a proper config for the STM32F746 Discovery board and fixes a nit in the comment in boards/nucleo_f746zg.conf. It also removes CONFIG_MAIN_STACK_SIZE=50 for disco and nucleo boards since the MCUs for both boads are Cortex-m7 based, not Contex-m33. For the new boards/stm32f746g_disco.conf CONFIG_TEST_RANDOM_GENERATOR=y is set, otherwise when CONFIG_ENTROPY_GENERATOR=y linking will fail with the following error: rand32.h:33: undefined reference to `z_impl_sys_rand32_get' This commit also reduces the UART ring buffer size to ~3K, because the new value introduced (4K) makes noinit section not fit into the SRAM region on the STM32F746-based boards, so linkage fails with the following error: ld: zephyr_prebuilt.elf section `noinit' will not fit in region `SRAM' ld: section .intList VMA [0000000020050000,00000000200500e7] overlaps section noinit VMA [000000002004f5d8,0000000020050317] ld: region `SRAM' overflowed by 792 bytes The size of ~3K was determined experimentally, so whilst it passes all the microTVM tests using the reference VM it also produces a firmware that fits into the STM32F746-based boards. Since it's a demo, that value is ok, however it needs to be evaluated carefully on real cases. Finally, the size of 'uart_data' temporary buffer is reduced a bit (to 8 bytes) to free some additional bytes in SRAM, since most MCUs have a 1-byte FIFO, like it happens with Cortex-M-based MCUs. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Commit c39a6e2 "Clean up uTVM demo runtime, add ONNX model test and tutorial (apache#7557)" changed the location of the Zephyr code example to apps/ so this commit updates the tutorial examples under tutorials/micro to reflect the new location where src/main.c resides. Since commit c39a6e2 also split Zephyr configuration per boards, under project's boards/, this commit also adds a proper config for the STM32F746 Discovery board and fixes a nit in the comment in boards/nucleo_f746zg.conf. It also removes CONFIG_MAIN_STACK_SIZE=50 for disco and nucleo boards since the MCUs for both boads are Cortex-m7 based, not Contex-m33. For the new boards/stm32f746g_disco.conf CONFIG_TEST_RANDOM_GENERATOR=y is set, otherwise when CONFIG_ENTROPY_GENERATOR=y linking will fail with the following error: rand32.h:33: undefined reference to `z_impl_sys_rand32_get' Finally, the size of 'uart_data' temporary buffer is reduced a bit (to 8 bytes) to free some additional bytes in SRAM, since most MCUs have a 1-byte FIFO, like it happens with Cortex-M-based MCUs. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Commit c39a6e2 "Clean up uTVM demo runtime, add ONNX model test and tutorial (#7557)" changed the location of the Zephyr code example to apps/ so this commit updates the tutorial examples under tutorials/micro to reflect the new location where src/main.c resides. Since commit c39a6e2 also split Zephyr configuration per boards, under project's boards/, this commit also adds a proper config for the STM32F746 Discovery board and fixes a nit in the comment in boards/nucleo_f746zg.conf. It also removes CONFIG_MAIN_STACK_SIZE=50 for disco and nucleo boards since the MCUs for both boads are Cortex-m7 based, not Contex-m33. For the new boards/stm32f746g_disco.conf CONFIG_TEST_RANDOM_GENERATOR=y is set, otherwise when CONFIG_ENTROPY_GENERATOR=y linking will fail with the following error: rand32.h:33: undefined reference to `z_impl_sys_rand32_get' Finally, the size of 'uart_data' temporary buffer is reduced a bit (to 8 bytes) to free some additional bytes in SRAM, since most MCUs have a 1-byte FIFO, like it happens with Cortex-M-based MCUs. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
…7557) * Some docstring fixes. * Couple of small fixes: - Use `west attach` instead of `west debug` in commandline to prevent debugger from resetting device. - Fix warning on use of led_pin in zephyr-runtime/src/main.c. * Adding Zephyr demo runtime. * Cleanup of uTVM tests and demo runtime. * Working on QEMU support. Need to add board-specific prj.conf files. * Adding board-specific prj.conf files. * Some cleanup. * Lots of hacking to get ONNX model to run on QEMU and nRF5340. Added test_onnx unit test. Still need to clean up tutorial. * Adding data for unit tests. * Cleanup demo_runtime code. * Fix up tutorial. * Couple of small fixes: - Use `west attach` instead of `west debug` in commandline to prevent debugger from resetting device. - Fix warning on use of led_pin in zephyr-runtime/src/main.c. * Adding Zephyr demo runtime. * Cleanup of uTVM tests and demo runtime. * Working on QEMU support. Need to add board-specific prj.conf files. * Adding board-specific prj.conf files. * Some cleanup. * Lots of hacking to get ONNX model to run on QEMU and nRF5340. Added test_onnx unit test. Still need to clean up tutorial. * Lots of hacking to get ONNX model to run on QEMU and nRF5340. Added test_onnx unit test. Still need to clean up tutorial. * Adding data for unit tests. * Cleanup demo_runtime code. * Fix up tutorial. * Fix tutorial. * Fix tutorial and runtime. * Fix merge conflicts. * Fix merge conflict. * Remove redundant files. * Revert dep. * Fixup * Add new files to check_file_type.py. * Adding missing ONNX file. * Fixup docs. * Fix linting rule. * small fixes * Add missing file to check_file_type.py. * clang-format this file. * Fix formatting. * Black formatting. * Lint comments. * Fix path for test. * Bump CI. * Update from_onnx. * fix path * Fixing * Revert dmlc-core to 21cc7de0dc9fd6acb796e1be6181fa8e6b6c8f41 * Fix path again. * Fix tutorial to not use actual Zephyr. * Revert submodule version change * Fix bad merge. * Trying to fix this mess. * Fix formatting. * context -> device * Removing tutorial since I can't get it to pass CI. Co-authored-by: Mehrdad Hessar <mehrdad.hessar@gmail.com> Co-authored-by: Andrew Reusch <areusch@octoml.ai>
Commit c39a6e2 "Clean up uTVM demo runtime, add ONNX model test and tutorial (apache#7557)" changed the location of the Zephyr code example to apps/ so this commit updates the tutorial examples under tutorials/micro to reflect the new location where src/main.c resides. Since commit c39a6e2 also split Zephyr configuration per boards, under project's boards/, this commit also adds a proper config for the STM32F746 Discovery board and fixes a nit in the comment in boards/nucleo_f746zg.conf. It also removes CONFIG_MAIN_STACK_SIZE=50 for disco and nucleo boards since the MCUs for both boads are Cortex-m7 based, not Contex-m33. For the new boards/stm32f746g_disco.conf CONFIG_TEST_RANDOM_GENERATOR=y is set, otherwise when CONFIG_ENTROPY_GENERATOR=y linking will fail with the following error: rand32.h:33: undefined reference to `z_impl_sys_rand32_get' Finally, the size of 'uart_data' temporary buffer is reduced a bit (to 8 bytes) to free some additional bytes in SRAM, since most MCUs have a 1-byte FIFO, like it happens with Cortex-M-based MCUs. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Commit c39a6e2 "Clean up uTVM demo runtime, add ONNX model test and tutorial (apache#7557)" changed the location of the Zephyr code example to apps/ so this commit updates the tutorial examples under tutorials/micro to reflect the new location where src/main.c resides. Since commit c39a6e2 also split Zephyr configuration per boards, under project's boards/, this commit also adds a proper config for the STM32F746 Discovery board and fixes a nit in the comment in boards/nucleo_f746zg.conf. It also removes CONFIG_MAIN_STACK_SIZE=50 for disco and nucleo boards since the MCUs for both boads are Cortex-m7 based, not Contex-m33. For the new boards/stm32f746g_disco.conf CONFIG_TEST_RANDOM_GENERATOR=y is set, otherwise when CONFIG_ENTROPY_GENERATOR=y linking will fail with the following error: rand32.h:33: undefined reference to `z_impl_sys_rand32_get' Finally, the size of 'uart_data' temporary buffer is reduced a bit (to 8 bytes) to free some additional bytes in SRAM, since most MCUs have a 1-byte FIFO, like it happens with Cortex-M-based MCUs. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Commit c39a6e2 "Clean up uTVM demo runtime, add ONNX model test and tutorial (apache#7557)" changed the location of the Zephyr code example to apps/ so this commit updates the tutorial examples under tutorials/micro to reflect the new location where src/main.c resides. Since commit c39a6e2 also split Zephyr configuration per boards, under project's boards/, this commit also adds a proper config for the STM32F746 Discovery board and fixes a nit in the comment in boards/nucleo_f746zg.conf. It also removes CONFIG_MAIN_STACK_SIZE=50 for disco and nucleo boards since the MCUs for both boads are Cortex-m7 based, not Contex-m33. For the new boards/stm32f746g_disco.conf CONFIG_TEST_RANDOM_GENERATOR=y is set, otherwise when CONFIG_ENTROPY_GENERATOR=y linking will fail with the following error: rand32.h:33: undefined reference to `z_impl_sys_rand32_get' Finally, the size of 'uart_data' temporary buffer is reduced a bit (to 8 bytes) to free some additional bytes in SRAM, since most MCUs have a 1-byte FIFO, like it happens with Cortex-M-based MCUs. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
…7557) * Some docstring fixes. * Couple of small fixes: - Use `west attach` instead of `west debug` in commandline to prevent debugger from resetting device. - Fix warning on use of led_pin in zephyr-runtime/src/main.c. * Adding Zephyr demo runtime. * Cleanup of uTVM tests and demo runtime. * Working on QEMU support. Need to add board-specific prj.conf files. * Adding board-specific prj.conf files. * Some cleanup. * Lots of hacking to get ONNX model to run on QEMU and nRF5340. Added test_onnx unit test. Still need to clean up tutorial. * Adding data for unit tests. * Cleanup demo_runtime code. * Fix up tutorial. * Couple of small fixes: - Use `west attach` instead of `west debug` in commandline to prevent debugger from resetting device. - Fix warning on use of led_pin in zephyr-runtime/src/main.c. * Adding Zephyr demo runtime. * Cleanup of uTVM tests and demo runtime. * Working on QEMU support. Need to add board-specific prj.conf files. * Adding board-specific prj.conf files. * Some cleanup. * Lots of hacking to get ONNX model to run on QEMU and nRF5340. Added test_onnx unit test. Still need to clean up tutorial. * Lots of hacking to get ONNX model to run on QEMU and nRF5340. Added test_onnx unit test. Still need to clean up tutorial. * Adding data for unit tests. * Cleanup demo_runtime code. * Fix up tutorial. * Fix tutorial. * Fix tutorial and runtime. * Fix merge conflicts. * Fix merge conflict. * Remove redundant files. * Revert dep. * Fixup * Add new files to check_file_type.py. * Adding missing ONNX file. * Fixup docs. * Fix linting rule. * small fixes * Add missing file to check_file_type.py. * clang-format this file. * Fix formatting. * Black formatting. * Lint comments. * Fix path for test. * Bump CI. * Update from_onnx. * fix path * Fixing * Revert dmlc-core to 21cc7de0dc9fd6acb796e1be6181fa8e6b6c8f41 * Fix path again. * Fix tutorial to not use actual Zephyr. * Revert submodule version change * Fix bad merge. * Trying to fix this mess. * Fix formatting. * context -> device * Removing tutorial since I can't get it to pass CI. Co-authored-by: Mehrdad Hessar <mehrdad.hessar@gmail.com> Co-authored-by: Andrew Reusch <areusch@octoml.ai>
Commit c39a6e2 "Clean up uTVM demo runtime, add ONNX model test and tutorial (apache#7557)" changed the location of the Zephyr code example to apps/ so this commit updates the tutorial examples under tutorials/micro to reflect the new location where src/main.c resides. Since commit c39a6e2 also split Zephyr configuration per boards, under project's boards/, this commit also adds a proper config for the STM32F746 Discovery board and fixes a nit in the comment in boards/nucleo_f746zg.conf. It also removes CONFIG_MAIN_STACK_SIZE=50 for disco and nucleo boards since the MCUs for both boads are Cortex-m7 based, not Contex-m33. For the new boards/stm32f746g_disco.conf CONFIG_TEST_RANDOM_GENERATOR=y is set, otherwise when CONFIG_ENTROPY_GENERATOR=y linking will fail with the following error: rand32.h:33: undefined reference to `z_impl_sys_rand32_get' Finally, the size of 'uart_data' temporary buffer is reduced a bit (to 8 bytes) to free some additional bytes in SRAM, since most MCUs have a 1-byte FIFO, like it happens with Cortex-M-based MCUs. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
This PR makes a few changes to make the structure of the uTVM code more user-friendly:
(to indicate that this runtime is more generally useful, but still intended as a "demo")
prj.conffiles for the demo_runtime, to allow different options to be configured for qemu_x86 and nrf5340 (for example).test_zephyr.pywhich converts and tests an ONNX MNIST model