Skip to content
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

manifest: update cmsis-nn to v6.0.0 & tflite-micro #73995

Merged
merged 6 commits into from
Jun 28, 2024

Conversation

JordanYates
Copy link
Collaborator

Update cmsis-nn to version 6.0.0.
Revision history can be found at:
https://arm-software.github.io/CMSIS-NN/latest/rev_hist.html

New upstream revision is the v6.0.0 release tag + module.yml ARM-software/CMSIS-NN@6982301

@zephyrbot
Copy link
Collaborator

zephyrbot commented Jun 10, 2024

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
cmsis-nn zephyrproject-rtos/cmsis-nn@0c8669d (zephyr) zephyrproject-rtos/cmsis-nn@ea987c1 (zephyr-v6.0.0) zephyrproject-rtos/[email protected]
tflite-micro zephyrproject-rtos/tflite-micro@1a34dca (main) zephyrproject-rtos/tflite-micro@48613f7 (zephyr) zephyrproject-rtos/[email protected]

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@JordanYates
Copy link
Collaborator Author

Updating CMSIS-NN also requires updating tflite-micro.
@XenuIsWatching do you remember how you generated the third_party_static folders last time?

@XenuIsWatching
Copy link
Member

Updating CMSIS-NN also requires updating tflite-micro. @XenuIsWatching do you remember how you generated the third_party_static folders last time?

Yes, I put the info on how those were obtain in the commit message such as here zephyrproject-rtos/tflite-micro@c331051

@JordanYates
Copy link
Collaborator Author

Updating CMSIS-NN also requires updating tflite-micro. @XenuIsWatching do you remember how you generated the third_party_static folders last time?

Yes, I put the info on how those were obtain in the commit message such as here zephyrproject-rtos/tflite-micro@c331051

Origin: kissfft
License: BSD-3-Clause
URL: https://github.com/mborgerding/kissfft/archive/refs/tags/v130.zip
Commit: 918336beac80868ad3011cb283063bb224e3e5da
Patch File: third_party/kissfft/kissfft.patch
Purpose: Used by TensorFlow Lite Micro
Maintained-by: External

Tells me what was imported, but not how. Did you build some sample application which pulled down all the sources which were then copied, or did you manually find git commit hashes and download sources from Github? Where did the patch files come from?

@XenuIsWatching
Copy link
Member

Updating CMSIS-NN also requires updating tflite-micro. @XenuIsWatching do you remember how you generated the third_party_static folders last time?

Yes, I put the info on how those were obtain in the commit message such as here zephyrproject-rtos/tflite-micro@c331051

Origin: kissfft
License: BSD-3-Clause
URL: https://github.com/mborgerding/kissfft/archive/refs/tags/v130.zip
Commit: 918336beac80868ad3011cb283063bb224e3e5da
Patch File: third_party/kissfft/kissfft.patch
Purpose: Used by TensorFlow Lite Micro
Maintained-by: External

Tells me what was imported, but not how. Did you build some sample application which pulled down all the sources which were then copied, or did you manually find git commit hashes and download sources from Github? Where did the patch files come from?

These are the same files that are pulled in as apart of the tflite-micro build process.
https://github.com/tensorflow/tflite-micro/tree/main/tensorflow/lite/micro/tools/make

For example you can find the kissfft within here which is downloaded, unzipped, and had the patch file applied
https://github.com/tensorflow/tflite-micro/blob/71fba59b5bebfd64b48e167bfcb669fff568ec74/tensorflow/lite/micro/tools/make/kissfft_download.sh#L48

Skimming through the folder... I noticed that if you update tflite-micro, it looks like flatbuffers will need to be updated along with the patch file applied
https://github.com/tensorflow/tflite-micro/pull/2274/files#diff-c7caf59f2356917e38d2acda5785d137d47d5ec33302d219795efe88440b3b49

They were all manually pulled down from the download links

@XenuIsWatching
Copy link
Member

As something I just found digging though... it looks like they pull a specific 'hash' of cmsis-nn which is this https://github.com/tensorflow/tflite-micro/blob/71fba59b5bebfd64b48e167bfcb669fff568ec74/tensorflow/lite/micro/tools/make/ext_libs/cmsis_download.sh#L50

It only looks like that hash is 2 commits behind the v6.0.0, so it 'may' still work with the v6.0.0

As I typed this... I noticed those 2 commits are only updates to pdsc files :/

@JordanYates
Copy link
Collaborator Author

JordanYates commented Jun 13, 2024

Included the tflite-micro in this PR. I don't have permissions for the forked repo, and I don't think merging my commit into main or zephyr is the right approach. Would prefer a zephyr-v3.7 branch or similar.

Actual branch this is pointing at: https://github.com/JordanYates/tflite-micro/commits/zephyr-v3.7/

@JordanYates JordanYates force-pushed the 240610_cmsis_nn_600 branch 2 times, most recently from 2f1aad7 to 8963be4 Compare June 15, 2024 02:35
@JordanYates JordanYates changed the title manifest: update cmsis-nn to v6.0.0 manifest: update cmsis-nn to v6.0.0 & tflite-micro Jun 15, 2024
@XenuIsWatching
Copy link
Member

Included the tflite-micro in this PR. I don't have permissions for the forked repo, and I don't think merging my commit into main or zephyr is the right approach. Would prefer a zephyr-v3.7 branch or similar.

Actual branch this is pointing at: https://github.com/JordanYates/tflite-micro/commits/zephyr-v3.7/

looks like all the CI is passing now 👍 but I don't have admin rights to create a branch for zephyr-3.7. We may have to poke around to get that created

nashif
nashif previously approved these changes Jun 18, 2024
@nashif nashif added the TSC Topics that need TSC discussion label Jun 18, 2024
@nashif nashif added this to the v3.7.0 milestone Jun 27, 2024
@nashif
Copy link
Member

nashif commented Jun 27, 2024

Can we please get issues resolved before RC2 on Friday, this PR shall go in for 3.7 as per the TSC meeting today.

@@ -46,7 +46,7 @@ manifest:
groups:
- optional
- name: tflite-micro
revision: 1a34dcab41e7e0e667db72d6a40999c1ec9c510c
revision: /pull/6/head
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to remove leading slash /

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update to e1eecbee18aa8f7f0ad7e90f8b335564eb52c13f please

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on the reviews and updates in zephyrproject-rtos/tflite-micro#6,

the sha should be 48613f7ba1ffbda46ad771a77a35408f48f922e9 instead. (https://github.com/zephyrproject-rtos/tflite-micro’s zephyr branch should be updated accordingly)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ithinuel is correct, the original export commit had some duplicated files, please repush the last commit @nashif

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XenuIsWatching
XenuIsWatching previously approved these changes Jun 27, 2024
@nashif nashif dismissed stale reviews from stephanosio and ithinuel June 28, 2024 00:07

revisit please

stephanosio
stephanosio previously approved these changes Jun 28, 2024
@JordanYates JordanYates added the DNM This PR should not be merged (Do Not Merge) label Jun 28, 2024
Update cmsis-nn to version 6.0.0.
Revision history can be found at:
https://arm-software.github.io/CMSIS-NN/latest/rev_hist.html

Signed-off-by: Jordan Yates <[email protected]>
Update `tflite-micro` to the latest version.

Signed-off-by: Jordan Yates <[email protected]>
Add new sources for 4 bit function variants to build system.

Signed-off-by: Jordan Yates <[email protected]>
Specify the missing filter dimension that was the reason for the v6.0.0
version bump.

Signed-off-by: Jordan Yates <[email protected]>
Add `CONFIG_REQUIRES_FLOAT_PRINTF=y` to tflite-micro samples as in the
past the module was using its own `printf` implementation, but now uses
our logging infrastructure.

Signed-off-by: Jordan Yates <[email protected]>
Update the version update and link to the changelog.

Signed-off-by: Jordan Yates <[email protected]>
@JordanYates JordanYates removed the DNM This PR should not be merged (Do Not Merge) label Jun 28, 2024
@nashif nashif merged commit 5b0fb6e into zephyrproject-rtos:main Jun 28, 2024
23 of 24 checks passed
@JordanYates JordanYates deleted the 240610_cmsis_nn_600 branch June 28, 2024 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

8 participants