pkg: Update to tensorflow-lite:2.2.2, flatbuffers:1.12, gemmlowp:09.2018#16416
pkg: Update to tensorflow-lite:2.2.2, flatbuffers:1.12, gemmlowp:09.2018#16416sl1g18 wants to merge 3 commits intoRIOT-OS:masterfrom
Conversation
benpicco
left a comment
There was a problem hiding this comment.
Great, thank you for taking care of this!
We should really try to push #13911 forward.
Just one thing: please make sure commit messages are < 72 characters so they are not trunctaed & CI is happy.
pkg/tensorflow_lite: Update to v2.2.2
is entirely sufficient.
For gemmlowp you forgot the pkg/gemmlowp prefix in the commit message.
| PKG_NAME=flatbuffers | ||
| PKG_URL=https://github.com/google/flatbuffers | ||
| PKG_VERSION=v1.11.0 | ||
| PKG_VERSION=6df40a2471737b27271bdd9b900ab5f3aec746c7 |
There was a problem hiding this comment.
| PKG_VERSION=6df40a2471737b27271bdd9b900ab5f3aec746c7 | |
| PKG_VERSION=6df40a2471737b27271bdd9b900ab5f3aec746c7 # 1.12 |
You can also use tags instead of the commit hash if those are available.
| PKG_NAME=tensorflow-lite | ||
| PKG_URL=https://github.com/tensorflow/tensorflow | ||
| PKG_VERSION=1768c8f2fa155d4c6406e8ff7addf374c83de7ad | ||
| PKG_VERSION=d745ff2a48cebf18e847e8b602a744e97e058946 |
There was a problem hiding this comment.
| PKG_VERSION=d745ff2a48cebf18e847e8b602a744e97e058946 | |
| PKG_VERSION=d745ff2a48cebf18e847e8b602a744e97e058946 # 2.2.2 |
| PKG_NAME=gemmlowp | ||
| PKG_URL=https://github.com/google/gemmlowp | ||
| PKG_VERSION=dc69acdf61d7a64260ae0eb9c17421fef0488c02 | ||
| PKG_VERSION=719139ce755a0f31cbf1c37f7f98adcc7fc9f425 |
There was a problem hiding this comment.
| PKG_VERSION=719139ce755a0f31cbf1c37f7f98adcc7fc9f425 | |
| PKG_VERSION=719139ce755a0f31cbf1c37f7f98adcc7fc9f425 # 09.2018 |
Thank you! This was my first pull request so wasn't sure what to expect! Should I edit the commit messages to remedy the omission/shorten the messages? Best regards, |
|
Yes just run |
|
Looks like the build fails now on RISC-V. ( |
Very interesting, I'm wondering where the board builds diverge and why in this case? |
|
Thanks for trying to update tensorflow-lite package. Regarding the failure on RISC-V, you have to add a patch file similar to the existing one, but applied to "tensorflow/lite/kernels/internal/reference/reduce.h" and it seems another one is needed for "tensorflow/lite/micro/kernels/activation_utils.h" with fmin/fmax functions but I don't know how to fix it. |
It looks like it's because C++ 11 is required. Does RISC-V not support that with RIOT at the moment? I know that is the case with ESP32 |
|
Can you try with in flatbuffers sets this too. (I wonder why it's not the default given that we already compile with I think both RISC-V and esp32 toolchains should support C++11. |
Which made me conclude that it doesn't work with ESP32. I will try your suggestion, but I'm getting a different error when compiling it locally. Sergiu |
It might be your RISCV toolchain version. Use the riotbuild docker image and you'll get the same failure: DetailsThe RISCV toolchain version in riotbuild Docker image is 10.1.0: |
Normally it should but maybe the C++-11 support might vary depending on the toolchain.
This is already added in the flatbuffers Makefile.include file, so applied to the whole build, including tflite, since it depends on it. RIOT/pkg/flatbuffers/Makefile.include Lines 10 to 11 in 4db2a86 |
|
@aabadie maybe you can take over this one? |
Contribution description
This PR updates the tensorflow-lite pkg version to v2.2.2. This was done to support new operations and optimization features available in newer versions of tflite. Flatbuffers was updated to v1.12 and gemmlowp:09.2018 to ensure compatibility.
Testing procedure
I ran the pkg_tensorflow-lite test with the updated packages on the samr21-xpro. This returned the nominal output: 'Digit prediction: 7'
Issues/PRs references