You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to add tensorflow-lite to my Boot2Qt image for Jetson Nano.
My Yocto Release version is dunfell.
bitbake tensorflow-lite command builds the meta-neural-network/recipes-tensorflow/tensorflow-lite/tensorflow-lite_2.3.bb recipe. The recipe does not assign anything to SRCREV for git://github.com/tensorflow/tensorflow;destsuffix=git/;branch=r2.3;protocol=https in the SRC_URI. So, I created the following .bbappend.
In the .bbappend, I have set rev=v2.3.0 for the tensorflow repo. On running the bitbake tensorflow-lite do_compile task fails with the following error:
In file included from ./tensorflow/lite/core/api/op_resolver.h:20,
from ./tensorflow/lite/model_builder.h:27,
from ./tensorflow/lite/model.h:22,
from ./tensorflow/lite/c/c_api_internal.h:25,
from tensorflow/lite/c/c_api_experimental.cc:24:
./tensorflow/lite/schema/schema_generated.h: In function 'const char* tflite::EnumNameTensorType(tflite::TensorType)':
./tensorflow/lite/schema/schema_generated.h:422:20: error: 'IsOutRange' is not a member of 'flatbuffers'
The above error is followed by the same error on many lines in the schema_generated.h where IsOutRange is used. I have pasted a link to the log file at the bottom of the post.
While looking for a solution I came across this issue on tensorflow repo. In that issue it seems the reason behind the error was IsOutRange not being available in flatbuffers v1.11.0. They seem to have solved the issue by using flatbuffers v1.12.0 as can be seen in this commit which edits the third_party_downloads.inc file.
The ${BUILDDIR}/tmp/work/aarch64-poky-linux/tensorflow-lite/2.3-r0/git/tensorflow/lite/micro/tools/make/third_party_downloads.inc file has the following contents.
FLATBUFFERS_URL is being set like so via the statement defined in else: FLATBUFFERS_URL := "https://github.com/google/flatbuffers/archive/v1.12.0.tar.gz"
I cannot figure out why the do_compile task throws this error. I will appreciate any help.
Update 1:
${BUILDDIR}/build-jetson-nano-qspi-sd/tmp/work/aarch64-poky-linux/tensorflow-lite/2.3-r0/flatbuffers/src/flatc.cpp has the following line: #define FLATC_VERSION "1.11.0" So the 1.11.0 version of flatbuffers is being downloaded?
Update 2:
Changed the rev for flatbuffers in SRC_URI to git://github.com/google/flatbuffers;destsuffix=flatbuffers/;branch=master;rev=v1.12.0;protocol=https and now the build fails with the following error.
Expected Result
The tensorflow-lite package should get built.
How to Reproduce
As described in the issue description.
Further Information
A link to an output result showing the issue: log file
Exact OS version: Host for Yocto: Ubuntu 20.04. Yocto Release: dunfell.
The text was updated successfully, but these errors were encountered:
@octonout The recipe tensorflow-lite_2.3.bb is incomplete. Please use tensorflow-lite_1.15.2.bb instead.
Remove the erroneous file or add following lines in your local.conf
@octonout The recipe tensorflow-lite_2.3.bb is incomplete. Please use tensorflow-lite_1.15.2.bb instead.
Remove the erroneous file or add following lines in your local.conf
We'll fix the recipe, or any contribution is welcome!
tensorflow-lite_1.15.2.bb builds fine with the changes suggested by you. I think I still want to use tensorflow-lite r2.3. If I make any progress I will update.
Issue Description
I am trying to add tensorflow-lite to my Boot2Qt image for Jetson Nano.
My Yocto Release version is dunfell.
bitbake tensorflow-lite command builds the
meta-neural-network/recipes-tensorflow/tensorflow-lite/tensorflow-lite_2.3.bb
recipe. The recipe does not assign anything to SRCREV forgit://github.com/tensorflow/tensorflow;destsuffix=git/;branch=r2.3;protocol=https
in the SRC_URI. So, I created the following .bbappend.In the .bbappend, I have set rev=v2.3.0 for the tensorflow repo. On running the bitbake tensorflow-lite do_compile task fails with the following error:
The above error is followed by the same error on many lines in the schema_generated.h where IsOutRange is used. I have pasted a link to the log file at the bottom of the post.
While looking for a solution I came across this issue on tensorflow repo. In that issue it seems the reason behind the error was IsOutRange not being available in flatbuffers v1.11.0. They seem to have solved the issue by using flatbuffers v1.12.0 as can be seen in this commit which edits the third_party_downloads.inc file.
The ${BUILDDIR}/tmp/work/aarch64-poky-linux/tensorflow-lite/2.3-r0/git/tensorflow/lite/micro/tools/make/third_party_downloads.inc file has the following contents.
FLATBUFFERS_URL is being set like so via the statement defined in else:
FLATBUFFERS_URL := "https://github.com/google/flatbuffers/archive/v1.12.0.tar.gz"
I cannot figure out why the do_compile task throws this error. I will appreciate any help.
Update 1:
${BUILDDIR}/build-jetson-nano-qspi-sd/tmp/work/aarch64-poky-linux/tensorflow-lite/2.3-r0/flatbuffers/src/flatc.cpp has the following line:
#define FLATC_VERSION "1.11.0"
So the 1.11.0 version of flatbuffers is being downloaded?Update 2:
Changed the rev for flatbuffers in SRC_URI to
git://github.com/google/flatbuffers;destsuffix=flatbuffers/;branch=master;rev=v1.12.0;protocol=https
and now the build fails with the following error.Expected Result
The tensorflow-lite package should get built.
How to Reproduce
As described in the issue description.
Further Information
The text was updated successfully, but these errors were encountered: