package/flatbuffers: build position independent code
PATCH v2 1/8 package/flatbuffers: build position independent code
The upcoming tensorflow-lite package requires flatbuffers to be built with position independent code.
Fixes:/home/buildroot/buildroot/output/per-package/tensorflow-lite/host/bin/../lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: /home/buildroot/buildroot/output/per-package/tensorflow-lite/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libflatbuffers.a(util.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZN11flatbuffers11CharToUpperEc' which may bind externally can not be used when making a shared object; recompile with -fPIC
--- package/flatbuffers/flatbuffers.mk | 1 + 1 file changed, 1 insertion(+)
package/flatbuffers/flatbuffers.mk +1 -0
@@ -14,6 +14,7 @@ FLATBUFFERS_DEPENDENCIES = host-flatbuffers FLATBUFFERS_CONF_OPTS += \ -DCMAKE_CXX_FLAGS="-std=c++11" \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DFLATBUFFERS_BUILD_TESTS=OFF \ -DFLATBUFFERS_FLATC_EXECUTABLE=$(HOST_DIR)/bin/flatc
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 2/8 package/cpuinfo: new package
From: Stefan Hager <[email protected]>
This package is required by tensorflow-lite.
--- package/Config.in | 1 + package/cpuinfo/Config.in | 9 +++++++++ package/cpuinfo/cpuinfo.hash | 4 ++++ package/cpuinfo/cpuinfo.mk | 17 +++++++++++++++++ 4 files changed, 31 insertions(+) create mode 100644 package/cpuinfo/Config.in create mode 100644 package/cpuinfo/cpuinfo.hash create mode 100644 package/cpuinfo/cpuinfo.mk
package/Config.in +1 -0
@@ -465,6 +465,7 @@ endmenu source "package/cc-tool/Config.in" source "package/cdrkit/Config.in" source "package/cpuburn-arm/Config.in" + source "package/cpuinfo/Config.in" source "package/crucible/Config.in" source "package/cryptsetup/Config.in" source "package/cwiid/Config.in"
package/cpuinfo/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +config BR2_PACKAGE_CPUINFO + bool "cpuinfo" + depends on BR2_INSTALL_LIBSTDCPP + help + CPU INFOrmation library, cpuinfo is a library to detect + essential for performance optimization information about + host CPU. + + https://github.com/pytorch/cpuinfo
package/cpuinfo/cpuinfo.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally calculated +sha256 0936848904943381b2c01321101614776e43d583840ee0f3ceeea1e3fb7405f7 cpuinfo-de2fa78ebb431db98489e78603e4f77c1f6c5c57.tar.gz +# License files, locally calculated +sha256 8e7e60636c3aa0cb03571a1a841ce5697f9551ff92b3c426c2561613d15ade70 LICENSE
package/cpuinfo/cpuinfo.mk new file +17 -0
@@ -0,0 +1,17 @@ +################################################################################ +# +# cpuinfo +# +################################################################################ + +CPUINFO_VERSION = de2fa78ebb431db98489e78603e4f77c1f6c5c57 +CPUINFO_SITE = $(call github,pytorch,cpuinfo,$(CPUINFO_VERSION)) +CPUINFO_LICENSE = BSD-2-Clause +CPUINFO_LICENSE_FILES = LICENSE +CPUINFO_INSTALL_STAGING = YES +CPUINFO_CONF_OPTS = \ + -DCPUINFO_BUILD_UNIT_TESTS=OFF \ + -DCPUINFO_BUILD_MOCK_TESTS=OFF \ + -DCPUINFO_BUILD_BENCHMARKS=OFF + +$(eval $(cmake-package))
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 2/8] package/cpuinfo: new package
From: James Hilliard <[email protected]>
Sent: Monday, November 28, 2022 18:58
To: [email protected] <[email protected]>
Cc: Thomas Petazzoni <[email protected]>; Fabrice Fontaine <[email protected]>; Samuel Martin <[email protected]>; Hager Stefan <[email protected]>; James Hilliard <[email protected]>
Subject: [PATCH v2 2/8] package/cpuinfo: new package
From: Stefan Hager <[email protected]>
This package is required by tensorflow-lite.
---
package/Config.in | 1 + package/cpuinfo/Config.in | 9 +++++++++ package/cpuinfo/cpuinfo.hash | 4 ++++ package/cpuinfo/cpuinfo.mk | 17 +++++++++++++++++
4 files changed, 31 insertions(+)
create mode 100644 package/cpuinfo/Config.in
create mode 100644 package/cpuinfo/cpuinfo.hash
create mode 100644 package/cpuinfo/cpuinfo.mk
package/Config.in +0 -0
@@ -465,6 +465,7 @@ endmenu
source "package/cc-tool/Config.in"
source "package/cdrkit/Config.in"
source "package/cpuburn-arm/Config.in"
+ source "package/cpuinfo/Config.in"
source "package/crucible/Config.in"
source "package/cryptsetup/Config.in"
source "package/cwiid/Config.in"
package/cpuinfo/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +config BR2_PACKAGE_CPUINFO + bool "cpuinfo" + depends on BR2_INSTALL_LIBSTDCPP + help + CPU INFOrmation library, cpuinfo is a library to detect + essential for performance optimization information about + host CPU. + + https://github.com/pytorch/cpuinfo
package/cpuinfo/cpuinfo.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally calculated +sha256 0936848904943381b2c01321101614776e43d583840ee0f3ceeea1e3fb7405f7 cpuinfo-de2fa78ebb431db98489e78603e4f77c1f6c5c57.tar.gz +# License files, locally calculated +sha256 8e7e60636c3aa0cb03571a1a841ce5697f9551ff92b3c426c2561613d15ade70 LICENSE
package/cpuinfo/cpuinfo.mk new file +17 -0
@@ -0,0 +1,17 @@ +################################################################################ +# +# cpuinfo +# +################################################################################ + +CPUINFO_VERSION = de2fa78ebb431db98489e78603e4f77c1f6c5c57 +CPUINFO_SITE = $(call github,pytorch,cpuinfo,$(CPUINFO_VERSION)) +CPUINFO_LICENSE = BSD-2-Clause +CPUINFO_LICENSE_FILES = LICENSE +CPUINFO_INSTALL_STAGING = YES +CPUINFO_CONF_OPTS = \ + -DCPUINFO_BUILD_UNIT_TESTS=OFF \ + -DCPUINFO_BUILD_MOCK_TESTS=OFF \ + -DCPUINFO_BUILD_BENCHMARKS=OFF + +$(eval $(cmake-package))
Signature · 1 line
2.34.1
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 2/8] package/cpuinfo: new package
In reply to James HilliardHi James, hi Stefan,
thanks a lot for the whole tensorflow lite contribution Just a few comments here and there.
thanks
Gilles.
Quoted 9 lines · James Hilliard
From: Stefan Hager <[email protected]>
This package is required by tensorflow-lite.
Signed-off-by Stefan Hager <[email protected]>Signed-off-by James Hilliard <[email protected]>--- package/Config.in | 1 +
Don't you want to be maintainers for this package? If so, you should update the DEVELOPERS file.
Quoted 13 lines
package/cpuinfo/Config.in | 9 +++++++++ package/cpuinfo/cpuinfo.hash | 4 ++++ package/cpuinfo/cpuinfo.mk | 17 +++++++++++++++++ 4 files changed, 31 insertions(+) create mode 100644 package/cpuinfo/Config.in create mode 100644 package/cpuinfo/cpuinfo.hash create mode 100644 package/cpuinfo/cpuinfo.mkpackage/Config.in +0
-0
package/Config.in endmenu · line 468
Quoted 4 lines
package/Config.in +1
-0@@ -465,6 +465,7 @@ endmenu source "package/cc-tool/Config.in" source "package/cdrkit/Config.in" source "package/cpuburn-arm/Config.in" + source "package/cpuinfo/Config.in"
If it is a library, I would put this package under Libraries -> Hardware handling
Quoted 54 lines
package/Config.in +0
-0source "package/crucible/Config.in" source "package/cryptsetup/Config.in" source "package/cwiid/Config.in"package/cpuinfo/Config.in new file +9
-0@@ -0,0 +1,9 @@ +config BR2_PACKAGE_CPUINFO + bool "cpuinfo" + depends on BR2_INSTALL_LIBSTDCPP + help + CPU INFOrmation library, cpuinfo is a library to detect + essential for performance optimization information about + host CPU. + + https://github.com/pytorch/cpuinfopackage/cpuinfo/cpuinfo.hash new file +4
-0@@ -0,0 +1,4 @@ +# Locally calculated +sha256 0936848904943381b2c01321101614776e43d583840ee0f3ceeea1e3fb7405f7 cpuinfo-de2fa78ebb431db98489e78603e4f77c1f6c5c57.tar.gz +# License files, locally calculated +sha256 8e7e60636c3aa0cb03571a1a841ce5697f9551ff92b3c426c2561613d15ade70 LICENSEpackage/cpuinfo/cpuinfo.mk new file +17
-1@@ -0,0 +1,17 @@ +################################################################################ +# +# cpuinfo +# +################################################################################ + +CPUINFO_VERSION = de2fa78ebb431db98489e78603e4f77c1f6c5c57 +CPUINFO_SITE = $(call github,pytorch,cpuinfo,$(CPUINFO_VERSION)) +CPUINFO_LICENSE = BSD-2-Clause +CPUINFO_LICENSE_FILES = LICENSE +CPUINFO_INSTALL_STAGING = YES +CPUINFO_CONF_OPTS = \ + -DCPUINFO_BUILD_UNIT_TESTS=OFF \ + -DCPUINFO_BUILD_MOCK_TESTS=OFF \ + -DCPUINFO_BUILD_BENCHMARKS=OFF + +$(eval $(cmake-package)) --2.34.1
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 3/8 package/ruy: new package
In reply to James HilliardFrom: Stefan Hager <[email protected]>
This package is required by tensorflow-lite.
--- package/Config.in | 1 + package/ruy/Config.in | 11 +++++++++++ package/ruy/ruy.hash | 4 ++++ package/ruy/ruy.mk | 18 ++++++++++++++++++ 4 files changed, 34 insertions(+) create mode 100644 package/ruy/Config.in create mode 100644 package/ruy/ruy.hash create mode 100644 package/ruy/ruy.mk
package/Config.in +1 -0
@@ -2095,6 +2095,7 @@ endif source "package/qhull/Config.in" source "package/qlibc/Config.in" source "package/riemann-c-client/Config.in" + source "package/ruy/Config.in" source "package/shapelib/Config.in" source "package/skalibs/Config.in" source "package/sphinxbase/Config.in"
package/ruy/Config.in new file +11 -0
@@ -0,0 +1,11 @@ +config BR2_PACKAGE_RUY + bool "ruy" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_CPUINFO + help + Ruy is a matrix multiplication library. Its focus is to cover + the matrix multiplication needs of neural network inference + engines. Its initial user has been TensorFlow Lite, where it + is used by default on the ARM CPU architecture. + + https://github.com/google/ruy
package/ruy/ruy.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally calculated +sha256 4da8572946007603378c5d0280f48c5b77f4d38763209f5306b57c7513d9a82e ruy-3168a5c8f4c447fd8cea94078121ee2e2cd87df0.tar.gz +# License files, locally calculated +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE
package/ruy/ruy.mk new file +18 -0
@@ -0,0 +1,18 @@ +################################################################################ +# +# ruy +# +################################################################################ + +RUY_VERSION = 3168a5c8f4c447fd8cea94078121ee2e2cd87df0 +RUY_SITE = $(call github,google,ruy,$(RUY_VERSION)) +RUY_LICENSE = Apache-2.0 +RUY_LICENSE_FILES = LICENSE +RUY_INSTALL_STAGING = YES +RUY_DEPENDENCIES = cpuinfo +RUY_CONF_OPTS = \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DRUY_FIND_CPUINFO=ON \ + -DRUY_MINIMAL_BUILD=ON + +$(eval $(cmake-package))
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 3/8] package/ruy: new package
From: James Hilliard <[email protected]>
Sent: Monday, November 28, 2022 18:58
To: [email protected] <[email protected]>
Cc: Thomas Petazzoni <[email protected]>; Fabrice Fontaine <[email protected]>; Samuel Martin <[email protected]>; Hager Stefan <[email protected]>; James Hilliard <[email protected]>
Subject: [PATCH v2 3/8] package/ruy: new package
From: Stefan Hager <[email protected]>
This package is required by tensorflow-lite.
---
package/Config.in | 1 +
package/ruy/Config.in | 11 +++++++++++
package/ruy/ruy.hash | 4 ++++
package/ruy/ruy.mk | 18 ++++++++++++++++++
4 files changed, 34 insertions(+)
create mode 100644 package/ruy/Config.in
create mode 100644 package/ruy/ruy.hash
create mode 100644 package/ruy/ruy.mk
package/Config.in +0 -0
@@ -2095,6 +2095,7 @@ endif
source "package/qhull/Config.in" source "package/qlibc/Config.in" source "package/riemann-c-client/Config.in" + source "package/ruy/Config.in" source "package/shapelib/Config.in" source "package/skalibs/Config.in" source "package/sphinxbase/Config.in"
package/ruy/Config.in new file +11 -0
@@ -0,0 +1,11 @@ +config BR2_PACKAGE_RUY + bool "ruy" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_CPUINFO + help + Ruy is a matrix multiplication library. Its focus is to cover + the matrix multiplication needs of neural network inference + engines. Its initial user has been TensorFlow Lite, where it + is used by default on the ARM CPU architecture. + + https://github.com/google/ruy
package/ruy/ruy.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally calculated +sha256 4da8572946007603378c5d0280f48c5b77f4d38763209f5306b57c7513d9a82e ruy-3168a5c8f4c447fd8cea94078121ee2e2cd87df0.tar.gz +# License files, locally calculated +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE
package/ruy/ruy.mk new file +18 -0
@@ -0,0 +1,18 @@ +################################################################################ +# +# ruy +# +################################################################################ + +RUY_VERSION = 3168a5c8f4c447fd8cea94078121ee2e2cd87df0 +RUY_SITE = $(call github,google,ruy,$(RUY_VERSION)) +RUY_LICENSE = Apache-2.0 +RUY_LICENSE_FILES = LICENSE +RUY_INSTALL_STAGING = YES +RUY_DEPENDENCIES = cpuinfo +RUY_CONF_OPTS = \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DRUY_FIND_CPUINFO=ON \ + -DRUY_MINIMAL_BUILD=ON + +$(eval $(cmake-package))
Signature · 1 line
2.34.1
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 3/8] package/ruy: new package
In reply to James HilliardHi James Stefan,
Quoted 9 lines · James Hilliard
From: Stefan Hager <[email protected]>
This package is required by tensorflow-lite.
Signed-off-by Stefan Hager <[email protected]>Signed-off-by James Hilliard <[email protected]>--- package/Config.in | 1 +
If you want to be maintainers for this package, do not forget to update the DEVELOPERS file.
Quoted 26 lines
package/ruy/Config.in | 11 +++++++++++ package/ruy/ruy.hash | 4 ++++ package/ruy/ruy.mk | 18 ++++++++++++++++++ 4 files changed, 34 insertions(+) create mode 100644 package/ruy/Config.in create mode 100644 package/ruy/ruy.hash create mode 100644 package/ruy/ruy.mkpackage/Config.in +1
-0@@ -2095,6 +2095,7 @@ endif source "package/qhull/Config.in" source "package/qlibc/Config.in" source "package/riemann-c-client/Config.in" + source "package/ruy/Config.in" source "package/shapelib/Config.in" source "package/skalibs/Config.in" source "package/sphinxbase/Config.in"package/ruy/Config.in new file +0
-0
package/ruy/Config.in line 3
Quoted 3 lines
package/ruy/Config.in new file +3
-0@@ -0,0 +1,11 @@ +config BR2_PACKAGE_RUY + bool "ruy" + depends on BR2_INSTALL_LIBSTDCPP
The CMakeLists.txt mentions a dependency on C++14. Can you set the minimum GCC version required? (either 4.9 or 5)
package/ruy/Config.in line 11
Quoted 8 lines
package/ruy/Config.in new file +8
-0+ select BR2_PACKAGE_CPUINFO + help + Ruy is a matrix multiplication library. Its focus is to cover + the matrix multiplication needs of neural network inference + engines. Its initial user has been TensorFlow Lite, where it + is used by default on the ARM CPU architecture. + + https://github.com/google/ruy
Please mention the dependencies (C++ and C++ version)
Quoted 37 lines
package/ruy/ruy.hash new file +4
-0@@ -0,0 +1,4 @@ +# Locally calculated +sha256 4da8572946007603378c5d0280f48c5b77f4d38763209f5306b57c7513d9a82e ruy-3168a5c8f4c447fd8cea94078121ee2e2cd87df0.tar.gz +# License files, locally calculated +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSEpackage/ruy/ruy.mk new file +18
-1@@ -0,0 +1,18 @@ +################################################################################ +# +# ruy +# +################################################################################ + +RUY_VERSION = 3168a5c8f4c447fd8cea94078121ee2e2cd87df0 +RUY_SITE = $(call github,google,ruy,$(RUY_VERSION)) +RUY_LICENSE = Apache-2.0 +RUY_LICENSE_FILES = LICENSE +RUY_INSTALL_STAGING = YES +RUY_DEPENDENCIES = cpuinfo +RUY_CONF_OPTS = \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DRUY_FIND_CPUINFO=ON \ + -DRUY_MINIMAL_BUILD=ON + +$(eval $(cmake-package)) --2.34.1
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 4/8 package/gemmlowp: new package
In reply to James HilliardFrom: Stefan Hager <[email protected]>
This package is required by tensorflow-lite.
--- package/Config.in | 1 + package/gemmlowp/Config.in | 7 +++++++ package/gemmlowp/gemmlowp.hash | 4 ++++ package/gemmlowp/gemmlowp.mk | 15 +++++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 package/gemmlowp/Config.in create mode 100644 package/gemmlowp/gemmlowp.hash create mode 100644 package/gemmlowp/gemmlowp.mk
package/Config.in +1 -0
@@ -1994,6 +1994,7 @@ menu "Other" source "package/flatcc/Config.in" source "package/gconf/Config.in" source "package/gdal/Config.in" + source "package/gemmlowp/Config.in" source "package/gflags/Config.in" source "package/gli/Config.in" source "package/glibmm/Config.in"
package/gemmlowp/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_GEMMLOWP + bool "gemmlowp" + depends on BR2_INSTALL_LIBSTDCPP + help + Low-precision matrix multiplication. + + https://github.com/google/gemmlowp
package/gemmlowp/gemmlowp.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally calculated +sha256 cc8a22b6f071c3781e6b4b72654c89b1cdc198e72ebadebb17638eac205344c1 gemmlowp-08e4bb339e34017a0835269d4a37c4ea04d15a69.tar.gz +# License files, locally calculated +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE
package/gemmlowp/gemmlowp.mk new file +15 -0
@@ -0,0 +1,15 @@ +################################################################################ +# +# gemmlowp +# +################################################################################ + +GEMMLOWP_VERSION = 08e4bb339e34017a0835269d4a37c4ea04d15a69 +GEMMLOWP_SITE = $(call github,google,gemmlowp,$(GEMMLOWP_VERSION)) +GEMMLOWP_LICENSE = Apache-2.0 +GEMMLOWP_LICENSE_FILES = LICENSE +GEMMLOWP_INSTALL_STAGING = YES +GEMMLOWP_INSTALL_TARGET = NO +GEMMLOWP_SUBDIR = contrib + +$(eval $(cmake-package))
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 4/8] package/gemmlowp: new package
From: James Hilliard <[email protected]>
Sent: Monday, November 28, 2022 18:58
To: [email protected] <[email protected]>
Cc: Thomas Petazzoni <[email protected]>; Fabrice Fontaine <[email protected]>; Samuel Martin <[email protected]>; Hager Stefan <[email protected]>; James Hilliard <[email protected]>
Subject: [PATCH v2 4/8] package/gemmlowp: new package
From: Stefan Hager <[email protected]>
This package is required by tensorflow-lite.
---
package/Config.in | 1 + package/gemmlowp/Config.in | 7 +++++++ package/gemmlowp/gemmlowp.hash | 4 ++++ package/gemmlowp/gemmlowp.mk | 15 +++++++++++++++
4 files changed, 27 insertions(+)
create mode 100644 package/gemmlowp/Config.in create mode 100644 package/gemmlowp/gemmlowp.hash create mode 100644 package/gemmlowp/gemmlowp.mk
package/Config.in +0 -0
@@ -1994,6 +1994,7 @@ menu "Other"
source "package/flatcc/Config.in"
source "package/gconf/Config.in"
source "package/gdal/Config.in"
+ source "package/gemmlowp/Config.in"
source "package/gflags/Config.in"
source "package/gli/Config.in"
source "package/glibmm/Config.in"
package/gemmlowp/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_GEMMLOWP + bool "gemmlowp" + depends on BR2_INSTALL_LIBSTDCPP + help + Low-precision matrix multiplication. + + https://github.com/google/gemmlowp
package/gemmlowp/gemmlowp.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally calculated +sha256 cc8a22b6f071c3781e6b4b72654c89b1cdc198e72ebadebb17638eac205344c1 gemmlowp-08e4bb339e34017a0835269d4a37c4ea04d15a69.tar.gz +# License files, locally calculated +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE
package/gemmlowp/gemmlowp.mk new file +15 -0
@@ -0,0 +1,15 @@ +################################################################################ +# +# gemmlowp +# +################################################################################ + +GEMMLOWP_VERSION = 08e4bb339e34017a0835269d4a37c4ea04d15a69 +GEMMLOWP_SITE = $(call github,google,gemmlowp,$(GEMMLOWP_VERSION)) +GEMMLOWP_LICENSE = Apache-2.0 +GEMMLOWP_LICENSE_FILES = LICENSE +GEMMLOWP_INSTALL_STAGING = YES +GEMMLOWP_INSTALL_TARGET = NO +GEMMLOWP_SUBDIR = contrib + +$(eval $(cmake-package))
Signature · 1 line
2.34.1
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 4/8] package/gemmlowp: new package
In reply to James HilliardHi James, Hi Stefan,
Quoted 9 lines · James Hilliard
From: Stefan Hager <[email protected]>
This package is required by tensorflow-lite.
Signed-off-by Stefan Hager <[email protected]>Signed-off-by James Hilliard <[email protected]>--- package/Config.in | 1 +
If you want to be maintainers for this package, do not forget to update the DEVELOPERS file.
Quoted 26 lines
package/gemmlowp/Config.in | 7 +++++++ package/gemmlowp/gemmlowp.hash | 4 ++++ package/gemmlowp/gemmlowp.mk | 15 +++++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 package/gemmlowp/Config.in create mode 100644 package/gemmlowp/gemmlowp.hash create mode 100644 package/gemmlowp/gemmlowp.mkpackage/Config.in +1
-0@@ -1994,6 +1994,7 @@ menu "Other" source "package/flatcc/Config.in" source "package/gconf/Config.in" source "package/gdal/Config.in" + source "package/gemmlowp/Config.in" source "package/gflags/Config.in" source "package/gli/Config.in" source "package/glibmm/Config.in"package/gemmlowp/Config.in new file +0
-0
package/gemmlowp/Config.in line 3
Quoted 3 lines
package/gemmlowp/Config.in new file +3
-0@@ -0,0 +1,7 @@ +config BR2_PACKAGE_GEMMLOWP + bool "gemmlowp" + depends on BR2_INSTALL_LIBSTDCPP
README.md mentions a C++11 dependency. Can you set the minimum gcc version required? (4.8)
package/gemmlowp/Config.in line 7
Quoted 4 lines
package/gemmlowp/Config.in new file +4
-0+ help + Low-precision matrix multiplication. + + https://github.com/google/gemmlowp
Please mention the dependencies (C++ and C++ version)
Quoted 34 lines
package/gemmlowp/gemmlowp.hash new file +4
-0@@ -0,0 +1,4 @@ +# Locally calculated +sha256 cc8a22b6f071c3781e6b4b72654c89b1cdc198e72ebadebb17638eac205344c1 gemmlowp-08e4bb339e34017a0835269d4a37c4ea04d15a69.tar.gz +# License files, locally calculated +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSEpackage/gemmlowp/gemmlowp.mk new file +15
-1@@ -0,0 +1,15 @@ +################################################################################ +# +# gemmlowp +# +################################################################################ + +GEMMLOWP_VERSION = 08e4bb339e34017a0835269d4a37c4ea04d15a69 +GEMMLOWP_SITE = $(call github,google,gemmlowp,$(GEMMLOWP_VERSION)) +GEMMLOWP_LICENSE = Apache-2.0 +GEMMLOWP_LICENSE_FILES = LICENSE +GEMMLOWP_INSTALL_STAGING = YES +GEMMLOWP_INSTALL_TARGET = NO +GEMMLOWP_SUBDIR = contrib + +$(eval $(cmake-package)) --2.34.1
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
thanks
Gilles.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 5/8 package/neon-2-sse: new package
In reply to James HilliardThis package is required by tensorflow-lite.
--- package/Config.in | 1 + package/neon-2-sse/Config.in | 9 +++++++++ package/neon-2-sse/neon-2-sse.hash | 4 ++++ package/neon-2-sse/neon-2-sse.mk | 14 ++++++++++++++ 4 files changed, 28 insertions(+) create mode 100644 package/neon-2-sse/Config.in create mode 100644 package/neon-2-sse/neon-2-sse.hash create mode 100644 package/neon-2-sse/neon-2-sse.mk
package/Config.in +1 -0
@@ -2086,6 +2086,7 @@ endif source "package/msgpack/Config.in" source "package/musl-compat-headers/Config.in" source "package/musl-fts/Config.in" + source "package/neon-2-sse/Config.in" source "package/openblas/Config.in" source "package/orc/Config.in" source "package/p11-kit/Config.in"
package/neon-2-sse/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +config BR2_PACKAGE_NEON_2_SSE + bool "neon-2-sse" + help + The platform independent header allowing to compile any + C/C++ code containing ARM NEON intrinsic functions for + x86 target systems using SIMD up to SSE4 intrinsic + functions. + + https://github.com/intel/ARM_NEON_2_x86_SSE
package/neon-2-sse/neon-2-sse.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally calculated +sha256 019fbc7ec25860070a1d90e12686fc160cfb33e22aa063c80f52b363f1361e9d neon-2-sse-a15b489e1222b2087007546b4912e21293ea86ff.tar.gz +# License files, locally calculated +sha256 7022f51b439a5915e933ecc270c83e24ca0cb2cceeb08b0132dcd4dbb03ed2dc LICENSE
package/neon-2-sse/neon-2-sse.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# neon-2-sse +# +################################################################################ + +NEON_2_SSE_VERSION = a15b489e1222b2087007546b4912e21293ea86ff +NEON_2_SSE_SITE = $(call github,intel,ARM_NEON_2_x86_SSE,$(NEON_2_SSE_VERSION)) +NEON_2_SSE_LICENSE = BSD-2-Clause +NEON_2_SSE_LICENSE_FILES = LICENSE +NEON_2_SSE_INSTALL_STAGING = YES +NEON_2_SSE_INSTALL_TARGET = NO + +$(eval $(cmake-package))
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 5/8] package/neon-2-sse: new package
From: James Hilliard <[email protected]>
Sent: Monday, November 28, 2022 18:58
To: [email protected] <[email protected]>
Cc: Thomas Petazzoni <[email protected]>; Fabrice Fontaine <[email protected]>; Samuel Martin <[email protected]>; Hager Stefan <[email protected]>; James Hilliard <[email protected]>
Subject: [PATCH v2 5/8] package/neon-2-sse: new package
This package is required by tensorflow-lite.
---
package/Config.in | 1 + package/neon-2-sse/Config.in | 9 +++++++++ package/neon-2-sse/neon-2-sse.hash | 4 ++++ package/neon-2-sse/neon-2-sse.mk | 14 ++++++++++++++
4 files changed, 28 insertions(+)
create mode 100644 package/neon-2-sse/Config.in create mode 100644 package/neon-2-sse/neon-2-sse.hash create mode 100644 package/neon-2-sse/neon-2-sse.mk
package/Config.in +0 -0
@@ -2086,6 +2086,7 @@ endif
source "package/msgpack/Config.in" source "package/musl-compat-headers/Config.in" source "package/musl-fts/Config.in"
+ source "package/neon-2-sse/Config.in" source "package/openblas/Config.in" source "package/orc/Config.in"
source "package/p11-kit/Config.in"
package/neon-2-sse/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +config BR2_PACKAGE_NEON_2_SSE + bool "neon-2-sse" + help + The platform independent header allowing to compile any + C/C++ code containing ARM NEON intrinsic functions for + x86 target systems using SIMD up to SSE4 intrinsic + functions. + + https://github.com/intel/ARM_NEON_2_x86_SSE
package/neon-2-sse/neon-2-sse.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally calculated +sha256 019fbc7ec25860070a1d90e12686fc160cfb33e22aa063c80f52b363f1361e9d neon-2-sse-a15b489e1222b2087007546b4912e21293ea86ff.tar.gz +# License files, locally calculated +sha256 7022f51b439a5915e933ecc270c83e24ca0cb2cceeb08b0132dcd4dbb03ed2dc LICENSE
package/neon-2-sse/neon-2-sse.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# neon-2-sse +# +################################################################################ + +NEON_2_SSE_VERSION = a15b489e1222b2087007546b4912e21293ea86ff +NEON_2_SSE_SITE = $(call github,intel,ARM_NEON_2_x86_SSE,$(NEON_2_SSE_VERSION)) +NEON_2_SSE_LICENSE = BSD-2-Clause +NEON_2_SSE_LICENSE_FILES = LICENSE +NEON_2_SSE_INSTALL_STAGING = YES +NEON_2_SSE_INSTALL_TARGET = NO + +$(eval $(cmake-package))
Signature · 1 line
2.34.1
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 5/8] package/neon-2-sse: new package
In reply to James HilliardHi James, Hi Stefan,
Quoted 6 lines · James Hilliard
This package is required by tensorflow-lite.
Signed-off-by James Hilliard <[email protected]>--- package/Config.in | 1 +
If you want to be maintainers for this package, do not forget to update the DEVELOPERS file.
Quoted 68 lines
package/neon-2-sse/Config.in | 9 +++++++++ package/neon-2-sse/neon-2-sse.hash | 4 ++++ package/neon-2-sse/neon-2-sse.mk | 14 ++++++++++++++ 4 files changed, 28 insertions(+) create mode 100644 package/neon-2-sse/Config.in create mode 100644 package/neon-2-sse/neon-2-sse.hash create mode 100644 package/neon-2-sse/neon-2-sse.mkpackage/Config.in +1
-0@@ -2086,6 +2086,7 @@ endif source "package/msgpack/Config.in" source "package/musl-compat-headers/Config.in" source "package/musl-fts/Config.in" + source "package/neon-2-sse/Config.in" source "package/openblas/Config.in" source "package/orc/Config.in" source "package/p11-kit/Config.in"package/neon-2-sse/Config.in new file +9
-0@@ -0,0 +1,9 @@ +config BR2_PACKAGE_NEON_2_SSE + bool "neon-2-sse" + help + The platform independent header allowing to compile any + C/C++ code containing ARM NEON intrinsic functions for + x86 target systems using SIMD up to SSE4 intrinsic + functions. + + https://github.com/intel/ARM_NEON_2_x86_SSEpackage/neon-2-sse/neon-2-sse.hash new file +4
-0@@ -0,0 +1,4 @@ +# Locally calculated +sha256 019fbc7ec25860070a1d90e12686fc160cfb33e22aa063c80f52b363f1361e9d neon-2-sse-a15b489e1222b2087007546b4912e21293ea86ff.tar.gz +# License files, locally calculated +sha256 7022f51b439a5915e933ecc270c83e24ca0cb2cceeb08b0132dcd4dbb03ed2dc LICENSEpackage/neon-2-sse/neon-2-sse.mk new file +14
-1@@ -0,0 +1,14 @@ +################################################################################ +# +# neon-2-sse +# +################################################################################ + +NEON_2_SSE_VERSION = a15b489e1222b2087007546b4912e21293ea86ff +NEON_2_SSE_SITE = $(call github,intel,ARM_NEON_2_x86_SSE,$(NEON_2_SSE_VERSION)) +NEON_2_SSE_LICENSE = BSD-2-Clause +NEON_2_SSE_LICENSE_FILES = LICENSE +NEON_2_SSE_INSTALL_STAGING = YES +NEON_2_SSE_INSTALL_TARGET = NO + +$(eval $(cmake-package)) --2.34.1
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
thanks
Gilles.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 6/8 package/fft2d: new package
In reply to James HilliardFrom: Stefan Hager <[email protected]>
This package is required by tensorflow-lite.
This package doesn't provide a conventional install mechanism so we need to install it manually.
--- package/Config.in | 1 + package/fft2d/Config.in | 7 +++++++ package/fft2d/fft2d.hash | 4 ++++ package/fft2d/fft2d.mk | 22 ++++++++++++++++++++++ 4 files changed, 34 insertions(+) create mode 100644 package/fft2d/Config.in create mode 100644 package/fft2d/fft2d.hash create mode 100644 package/fft2d/fft2d.mk
package/Config.in +1 -0
@@ -1988,6 +1988,7 @@ menu "Other" source "package/elfutils/Config.in" source "package/ell/Config.in" source "package/falcosecurity-libs/Config.in" + source "package/fft2d/Config.in" source "package/fftw/Config.in" source "package/flann/Config.in" source "package/flatbuffers/Config.in"
package/fft2d/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_FFT2D + bool "fft2d" + help + This is a package to calculate Discrete Fourier/Cosine/Sine + Transforms of 2,3-dimensional sequences of length 2^N. + + http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html
package/fft2d/fft2d.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally calculated +sha256 ada7e99087c4ed477bfdf11413f2ba8db8a840ba9bbf8ac94f4f3972e2a7cec9 fft2d.tgz +# License files, locally calculated +sha256 0b2a2082537735a2a576dbec2e8f9c1a09812eac6df6a389502a6ba860072906 readme2d.txt
package/fft2d/fft2d.mk new file +22 -0
@@ -0,0 +1,22 @@ +################################################################################ +# +# fft2d +# +################################################################################ + +FFT2D_VERSION = 2006.12.28 +FFT2D_SITE = https://www.kurims.kyoto-u.ac.jp/~ooura +FFT2D_SOURCE = fft2d.tgz +FFT2D_LICENSE = readme2d.txt +FFT2D_LICENSE_FILES = readme2d.txt +FFT2D_INSTALL_STAGING = YES +FFT2D_INSTALL_TARGET = NO + +define FFT2D_INSTALL_STAGING_CMDS + mkdir -p $(STAGING_DIR)/usr/include/fft2d + $(INSTALL) -m 0644 $(@D)/*.c $(STAGING_DIR)/usr/include/fft2d + $(INSTALL) -m 0644 $(@D)/*.f $(STAGING_DIR)/usr/include/fft2d + $(INSTALL) -m 0644 $(@D)/*.h $(STAGING_DIR)/usr/include/fft2d +endef + +$(eval $(generic-package))
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 6/8] package/fft2d: new package
From: James Hilliard <[email protected]>
Sent: Monday, November 28, 2022 18:58
To: [email protected] <[email protected]>
Cc: Thomas Petazzoni <[email protected]>; Fabrice Fontaine <[email protected]>; Samuel Martin <[email protected]>; Hager Stefan <[email protected]>; James Hilliard <[email protected]>
Subject: [PATCH v2 6/8] package/fft2d: new package
From: Stefan Hager <[email protected]>
This package is required by tensorflow-lite.
This package doesn't provide a conventional install mechanism so we need to install it manually.
---
package/Config.in | 1 + package/fft2d/Config.in | 7 +++++++ package/fft2d/fft2d.hash | 4 ++++ package/fft2d/fft2d.mk | 22 ++++++++++++++++++++++
4 files changed, 34 insertions(+)
create mode 100644 package/fft2d/Config.in
create mode 100644 package/fft2d/fft2d.hash
create mode 100644 package/fft2d/fft2d.mk
package/Config.in +0 -0
@@ -1988,6 +1988,7 @@ menu "Other"
source "package/elfutils/Config.in" source "package/ell/Config.in" source "package/falcosecurity-libs/Config.in" + source "package/fft2d/Config.in" source "package/fftw/Config.in" source "package/flann/Config.in" source "package/flatbuffers/Config.in"
package/fft2d/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_FFT2D + bool "fft2d" + help + This is a package to calculate Discrete Fourier/Cosine/Sine + Transforms of 2,3-dimensional sequences of length 2^N. + + http://www.kurims.kyoto-u.ac.jp/~ooura/fft.html
package/fft2d/fft2d.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally calculated +sha256 ada7e99087c4ed477bfdf11413f2ba8db8a840ba9bbf8ac94f4f3972e2a7cec9 fft2d.tgz +# License files, locally calculated +sha256 0b2a2082537735a2a576dbec2e8f9c1a09812eac6df6a389502a6ba860072906 readme2d.txt
package/fft2d/fft2d.mk new file +22 -0
@@ -0,0 +1,22 @@ +################################################################################ +# +# fft2d +# +################################################################################ + +FFT2D_VERSION = 2006.12.28 +FFT2D_SITE = https://www.kurims.kyoto-u.ac.jp/~ooura +FFT2D_SOURCE = fft2d.tgz +FFT2D_LICENSE = readme2d.txt +FFT2D_LICENSE_FILES = readme2d.txt +FFT2D_INSTALL_STAGING = YES +FFT2D_INSTALL_TARGET = NO + +define FFT2D_INSTALL_STAGING_CMDS + mkdir -p $(STAGING_DIR)/usr/include/fft2d + $(INSTALL) -m 0644 $(@D)/*.c $(STAGING_DIR)/usr/include/fft2d + $(INSTALL) -m 0644 $(@D)/*.f $(STAGING_DIR)/usr/include/fft2d + $(INSTALL) -m 0644 $(@D)/*.h $(STAGING_DIR)/usr/include/fft2d +endef + +$(eval $(generic-package))
Signature · 1 line
2.34.1
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 6/8] package/fft2d: new package
In reply to James HilliardHi James, Hi Stefan,
Quoted 5 lines · James Hilliard
From: Stefan Hager <[email protected]>
This package is required by tensorflow-lite.
Quoted 7 lines
This package doesn't provide a conventional install mechanism so we need to install it manually.
Signed-off-by Stefan Hager <[email protected]>Signed-off-by James Hilliard <[email protected]>--- package/Config.in | 1 +
If you want to be maintainers for this package, do not forget to update the DEVELOPERS file.
Quoted 74 lines
package/fft2d/Config.in | 7 +++++++ package/fft2d/fft2d.hash | 4 ++++ package/fft2d/fft2d.mk | 22 ++++++++++++++++++++++ 4 files changed, 34 insertions(+) create mode 100644 package/fft2d/Config.in create mode 100644 package/fft2d/fft2d.hash create mode 100644 package/fft2d/fft2d.mkpackage/Config.in +1
-0@@ -1988,6 +1988,7 @@ menu "Other" source "package/elfutils/Config.in" source "package/ell/Config.in" source "package/falcosecurity-libs/Config.in" + source "package/fft2d/Config.in" source "package/fftw/Config.in" source "package/flann/Config.in" source "package/flatbuffers/Config.in"package/fft2d/Config.in new file +7
-0@@ -0,0 +1,7 @@ +config BR2_PACKAGE_FFT2D + bool "fft2d" + help + This is a package to calculate Discrete Fourier/Cosine/Sine + Transforms of 2,3-dimensional sequences of length 2^N. + + http://www.kurims.kyoto-u.ac.jp/~ooura/fft.htmlpackage/fft2d/fft2d.hash new file +4
-0@@ -0,0 +1,4 @@ +# Locally calculated +sha256 ada7e99087c4ed477bfdf11413f2ba8db8a840ba9bbf8ac94f4f3972e2a7cec9 fft2d.tgz +# License files, locally calculated +sha256 0b2a2082537735a2a576dbec2e8f9c1a09812eac6df6a389502a6ba860072906 readme2d.txtpackage/fft2d/fft2d.mk new file +22
-1@@ -0,0 +1,22 @@ +################################################################################ +# +# fft2d +# +################################################################################ + +FFT2D_VERSION = 2006.12.28 +FFT2D_SITE = https://www.kurims.kyoto-u.ac.jp/~ooura +FFT2D_SOURCE = fft2d.tgz +FFT2D_LICENSE = readme2d.txt +FFT2D_LICENSE_FILES = readme2d.txt +FFT2D_INSTALL_STAGING = YES +FFT2D_INSTALL_TARGET = NO + +define FFT2D_INSTALL_STAGING_CMDS + mkdir -p $(STAGING_DIR)/usr/include/fft2d + $(INSTALL) -m 0644 $(@D)/*.c $(STAGING_DIR)/usr/include/fft2d + $(INSTALL) -m 0644 $(@D)/*.f $(STAGING_DIR)/usr/include/fft2d + $(INSTALL) -m 0644 $(@D)/*.h $(STAGING_DIR)/usr/include/fft2d +endef + +$(eval $(generic-package)) --2.34.1
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Thanks
Gilles.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 7/8 package/farmhash: new package
In reply to James HilliardFrom: Stefan Hager <[email protected]>
This package is required by tensorflow-lite.
--- package/Config.in | 1 + package/farmhash/Config.in | 7 +++++++ package/farmhash/farmhash.hash | 4 ++++ package/farmhash/farmhash.mk | 14 ++++++++++++++ 4 files changed, 26 insertions(+) create mode 100644 package/farmhash/Config.in create mode 100644 package/farmhash/farmhash.hash create mode 100644 package/farmhash/farmhash.mk
package/Config.in +1 -0
@@ -1988,6 +1988,7 @@ menu "Other" source "package/elfutils/Config.in" source "package/ell/Config.in" source "package/falcosecurity-libs/Config.in" + source "package/farmhash/Config.in" source "package/fft2d/Config.in" source "package/fftw/Config.in" source "package/flann/Config.in"
package/farmhash/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_FARMHASH + bool "farmhash" + depends on BR2_INSTALL_LIBSTDCPP + help + FarmHash, a family of hash functions. + + https://github.com/google/farmhash
package/farmhash/farmhash.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally calculated +sha256 18392cf0736e1d62ecbb8d695c31496b6507859e8c75541d7ad0ba092dc52115 farmhash-0d859a811870d10f53a594927d0d0b97573ad06d.tar.gz +# License files, locally calculated +sha256 4162dd091caae234f72d3b57e138174f733e736b2430a4c51b098b17d866fcb6 COPYING
package/farmhash/farmhash.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# farmhash +# +################################################################################ + +FARMHASH_VERSION = 0d859a811870d10f53a594927d0d0b97573ad06d +FARMHASH_SITE = $(call github,google,farmhash,$(FARMHASH_VERSION)) +FARMHASH_LICENSE = MIT +FARMHASH_LICENSE_FILES = COPYING +FARMHASH_INSTALL_STAGING = YES +FARMHASH_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++11" + +$(eval $(autotools-package))
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 7/8] package/farmhash: new package
From: James Hilliard <[email protected]>
Sent: Monday, November 28, 2022 18:58
To: [email protected] <[email protected]>
Cc: Thomas Petazzoni <[email protected]>; Fabrice Fontaine <[email protected]>; Samuel Martin <[email protected]>; Hager Stefan <[email protected]>; James Hilliard <[email protected]>
Subject: [PATCH v2 7/8] package/farmhash: new package
From: Stefan Hager <[email protected]>
This package is required by tensorflow-lite.
---
package/Config.in | 1 + package/farmhash/Config.in | 7 +++++++ package/farmhash/farmhash.hash | 4 ++++ package/farmhash/farmhash.mk | 14 ++++++++++++++
4 files changed, 26 insertions(+)
create mode 100644 package/farmhash/Config.in create mode 100644 package/farmhash/farmhash.hash create mode 100644 package/farmhash/farmhash.mk
package/Config.in +0 -0
@@ -1988,6 +1988,7 @@ menu "Other"
source "package/elfutils/Config.in" source "package/ell/Config.in" source "package/falcosecurity-libs/Config.in" + source "package/farmhash/Config.in" source "package/fft2d/Config.in" source "package/fftw/Config.in" source "package/flann/Config.in"
package/farmhash/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_FARMHASH + bool "farmhash" + depends on BR2_INSTALL_LIBSTDCPP + help + FarmHash, a family of hash functions. + + https://github.com/google/farmhash
package/farmhash/farmhash.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally calculated +sha256 18392cf0736e1d62ecbb8d695c31496b6507859e8c75541d7ad0ba092dc52115 farmhash-0d859a811870d10f53a594927d0d0b97573ad06d.tar.gz +# License files, locally calculated +sha256 4162dd091caae234f72d3b57e138174f733e736b2430a4c51b098b17d866fcb6 COPYING
package/farmhash/farmhash.mk new file +14 -0
@@ -0,0 +1,14 @@ +################################################################################ +# +# farmhash +# +################################################################################ + +FARMHASH_VERSION = 0d859a811870d10f53a594927d0d0b97573ad06d +FARMHASH_SITE = $(call github,google,farmhash,$(FARMHASH_VERSION)) +FARMHASH_LICENSE = MIT +FARMHASH_LICENSE_FILES = COPYING +FARMHASH_INSTALL_STAGING = YES +FARMHASH_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++11" + +$(eval $(autotools-package))
Signature · 1 line
2.34.1
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 7/8] package/farmhash: new package
In reply to James HilliardHi James, Hi Stefan,
Quoted 9 lines · James Hilliard
From: Stefan Hager <[email protected]>
This package is required by tensorflow-lite.
Signed-off-by Stefan Hager <[email protected]>Signed-off-by James Hilliard <[email protected]>--- package/Config.in | 1 +
If you want to be maintainers for this package, do not forget to update the DEVELOPERS file.
Quoted 26 lines
package/farmhash/Config.in | 7 +++++++ package/farmhash/farmhash.hash | 4 ++++ package/farmhash/farmhash.mk | 14 ++++++++++++++ 4 files changed, 26 insertions(+) create mode 100644 package/farmhash/Config.in create mode 100644 package/farmhash/farmhash.hash create mode 100644 package/farmhash/farmhash.mkpackage/Config.in +1
-0@@ -1988,6 +1988,7 @@ menu "Other" source "package/elfutils/Config.in" source "package/ell/Config.in" source "package/falcosecurity-libs/Config.in" + source "package/farmhash/Config.in" source "package/fft2d/Config.in" source "package/fftw/Config.in" source "package/flann/Config.in"package/farmhash/Config.in new file +0
-0
package/farmhash/Config.in line 3
Quoted 3 lines
package/farmhash/Config.in new file +3
-0@@ -0,0 +1,7 @@ +config BR2_PACKAGE_FARMHASH + bool "farmhash" + depends on BR2_INSTALL_LIBSTDCPP
It seems like you are using C++11 to build the package. Can you please set the minimum GCC version?
package/farmhash/Config.in line 7
Quoted 4 lines
package/farmhash/Config.in new file +4
-0+ help + FarmHash, a family of hash functions. + + https://github.com/google/farmhash
Please mention the dependencies (C++ and C++ version)
Quoted 33 lines
package/farmhash/farmhash.hash new file +4
-0@@ -0,0 +1,4 @@ +# Locally calculated +sha256 18392cf0736e1d62ecbb8d695c31496b6507859e8c75541d7ad0ba092dc52115 farmhash-0d859a811870d10f53a594927d0d0b97573ad06d.tar.gz +# License files, locally calculated +sha256 4162dd091caae234f72d3b57e138174f733e736b2430a4c51b098b17d866fcb6 COPYINGpackage/farmhash/farmhash.mk new file +14
-1@@ -0,0 +1,14 @@ +################################################################################ +# +# farmhash +# +################################################################################ + +FARMHASH_VERSION = 0d859a811870d10f53a594927d0d0b97573ad06d +FARMHASH_SITE = $(call github,google,farmhash,$(FARMHASH_VERSION)) +FARMHASH_LICENSE = MIT +FARMHASH_LICENSE_FILES = COPYING +FARMHASH_INSTALL_STAGING = YES +FARMHASH_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++11" + +$(eval $(autotools-package)) --2.34.1
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
thanks
Gilles.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 8/8 package/tensorflow-lite: new package
In reply to James HilliardFrom: Stefan Hager <[email protected]>
This package adds the tensorflow lite runtime to buildroot.
---
Changes v1 -> v2:
- fix label_image build
- more explicit cmake config
--- package/Config.in | 1 + .../0001-lite-Update-CMakeLists.txt.patch | 49 +++++++++++++++++++ .../0002-Fix-FindFlatBuffers-cmake-file.patch | 37 ++++++++++++++ ...ink-tensorflow-lite-against-gemmlowp.patch | 32 ++++++++++++ package/tensorflow-lite/Config.in | 32 ++++++++++++ package/tensorflow-lite/tensorflow-lite.hash | 4 ++ package/tensorflow-lite/tensorflow-lite.mk | 49 +++++++++++++++++++ 7 files changed, 204 insertions(+) create mode 100644 package/tensorflow-lite/0001-lite-Update-CMakeLists.txt.patch create mode 100644 package/tensorflow-lite/0002-Fix-FindFlatBuffers-cmake-file.patch create mode 100644 package/tensorflow-lite/0003-Don-t-link-tensorflow-lite-against-gemmlowp.patch create mode 100644 package/tensorflow-lite/Config.in create mode 100644 package/tensorflow-lite/tensorflow-lite.hash create mode 100644 package/tensorflow-lite/tensorflow-lite.mk
package/Config.in +1 -0
@@ -2105,6 +2105,7 @@ endif source "package/sphinxbase/Config.in" source "package/startup-notification/Config.in" source "package/tbb/Config.in" + source "package/tensorflow-lite/Config.in" source "package/tinycbor/Config.in" source "package/tz/Config.in" source "package/tzdata/Config.in"
package/tensorflow-lite/0001-lite-Update-CMakeLists.txt.patch new file +49 -0
49 lines not on this page · raw message
package/tensorflow-lite/0002-Fix-FindFlatBuffers-cmake-file.patch new file +37 -0
@@ -0,0 +1,37 @@ +From a4ff4b5e952a22906ac0ed01e73f84f42926c325 Mon Sep 17 00:00:00 2001 +From: James Hilliard <[email protected]> +Date: Thu, 24 Nov 2022 14:29:06 -0700 +Subject: [PATCH] Fix FindFlatBuffers cmake file + +Capitalization needs to match for system cmake override to work: +https://github.com/google/flatbuffers/blob/v22.11.23/CMake/FindFlatBuffers.cmake + +Signed-off-by: James Hilliard <[email protected]> +[Upstream status: +https://github.com/tensorflow/tensorflow/pull/58677] +--- + tensorflow/lite/CMakeLists.txt | 2 +- + .../modules/{FindFlatbuffers.cmake => FindFlatBuffers.cmake} | 0 + 2 files changed, 1 insertion(+), 1 deletion(-) + rename tensorflow/lite/tools/cmake/modules/{FindFlatbuffers.cmake => FindFlatBuffers.cmake} (100%) + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index f9c30d6a046..c2ee9edfb61 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -143,7 +143,7 @@ find_package(absl REQUIRED) + find_package(Eigen3 REQUIRED) + find_package(farmhash REQUIRED) + find_package(fft2d REQUIRED) +-find_package(Flatbuffers REQUIRED) ++find_package(FlatBuffers REQUIRED) + find_package(gemmlowp REQUIRED) + find_package(NEON_2_SSE REQUIRED) + find_package(cpuinfo REQUIRED) #CPUINFO is used by XNNPACK and RUY library +diff --git a/tensorflow/lite/tools/cmake/modules/FindFlatbuffers.cmake b/tensorflow/lite/tools/cmake/modules/FindFlatBuffers.cmake +similarity index 100% +rename from tensorflow/lite/tools/cmake/modules/FindFlatbuffers.cmake +rename to tensorflow/lite/tools/cmake/modules/FindFlatBuffers.cmake +-- +2.34.1 +
package/tensorflow-lite/0003-Don-t-link-tensorflow-lite-against-gemmlowp.patch new file +32 -0
@@ -0,0 +1,32 @@ +From fb584589f707853d85a081c99b1b82598c2631c1 Mon Sep 17 00:00:00 2001 +From: James Hilliard <[email protected]> +Date: Thu, 24 Nov 2022 15:10:27 -0700 +Subject: [PATCH] Don't link tensorflow-lite against gemmlowp + +We can't link against gemmlowp as it is a header only library. + +Fixes: +/bin/ld: cannot find -lgemmlowp: No such file or directory + +Signed-off-by: James Hilliard <[email protected]> +[Upstream status: +https://github.com/tensorflow/tensorflow/pull/58678] +--- + tensorflow/lite/CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index f9c30d6a046..3fe5ed15605 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -560,7 +560,6 @@ target_link_libraries(tensorflow-lite + farmhash + fft2d_fftsg2d + flatbuffers::flatbuffers +- gemmlowp + ruy::ruy + pthreadpool + ${CMAKE_DL_LIBS} +-- +2.34.1 +
package/tensorflow-lite/Config.in new file +32 -0
@@ -0,0 +1,32 @@ +config BR2_PACKAGE_TENSORFLOW_LITE + bool "tensorflow-lite" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_9 + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_SHARED_LIBS + depends on ( BR2_arm && BR2_ARM_CPU_ARMV7A ) || ( BR2_aarch64 && BR2_ARM_CPU_ARMV8A ) + select BR2_PACKAGE_CPUINFO + select BR2_PACKAGE_EIGEN + select BR2_PACKAGE_FARMHASH + select BR2_PACKAGE_FFT2D + select BR2_PACKAGE_FLATBUFFERS + select BR2_PACKAGE_GEMMLOWP + select BR2_PACKAGE_LIBABSEIL_CPP + select BR2_PACKAGE_NEON_2_SSE + select BR2_PACKAGE_RUY + help + Tensorflow Lite dynamic library and headers: Inference engine to run previously trained machine learning models. + +comment "tensorflow-lite needs needs a toolchain w/ gcc >= 9" + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_9 + +comment "tensorflow-lite needs a toolchain w/ glibc, C++, threads" + depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS + +comment "tensorflow-lite needs a toolchain w/ shared libraries" + depends on !BR2_SHARED_LIBS + +comment "tensorflow-lite in buildroot currently only supports arm + armv7a cpu or arm64 + armv8a cpu targets" + depends on ( BR2_arm && !BR2_ARM_CPU_ARMV7A ) || ( BR2_aarch64 && !BR2_ARM_CPU_ARMV8A) || (!BR2_arm && !BR2_aarch64)
package/tensorflow-lite/tensorflow-lite.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally calculated +sha256 99c732b92b1b37fc243a559e02f9aef5671771e272758aa4aec7f34dc92dac48 tensorflow-lite-2.11.0.tar.gz +# License files, locally calculated +sha256 71c6915d04265772a0339bed47276942c678b45cc01534210ebe6984fd1aec65 LICENSE
package/tensorflow-lite/tensorflow-lite.mk new file +49 -0
49 lines not on this page · raw message
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 8/8] package/tensorflow-lite: new package
From: James Hilliard <[email protected]>
Sent: Monday, November 28, 2022 18:58
To: [email protected] <[email protected]>
Cc: Thomas Petazzoni <[email protected]>; Fabrice Fontaine <[email protected]>; Samuel Martin <[email protected]>; Hager Stefan <[email protected]>; James Hilliard <[email protected]>
Subject: [PATCH v2 8/8] package/tensorflow-lite: new package
From: Stefan Hager <[email protected]>
This package adds the tensorflow lite runtime to buildroot.
---
Changes v1 -> v2:
- fix label_image build
- more explicit cmake config
---
package/Config.in | 1 + .../0001-lite-Update-CMakeLists.txt.patch | 49 +++++++++++++++++++ .../0002-Fix-FindFlatBuffers-cmake-file.patch | 37 ++++++++++++++ ...ink-tensorflow-lite-against-gemmlowp.patch | 32 ++++++++++++ package/tensorflow-lite/Config.in | 32 ++++++++++++ package/tensorflow-lite/tensorflow-lite.hash | 4 ++ package/tensorflow-lite/tensorflow-lite.mk | 49 +++++++++++++++++++
7 files changed, 204 insertions(+)
create mode 100644 package/tensorflow-lite/0001-lite-Update-CMakeLists.txt.patch create mode 100644 package/tensorflow-lite/0002-Fix-FindFlatBuffers-cmake-file.patch create mode 100644 package/tensorflow-lite/0003-Don-t-link-tensorflow-lite-against-gemmlowp.patch create mode 100644 package/tensorflow-lite/Config.in
create mode 100644 package/tensorflow-lite/tensorflow-lite.hash
create mode 100644 package/tensorflow-lite/tensorflow-lite.mk
package/Config.in +0 -0
@@ -2105,6 +2105,7 @@ endif
source "package/sphinxbase/Config.in" source "package/startup-notification/Config.in" source "package/tbb/Config.in"
+ source "package/tensorflow-lite/Config.in" source "package/tinycbor/Config.in" source "package/tz/Config.in"
source "package/tzdata/Config.in"
package/tensorflow-lite/0001-lite-Update-CMakeLists.txt.patch new file +49 -0
49 lines not on this page · raw message
package/tensorflow-lite/0002-Fix-FindFlatBuffers-cmake-file.patch new file +37 -0
@@ -0,0 +1,37 @@ +From a4ff4b5e952a22906ac0ed01e73f84f42926c325 Mon Sep 17 00:00:00 2001 +From: James Hilliard <[email protected]> +Date: Thu, 24 Nov 2022 14:29:06 -0700 +Subject: [PATCH] Fix FindFlatBuffers cmake file + +Capitalization needs to match for system cmake override to work: +https://github.com/google/flatbuffers/blob/v22.11.23/CMake/FindFlatBuffers.cmake + +Signed-off-by: James Hilliard <[email protected]> +[Upstream status: +https://github.com/tensorflow/tensorflow/pull/58677] +--- + tensorflow/lite/CMakeLists.txt | 2 +- + .../modules/{FindFlatbuffers.cmake => FindFlatBuffers.cmake} | 0 + 2 files changed, 1 insertion(+), 1 deletion(-) + rename tensorflow/lite/tools/cmake/modules/{FindFlatbuffers.cmake => FindFlatBuffers.cmake} (100%) + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index f9c30d6a046..c2ee9edfb61 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -143,7 +143,7 @@ find_package(absl REQUIRED) + find_package(Eigen3 REQUIRED) + find_package(farmhash REQUIRED) + find_package(fft2d REQUIRED) +-find_package(Flatbuffers REQUIRED) ++find_package(FlatBuffers REQUIRED) + find_package(gemmlowp REQUIRED) + find_package(NEON_2_SSE REQUIRED) + find_package(cpuinfo REQUIRED) #CPUINFO is used by XNNPACK and RUY library +diff --git a/tensorflow/lite/tools/cmake/modules/FindFlatbuffers.cmake b/tensorflow/lite/tools/cmake/modules/FindFlatBuffers.cmake +similarity index 100% +rename from tensorflow/lite/tools/cmake/modules/FindFlatbuffers.cmake +rename to tensorflow/lite/tools/cmake/modules/FindFlatBuffers.cmake +-- +2.34.1 +
package/tensorflow-lite/0003-Don-t-link-tensorflow-lite-against-gemmlowp.patch new file +32 -0
@@ -0,0 +1,32 @@ +From fb584589f707853d85a081c99b1b82598c2631c1 Mon Sep 17 00:00:00 2001 +From: James Hilliard <[email protected]> +Date: Thu, 24 Nov 2022 15:10:27 -0700 +Subject: [PATCH] Don't link tensorflow-lite against gemmlowp + +We can't link against gemmlowp as it is a header only library. + +Fixes: +/bin/ld: cannot find -lgemmlowp: No such file or directory + +Signed-off-by: James Hilliard <[email protected]> +[Upstream status: +https://github.com/tensorflow/tensorflow/pull/58678] +--- + tensorflow/lite/CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index f9c30d6a046..3fe5ed15605 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -560,7 +560,6 @@ target_link_libraries(tensorflow-lite + farmhash + fft2d_fftsg2d + flatbuffers::flatbuffers +- gemmlowp + ruy::ruy + pthreadpool + ${CMAKE_DL_LIBS} +-- +2.34.1 +
package/tensorflow-lite/Config.in new file +32 -0
@@ -0,0 +1,32 @@ +config BR2_PACKAGE_TENSORFLOW_LITE + bool "tensorflow-lite" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_9 + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_SHARED_LIBS + depends on ( BR2_arm && BR2_ARM_CPU_ARMV7A ) || ( BR2_aarch64 && BR2_ARM_CPU_ARMV8A ) + select BR2_PACKAGE_CPUINFO + select BR2_PACKAGE_EIGEN + select BR2_PACKAGE_FARMHASH + select BR2_PACKAGE_FFT2D + select BR2_PACKAGE_FLATBUFFERS + select BR2_PACKAGE_GEMMLOWP + select BR2_PACKAGE_LIBABSEIL_CPP + select BR2_PACKAGE_NEON_2_SSE + select BR2_PACKAGE_RUY + help + Tensorflow Lite dynamic library and headers: Inference engine to run previously trained machine learning models. + +comment "tensorflow-lite needs needs a toolchain w/ gcc >= 9" + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_9 + +comment "tensorflow-lite needs a toolchain w/ glibc, C++, threads" + depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS + +comment "tensorflow-lite needs a toolchain w/ shared libraries" + depends on !BR2_SHARED_LIBS + +comment "tensorflow-lite in buildroot currently only supports arm + armv7a cpu or arm64 + armv8a cpu targets" + depends on ( BR2_arm && !BR2_ARM_CPU_ARMV7A ) || ( BR2_aarch64 && !BR2_ARM_CPU_ARMV8A) || (!BR2_arm && !BR2_aarch64)
package/tensorflow-lite/tensorflow-lite.hash new file +4 -0
@@ -0,0 +1,4 @@ +# Locally calculated +sha256 99c732b92b1b37fc243a559e02f9aef5671771e272758aa4aec7f34dc92dac48 tensorflow-lite-2.11.0.tar.gz +# License files, locally calculated +sha256 71c6915d04265772a0339bed47276942c678b45cc01534210ebe6984fd1aec65 LICENSE
package/tensorflow-lite/tensorflow-lite.mk new file +49 -0
49 lines not on this page · raw message
Signature · 1 line
2.34.1
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 8/8] package/tensorflow-lite: new package
In reply to James HilliardHi James, Hi Stefan,
fyi, I could build and successfully test tensorflow lite on an aarch64 platform with Cortex A53 cores.
a few comments though.
Quoted 5 lines · James Hilliard
From: Stefan Hager <[email protected]>
This package adds the tensorflow lite runtime to buildroot.
Quoted 8 lines
Signed-off-by Stefan Hager <[email protected]>Signed-off-by James Hilliard <[email protected]>---
Changes v1 -> v2:
- fixlabel_imagebuild
- more explicit cmake config--- package/Config.in | 1 +
If you want to be maintainers for this package, do not forget to update the DEVELOPERS file.
Quoted 168 lines
.../0001-lite-Update-CMakeLists.txt.patch | 49 +++++++++++++++++++ .../0002-Fix-FindFlatBuffers-cmake-file.patch | 37 ++++++++++++++ ...ink-tensorflow-lite-against-gemmlowp.patch | 32 ++++++++++++ package/tensorflow-lite/Config.in | 32 ++++++++++++ package/tensorflow-lite/tensorflow-lite.hash | 4 ++ package/tensorflow-lite/tensorflow-lite.mk | 49 +++++++++++++++++++ 7 files changed, 204 insertions(+) create mode 100644 package/tensorflow-lite/0001-lite-Update-CMakeLists.txt.patch create mode 100644 package/tensorflow-lite/0002-Fix-FindFlatBuffers-cmake-file.patch create mode 100644 package/tensorflow-lite/0003-Don-t-link-tensorflow-lite-against-gemmlowp.patch create mode 100644 package/tensorflow-lite/Config.in create mode 100644 package/tensorflow-lite/tensorflow-lite.hash create mode 100644 package/tensorflow-lite/tensorflow-lite.mkpackage/Config.in +1
-0@@ -2105,6 +2105,7 @@ endif source "package/sphinxbase/Config.in" source "package/startup-notification/Config.in" source "package/tbb/Config.in" + source "package/tensorflow-lite/Config.in" source "package/tinycbor/Config.in" source "package/tz/Config.in" source "package/tzdata/Config.in"package/tensorflow-lite/0001-lite-Update-CMakeLists.txt.patch new file +49
-0@@ -0,0 +1,49 @@ +From 081c2e4e3cf021efb2853a485a18b563e88f6117 Mon Sep 17 00:00:00 2001 +From: Terry Heo <[email protected]> +Date: Tue, 1 Nov 2022 15:55:30 -0700 +Subject: [PATCH] lite: Update CMakeLists.txt + +This changes are needed to build kernel tests. + +PiperOrigin-RevId: 485439972 + +Signed-off-by: James Hilliard <[email protected]> +[[email protected]: backport from upstream commit +081c2e4e3cf021efb2853a485a18b563e88f6117] +--- + tensorflow/lite/CMakeLists.txt | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index 9dfbb4b72f3..fd8b3faf1e2 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -209,6 +209,9 @@ list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*tflite_with_xnnpack\\.cc$") + # Exclude Flex related files. + list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*with_selected_ops\\.cc$") + ++# Exclude tensorflow_profiler_logger files. ++list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*tensorflow_profiler_logger\\.cc$") ++ + if(_TFLITE_ENABLE_MMAP) + list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*mmap_allocation_disabled\\.cc$") + else() +@@ -222,6 +225,7 @@ if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "iOS") + endif() + populate_tflite_source_vars("core" TFLITE_CORE_SRCS) + populate_tflite_source_vars("core/api" TFLITE_CORE_API_SRCS) ++populate_tflite_source_vars("core/c" TFLITE_CORE_C_SRCS) + populate_tflite_source_vars("c" TFLITE_C_SRCS) + populate_tflite_source_vars("delegates" TFLITE_DELEGATES_SRCS) + if(TFLITE_ENABLE_GPU) +@@ -483,6 +487,7 @@ endif() + # TFLite library + set(_ALL_TFLITE_SRCS + ${TFLITE_CORE_API_SRCS} ++ ${TFLITE_CORE_C_SRCS} + ${TFLITE_CORE_SRCS} + ${TFLITE_C_SRCS} + ${TFLITE_DELEGATES_FLEX_SRCS} +-- +2.34.1 +package/tensorflow-lite/0002-Fix-FindFlatBuffers-cmake-file.patch new file +37
-0@@ -0,0 +1,37 @@ +From a4ff4b5e952a22906ac0ed01e73f84f42926c325 Mon Sep 17 00:00:00 2001 +From: James Hilliard <[email protected]> +Date: Thu, 24 Nov 2022 14:29:06 -0700 +Subject: [PATCH] Fix FindFlatBuffers cmake file + +Capitalization needs to match for system cmake override to work: +https://github.com/google/flatbuffers/blob/v22.11.23/CMake/FindFlatBuffers.cmake + +Signed-off-by: James Hilliard <[email protected]> +[Upstream status: +https://github.com/tensorflow/tensorflow/pull/58677] +--- + tensorflow/lite/CMakeLists.txt | 2 +- + .../modules/{FindFlatbuffers.cmake => FindFlatBuffers.cmake} | 0 + 2 files changed, 1 insertion(+), 1 deletion(-) + rename tensorflow/lite/tools/cmake/modules/{FindFlatbuffers.cmake => FindFlatBuffers.cmake} (100%) + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index f9c30d6a046..c2ee9edfb61 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -143,7 +143,7 @@ find_package(absl REQUIRED) + find_package(Eigen3 REQUIRED) + find_package(farmhash REQUIRED) + find_package(fft2d REQUIRED) +-find_package(Flatbuffers REQUIRED) ++find_package(FlatBuffers REQUIRED) + find_package(gemmlowp REQUIRED) + find_package(NEON_2_SSE REQUIRED) + find_package(cpuinfo REQUIRED) #CPUINFO is used by XNNPACK and RUY library +diff --git a/tensorflow/lite/tools/cmake/modules/FindFlatbuffers.cmake b/tensorflow/lite/tools/cmake/modules/FindFlatBuffers.cmake +similarity index 100% +rename from tensorflow/lite/tools/cmake/modules/FindFlatbuffers.cmake +rename to tensorflow/lite/tools/cmake/modules/FindFlatBuffers.cmake +-- +2.34.1 +package/tensorflow-lite/0003-Don-t-link-tensorflow-lite-against-gemmlowp.patch new file +32
-0@@ -0,0 +1,32 @@ +From fb584589f707853d85a081c99b1b82598c2631c1 Mon Sep 17 00:00:00 2001 +From: James Hilliard <[email protected]> +Date: Thu, 24 Nov 2022 15:10:27 -0700 +Subject: [PATCH] Don't link tensorflow-lite against gemmlowp + +We can't link against gemmlowp as it is a header only library. + +Fixes: +/bin/ld: cannot find -lgemmlowp: No such file or directory + +Signed-off-by: James Hilliard <[email protected]> +[Upstream status: +https://github.com/tensorflow/tensorflow/pull/58678] +--- + tensorflow/lite/CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index f9c30d6a046..3fe5ed15605 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -560,7 +560,6 @@ target_link_libraries(tensorflow-lite + farmhash + fft2d_fftsg2d + flatbuffers::flatbuffers +- gemmlowp + ruy::ruy + pthreadpool + ${CMAKE_DL_LIBS} +-- +2.34.1 +package/tensorflow-lite/Config.in new file +0
-0
package/tensorflow-lite/Config.in line 3
Quoted 3 lines
package/tensorflow-lite/Config.in new file +3
-0@@ -0,0 +1,32 @@ +config BR2_PACKAGE_TENSORFLOW_LITE + bool "tensorflow-lite" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_9
Can you please add to comment that explains why this version of GCC is needed?
Quoted 6 lines
package/tensorflow-lite/Config.in new file +6
-0+ depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_SHARED_LIBS + depends on ( BR2_arm && BR2_ARM_CPU_ARMV7A ) || ( BR2_aarch64 && BR2_ARM_CPU_ARMV8A ) + select BR2_PACKAGE_CPUINFO
package/tensorflow-lite/Config.in line 19
Quoted 10 lines
package/tensorflow-lite/Config.in new file +10
-0+ select BR2_PACKAGE_EIGEN + select BR2_PACKAGE_FARMHASH + select BR2_PACKAGE_FFT2D + select BR2_PACKAGE_FLATBUFFERS + select BR2_PACKAGE_GEMMLOWP + select BR2_PACKAGE_LIBABSEIL_CPP + select BR2_PACKAGE_NEON_2_SSE + select BR2_PACKAGE_RUY + help + Tensorflow Lite dynamic library and headers: Inference engine to run previously trained machine learning models.
The text is too long. Please run "utils/check-package" to see the warning that it generates.
A couple of suggestions:
1) would it be possible to add an option to build and install the label_image example? It is always handy to be able to test this package once it is built.
2) would it be possible to add an option to build and install the benchmark_model tool? This tool provides useful performance information.
Quoted 64 lines
package/tensorflow-lite/Config.in new file +13
-0+ +comment "tensorflow-lite needs needs a toolchain w/ gcc >= 9" + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_9 + +comment "tensorflow-lite needs a toolchain w/ glibc, C++, threads" + depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS + +comment "tensorflow-lite needs a toolchain w/ shared libraries" + depends on !BR2_SHARED_LIBS + +comment "tensorflow-lite in buildroot currently only supports arm + armv7a cpu or arm64 + armv8a cpu targets" + depends on ( BR2_arm && !BR2_ARM_CPU_ARMV7A ) || ( BR2_aarch64 && !BR2_ARM_CPU_ARMV8A) || (!BR2_arm && !BR2_aarch64)package/tensorflow-lite/tensorflow-lite.hash new file +4
-0@@ -0,0 +1,4 @@ +# Locally calculated +sha256 99c732b92b1b37fc243a559e02f9aef5671771e272758aa4aec7f34dc92dac48 tensorflow-lite-2.11.0.tar.gz +# License files, locally calculated +sha256 71c6915d04265772a0339bed47276942c678b45cc01534210ebe6984fd1aec65 LICENSEpackage/tensorflow-lite/tensorflow-lite.mk new file +35
-0@@ -0,0 +1,49 @@ +################################################################################ +# +# tensorflow-lite +# +################################################################################ + +TENSORFLOW_LITE_VERSION = 2.11.0 +TENSORFLOW_LITE_SITE = $(call github,tensorflow,tensorflow,v$(TENSORFLOW_LITE_VERSION)) +TENSORFLOW_LITE_INSTALL_STAGING = YES +TENSORFLOW_LITE_LICENSE = Apache-2.0 +TENSORFLOW_LITE_LICENSE_FILES = LICENSE +TENSORFLOW_LITE_SUBDIR = tensorflow/lite +TENSORFLOW_LITE_SUPPORTS_IN_SOURCE_BUILD = NO +TENSORFLOW_LITE_DEPENDENCIES += \ + host-pkgconf \ + host-flatbuffers \ + cpuinfo \ + eigen \ + farmhash \ + fft2d \ + flatbuffers \ + gemmlowp \ + libabseil-cpp \ + neon-2-sse \ + ruy + +TENSORFLOW_LITE_CONF_OPTS = \ + -Dabsl_DIR=$(STAGING_DIR)/usr/lib/cmake/absl \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -I$(STAGING_DIR)/usr/include/gemmlowp" \ + -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DEigen3_DIR=$(STAGING_DIR)/usr/share/eigen3/cmake \ + -DFARMHASH_SOURCE_DIR=$(FARMHASH_DIR) \ + -Dfarmhash_DIR=$(STAGING_DIR)/usr/lib \
package/tensorflow-lite/tensorflow-lite.mk line 45
Quoted 10 lines
package/tensorflow-lite/tensorflow-lite.mk new file +10
-0+ -DFETCHCONTENT_FULLY_DISCONNECTED=ON \ + -DFETCHCONTENT_QUIET=OFF \ + -DFFT2D_SOURCE_DIR=$(STAGING_DIR)/usr/include/fft2d \ + -DFlatBuffers_DIR=$(STAGING_DIR)/usr/lib/cmake/flatbuffers \ + -DNEON_2_SSE_DIR=$(STAGING_DIR)/usr/lib/cmake/NEON_2_SSE \ + -DTFLITE_ENABLE_EXTERNAL_DELEGATE=ON \ + -DTFLITE_ENABLE_GPU=OFF \ + -DTFLITE_ENABLE_INSTALL=ON \ + -DTFLITE_ENABLE_MMAP=ON \ + -DTFLITE_ENABLE_NNAPI=ON \
I thought NNAPI was used in Android. Can you explain why it is required here?
package/tensorflow-lite/tensorflow-lite.mk line 47
Quoted 2 lines
package/tensorflow-lite/tensorflow-lite.mk new file +2
-0+ -DTFLITE_ENABLE_RUY=ON \ + -DTFLITE_ENABLE_XNNPACK=OFF
any reason why xnnpack is not enabled? It would be great to enable it as an option.
Quoted 9 lines
package/tensorflow-lite/tensorflow-lite.mk new file +2
-1+ +$(eval $(cmake-package)) --2.34.1
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
thanks
Gilles.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 8/8] package/tensorflow-lite: new package
Quoted 189 lines · Gilles Talis
Hi James, Hi Stefan,
fyi, I could build and successfully test tensorflow lite on an aarch64 platform with Cortex A53 cores.
a few comments though.Quoted 5 lines · James Hilliard
From: Stefan Hager <[email protected]>
This package adds the tensorflow lite runtime to buildroot.
Quoted 8 lines
Signed-off-by Stefan Hager <[email protected]>Signed-off-by James Hilliard <[email protected]>---
Changes v1 -> v2:
- fixlabel_imagebuild
- more explicit cmake config--- package/Config.in | 1 +If you want to be maintainers for this package, do not forget to update the DEVELOPERS file.
Quoted 164 lines
.../0001-lite-Update-CMakeLists.txt.patch | 49 +++++++++++++++++++ .../0002-Fix-FindFlatBuffers-cmake-file.patch | 37 ++++++++++++++ ...ink-tensorflow-lite-against-gemmlowp.patch | 32 ++++++++++++ package/tensorflow-lite/Config.in | 32 ++++++++++++ package/tensorflow-lite/tensorflow-lite.hash | 4 ++ package/tensorflow-lite/tensorflow-lite.mk | 49 +++++++++++++++++++ 7 files changed, 204 insertions(+) create mode 100644 package/tensorflow-lite/0001-lite-Update-CMakeLists.txt.patch create mode 100644 package/tensorflow-lite/0002-Fix-FindFlatBuffers-cmake-file.patch create mode 100644 package/tensorflow-lite/0003-Don-t-link-tensorflow-lite-against-gemmlowp.patch create mode 100644 package/tensorflow-lite/Config.in create mode 100644 package/tensorflow-lite/tensorflow-lite.hash create mode 100644 package/tensorflow-lite/tensorflow-lite.mkpackage/Config.in +1
-0@@ -2105,6 +2105,7 @@ endif source "package/sphinxbase/Config.in" source "package/startup-notification/Config.in" source "package/tbb/Config.in" + source "package/tensorflow-lite/Config.in" source "package/tinycbor/Config.in" source "package/tz/Config.in" source "package/tzdata/Config.in"package/tensorflow-lite/0001-lite-Update-CMakeLists.txt.patch new file +49
-0@@ -0,0 +1,49 @@ +From 081c2e4e3cf021efb2853a485a18b563e88f6117 Mon Sep 17 00:00:00 2001 +From: Terry Heo <[email protected]> +Date: Tue, 1 Nov 2022 15:55:30 -0700 +Subject: [PATCH] lite: Update CMakeLists.txt + +This changes are needed to build kernel tests. + +PiperOrigin-RevId: 485439972 + +Signed-off-by: James Hilliard <[email protected]> +[[email protected]: backport from upstream commit +081c2e4e3cf021efb2853a485a18b563e88f6117] +--- + tensorflow/lite/CMakeLists.txt | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index 9dfbb4b72f3..fd8b3faf1e2 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -209,6 +209,9 @@ list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*tflite_with_xnnpack\\.cc$") + # Exclude Flex related files. + list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*with_selected_ops\\.cc$") + ++# Exclude tensorflow_profiler_logger files. ++list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*tensorflow_profiler_logger\\.cc$") ++ + if(_TFLITE_ENABLE_MMAP) + list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*mmap_allocation_disabled\\.cc$") + else() +@@ -222,6 +225,7 @@ if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "iOS") + endif() + populate_tflite_source_vars("core" TFLITE_CORE_SRCS) + populate_tflite_source_vars("core/api" TFLITE_CORE_API_SRCS) ++populate_tflite_source_vars("core/c" TFLITE_CORE_C_SRCS) + populate_tflite_source_vars("c" TFLITE_C_SRCS) + populate_tflite_source_vars("delegates" TFLITE_DELEGATES_SRCS) + if(TFLITE_ENABLE_GPU) +@@ -483,6 +487,7 @@ endif() + # TFLite library + set(_ALL_TFLITE_SRCS + ${TFLITE_CORE_API_SRCS} ++ ${TFLITE_CORE_C_SRCS} + ${TFLITE_CORE_SRCS} + ${TFLITE_C_SRCS} + ${TFLITE_DELEGATES_FLEX_SRCS} +-- +2.34.1 +package/tensorflow-lite/0002-Fix-FindFlatBuffers-cmake-file.patch new file +37
-0@@ -0,0 +1,37 @@ +From a4ff4b5e952a22906ac0ed01e73f84f42926c325 Mon Sep 17 00:00:00 2001 +From: James Hilliard <[email protected]> +Date: Thu, 24 Nov 2022 14:29:06 -0700 +Subject: [PATCH] Fix FindFlatBuffers cmake file + +Capitalization needs to match for system cmake override to work: +https://github.com/google/flatbuffers/blob/v22.11.23/CMake/FindFlatBuffers.cmake + +Signed-off-by: James Hilliard <[email protected]> +[Upstream status: +https://github.com/tensorflow/tensorflow/pull/58677] +--- + tensorflow/lite/CMakeLists.txt | 2 +- + .../modules/{FindFlatbuffers.cmake => FindFlatBuffers.cmake} | 0 + 2 files changed, 1 insertion(+), 1 deletion(-) + rename tensorflow/lite/tools/cmake/modules/{FindFlatbuffers.cmake => FindFlatBuffers.cmake} (100%) + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index f9c30d6a046..c2ee9edfb61 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -143,7 +143,7 @@ find_package(absl REQUIRED) + find_package(Eigen3 REQUIRED) + find_package(farmhash REQUIRED) + find_package(fft2d REQUIRED) +-find_package(Flatbuffers REQUIRED) ++find_package(FlatBuffers REQUIRED) + find_package(gemmlowp REQUIRED) + find_package(NEON_2_SSE REQUIRED) + find_package(cpuinfo REQUIRED) #CPUINFO is used by XNNPACK and RUY library +diff --git a/tensorflow/lite/tools/cmake/modules/FindFlatbuffers.cmake b/tensorflow/lite/tools/cmake/modules/FindFlatBuffers.cmake +similarity index 100% +rename from tensorflow/lite/tools/cmake/modules/FindFlatbuffers.cmake +rename to tensorflow/lite/tools/cmake/modules/FindFlatBuffers.cmake +-- +2.34.1 +package/tensorflow-lite/0003-Don-t-link-tensorflow-lite-against-gemmlowp.patch new file +32
-0@@ -0,0 +1,32 @@ +From fb584589f707853d85a081c99b1b82598c2631c1 Mon Sep 17 00:00:00 2001 +From: James Hilliard <[email protected]> +Date: Thu, 24 Nov 2022 15:10:27 -0700 +Subject: [PATCH] Don't link tensorflow-lite against gemmlowp + +We can't link against gemmlowp as it is a header only library. + +Fixes: +/bin/ld: cannot find -lgemmlowp: No such file or directory + +Signed-off-by: James Hilliard <[email protected]> +[Upstream status: +https://github.com/tensorflow/tensorflow/pull/58678] +--- + tensorflow/lite/CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index f9c30d6a046..3fe5ed15605 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -560,7 +560,6 @@ target_link_libraries(tensorflow-lite + farmhash + fft2d_fftsg2d + flatbuffers::flatbuffers +- gemmlowp + ruy::ruy + pthreadpool + ${CMAKE_DL_LIBS} +-- +2.34.1 +package/tensorflow-lite/Config.in new file +0
-0
Quoted 8 lines
package/tensorflow-lite/Config.in line 3
Quoted 7 lines
index 0000000000..9231d674bd
package/tensorflow-lite/Config.in new file +3
-0@@ -0,0 +1,32 @@ +config BR2_PACKAGE_TENSORFLOW_LITE + bool "tensorflow-lite" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_9Can you please add to comment that explains why this version of GCC is needed?
I'm not sure why this is, maybe Stephan Hager can clarify.
Quoted 17 lines
Quoted 7 lines
package/tensorflow-lite/Config.in new file +6
-0+ depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_SHARED_LIBS + depends on ( BR2_arm && BR2_ARM_CPU_ARMV7A ) || ( BR2_aarch64 && BR2_ARM_CPU_ARMV8A ) + select BR2_PACKAGE_CPUINFOpackage/tensorflow-lite/Config.in line 19
Quoted 10 lines
package/tensorflow-lite/Config.in new file +10
-0+ select BR2_PACKAGE_EIGEN + select BR2_PACKAGE_FARMHASH + select BR2_PACKAGE_FFT2D + select BR2_PACKAGE_FLATBUFFERS + select BR2_PACKAGE_GEMMLOWP + select BR2_PACKAGE_LIBABSEIL_CPP + select BR2_PACKAGE_NEON_2_SSE + select BR2_PACKAGE_RUY + help + Tensorflow Lite dynamic library and headers: Inference engine to run previously trained machine learning models.
Quoted 2 lines
The text is too long. Please run "utils/check-package" to see the warning that it generates.
Fixed in v3:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
Quoted 8 lines
A couple of suggestions:
1) would it be possible to add an option to build and install thelabel_imageexample? It is always handy to be able to test this package once it is built.
2) would it be possible to add an option to build and install thebenchmark_modeltool? This tool provides useful performance information.
Not sure there's really a good way to do this without adding a config flag upstream.
Quoted 68 lines
Quoted 68 lines
package/tensorflow-lite/Config.in new file +13
-0+ +comment "tensorflow-lite needs needs a toolchain w/ gcc >= 9" + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_9 + +comment "tensorflow-lite needs a toolchain w/ glibc, C++, threads" + depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS + +comment "tensorflow-lite needs a toolchain w/ shared libraries" + depends on !BR2_SHARED_LIBS + +comment "tensorflow-lite in buildroot currently only supports arm + armv7a cpu or arm64 + armv8a cpu targets" + depends on ( BR2_arm && !BR2_ARM_CPU_ARMV7A ) || ( BR2_aarch64 && !BR2_ARM_CPU_ARMV8A) || (!BR2_arm && !BR2_aarch64)package/tensorflow-lite/tensorflow-lite.hash new file +4
-0@@ -0,0 +1,4 @@ +# Locally calculated +sha256 99c732b92b1b37fc243a559e02f9aef5671771e272758aa4aec7f34dc92dac48 tensorflow-lite-2.11.0.tar.gz +# License files, locally calculated +sha256 71c6915d04265772a0339bed47276942c678b45cc01534210ebe6984fd1aec65 LICENSEpackage/tensorflow-lite/tensorflow-lite.mk new file +38
-0@@ -0,0 +1,49 @@ +################################################################################ +# +# tensorflow-lite +# +################################################################################ + +TENSORFLOW_LITE_VERSION = 2.11.0 +TENSORFLOW_LITE_SITE = $(call github,tensorflow,tensorflow,v$(TENSORFLOW_LITE_VERSION)) +TENSORFLOW_LITE_INSTALL_STAGING = YES +TENSORFLOW_LITE_LICENSE = Apache-2.0 +TENSORFLOW_LITE_LICENSE_FILES = LICENSE +TENSORFLOW_LITE_SUBDIR = tensorflow/lite +TENSORFLOW_LITE_SUPPORTS_IN_SOURCE_BUILD = NO +TENSORFLOW_LITE_DEPENDENCIES += \ + host-pkgconf \ + host-flatbuffers \ + cpuinfo \ + eigen \ + farmhash \ + fft2d \ + flatbuffers \ + gemmlowp \ + libabseil-cpp \ + neon-2-sse \ + ruy + +TENSORFLOW_LITE_CONF_OPTS = \ + -Dabsl_DIR=$(STAGING_DIR)/usr/lib/cmake/absl \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -I$(STAGING_DIR)/usr/include/gemmlowp" \ + -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DEigen3_DIR=$(STAGING_DIR)/usr/share/eigen3/cmake \ + -DFARMHASH_SOURCE_DIR=$(FARMHASH_DIR) \ + -Dfarmhash_DIR=$(STAGING_DIR)/usr/lib \ + -DFETCHCONTENT_FULLY_DISCONNECTED=ON \ + -DFETCHCONTENT_QUIET=OFF \ + -DFFT2D_SOURCE_DIR=$(STAGING_DIR)/usr/include/fft2d \
Quoted 8 lines
package/tensorflow-lite/tensorflow-lite.mk line 45
Quoted 7 lines
package/tensorflow-lite/tensorflow-lite.mk new file +7
-0+ -DFlatBuffers_DIR=$(STAGING_DIR)/usr/lib/cmake/flatbuffers \ + -DNEON_2_SSE_DIR=$(STAGING_DIR)/usr/lib/cmake/NEON_2_SSE \ + -DTFLITE_ENABLE_EXTERNAL_DELEGATE=ON \ + -DTFLITE_ENABLE_GPU=OFF \ + -DTFLITE_ENABLE_INSTALL=ON \ + -DTFLITE_ENABLE_MMAP=ON \ + -DTFLITE_ENABLE_NNAPI=ON \I thought NNAPI was used in Android. Can you explain why it is required here?
Disabled in v3:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
Quoted 5 lines
package/tensorflow-lite/tensorflow-lite.mk line 47
Quoted 3 lines
package/tensorflow-lite/tensorflow-lite.mk new file +2
-0+ -DTFLITE_ENABLE_RUY=ON \ + -DTFLITE_ENABLE_XNNPACK=OFFany reason why xnnpack is not enabled? It would be great to enable it as an option.
Mostly since it's not a required dependency and haven't added the dependency yet. Will look into adding that as a followup once this is merged.
Quoted 6 lines
Quoted 6 lines
package/tensorflow-lite/tensorflow-lite.mk new file +2
-1+ +$(eval $(cmake-package)) --2.34.1
Quoted 6 lines
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildrootthanks
Gilles.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 8/8] package/tensorflow-lite: new package
Quoted 205 lines
From: James Hilliard <[email protected]>
Sent: Tuesday, January 24, 2023 10:27
To: Gilles Talis <[email protected]>
Cc: [email protected] <[email protected]>; Hager Stefan <[email protected]>; Samuel Martin <[email protected]>; Fabrice Fontaine <[email protected]>; Thomas Petazzoni <[email protected]>
Subject: Re: [Buildroot] [PATCH v2 8/8] package/tensorflow-lite: new packageQuoted 189 lines · Gilles Talis
Hi James, Hi Stefan,
fyi, I could build and successfully test tensorflow lite on an aarch64 platform with Cortex A53 cores.
a few comments though.Quoted 5 lines · James Hilliard
From: Stefan Hager <[email protected]>
This package adds the tensorflow lite runtime to buildroot.
Quoted 8 lines
Signed-off-by Stefan Hager <[email protected]>Signed-off-by James Hilliard <[email protected]>---
Changes v1 -> v2:
- fixlabel_imagebuild
- more explicit cmake config--- package/Config.in | 1 +If you want to be maintainers for this package, do not forget to update the DEVELOPERS file.
Quoted 164 lines
.../0001-lite-Update-CMakeLists.txt.patch | 49 +++++++++++++++++++ .../0002-Fix-FindFlatBuffers-cmake-file.patch | 37 ++++++++++++++ ...ink-tensorflow-lite-against-gemmlowp.patch | 32 ++++++++++++ package/tensorflow-lite/Config.in | 32 ++++++++++++ package/tensorflow-lite/tensorflow-lite.hash | 4 ++ package/tensorflow-lite/tensorflow-lite.mk | 49 +++++++++++++++++++ 7 files changed, 204 insertions(+) create mode 100644 package/tensorflow-lite/0001-lite-Update-CMakeLists.txt.patch create mode 100644 package/tensorflow-lite/0002-Fix-FindFlatBuffers-cmake-file.patch create mode 100644 package/tensorflow-lite/0003-Don-t-link-tensorflow-lite-against-gemmlowp.patch create mode 100644 package/tensorflow-lite/Config.in create mode 100644 package/tensorflow-lite/tensorflow-lite.hash create mode 100644 package/tensorflow-lite/tensorflow-lite.mkpackage/Config.in +1
-0@@ -2105,6 +2105,7 @@ endif source "package/sphinxbase/Config.in" source "package/startup-notification/Config.in" source "package/tbb/Config.in" + source "package/tensorflow-lite/Config.in" source "package/tinycbor/Config.in" source "package/tz/Config.in" source "package/tzdata/Config.in"package/tensorflow-lite/0001-lite-Update-CMakeLists.txt.patch new file +49
-0@@ -0,0 +1,49 @@ +From 081c2e4e3cf021efb2853a485a18b563e88f6117 Mon Sep 17 00:00:00 2001 +From: Terry Heo <[email protected]> +Date: Tue, 1 Nov 2022 15:55:30 -0700 +Subject: [PATCH] lite: Update CMakeLists.txt + +This changes are needed to build kernel tests. + +PiperOrigin-RevId: 485439972 + +Signed-off-by: James Hilliard <[email protected]> +[[email protected]: backport from upstream commit +081c2e4e3cf021efb2853a485a18b563e88f6117] +--- + tensorflow/lite/CMakeLists.txt | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index 9dfbb4b72f3..fd8b3faf1e2 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -209,6 +209,9 @@ list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*tflite_with_xnnpack\\.cc$") + # Exclude Flex related files. + list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*with_selected_ops\\.cc$") + ++# Exclude tensorflow_profiler_logger files. ++list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*tensorflow_profiler_logger\\.cc$") ++ + if(_TFLITE_ENABLE_MMAP) + list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*mmap_allocation_disabled\\.cc$") + else() +@@ -222,6 +225,7 @@ if(NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "iOS") + endif() + populate_tflite_source_vars("core" TFLITE_CORE_SRCS) + populate_tflite_source_vars("core/api" TFLITE_CORE_API_SRCS) ++populate_tflite_source_vars("core/c" TFLITE_CORE_C_SRCS) + populate_tflite_source_vars("c" TFLITE_C_SRCS) + populate_tflite_source_vars("delegates" TFLITE_DELEGATES_SRCS) + if(TFLITE_ENABLE_GPU) +@@ -483,6 +487,7 @@ endif() + # TFLite library + set(_ALL_TFLITE_SRCS + ${TFLITE_CORE_API_SRCS} ++ ${TFLITE_CORE_C_SRCS} + ${TFLITE_CORE_SRCS} + ${TFLITE_C_SRCS} + ${TFLITE_DELEGATES_FLEX_SRCS} +-- +2.34.1 +package/tensorflow-lite/0002-Fix-FindFlatBuffers-cmake-file.patch new file +37
-0@@ -0,0 +1,37 @@ +From a4ff4b5e952a22906ac0ed01e73f84f42926c325 Mon Sep 17 00:00:00 2001 +From: James Hilliard <[email protected]> +Date: Thu, 24 Nov 2022 14:29:06 -0700 +Subject: [PATCH] Fix FindFlatBuffers cmake file + +Capitalization needs to match for system cmake override to work: +https://github.com/google/flatbuffers/blob/v22.11.23/CMake/FindFlatBuffers.cmake + +Signed-off-by: James Hilliard <[email protected]> +[Upstream status: +https://github.com/tensorflow/tensorflow/pull/58677] +--- + tensorflow/lite/CMakeLists.txt | 2 +- + .../modules/{FindFlatbuffers.cmake => FindFlatBuffers.cmake} | 0 + 2 files changed, 1 insertion(+), 1 deletion(-) + rename tensorflow/lite/tools/cmake/modules/{FindFlatbuffers.cmake => FindFlatBuffers.cmake} (100%) + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index f9c30d6a046..c2ee9edfb61 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -143,7 +143,7 @@ find_package(absl REQUIRED) + find_package(Eigen3 REQUIRED) + find_package(farmhash REQUIRED) + find_package(fft2d REQUIRED) +-find_package(Flatbuffers REQUIRED) ++find_package(FlatBuffers REQUIRED) + find_package(gemmlowp REQUIRED) + find_package(NEON_2_SSE REQUIRED) + find_package(cpuinfo REQUIRED) #CPUINFO is used by XNNPACK and RUY library +diff --git a/tensorflow/lite/tools/cmake/modules/FindFlatbuffers.cmake b/tensorflow/lite/tools/cmake/modules/FindFlatBuffers.cmake +similarity index 100% +rename from tensorflow/lite/tools/cmake/modules/FindFlatbuffers.cmake +rename to tensorflow/lite/tools/cmake/modules/FindFlatBuffers.cmake +-- +2.34.1 +package/tensorflow-lite/0003-Don-t-link-tensorflow-lite-against-gemmlowp.patch new file +32
-0@@ -0,0 +1,32 @@ +From fb584589f707853d85a081c99b1b82598c2631c1 Mon Sep 17 00:00:00 2001 +From: James Hilliard <[email protected]> +Date: Thu, 24 Nov 2022 15:10:27 -0700 +Subject: [PATCH] Don't link tensorflow-lite against gemmlowp + +We can't link against gemmlowp as it is a header only library. + +Fixes: +/bin/ld: cannot find -lgemmlowp: No such file or directory + +Signed-off-by: James Hilliard <[email protected]> +[Upstream status: +https://github.com/tensorflow/tensorflow/pull/58678] +--- + tensorflow/lite/CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index f9c30d6a046..3fe5ed15605 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -560,7 +560,6 @@ target_link_libraries(tensorflow-lite + farmhash + fft2d_fftsg2d + flatbuffers::flatbuffers +- gemmlowp + ruy::ruy + pthreadpool + ${CMAKE_DL_LIBS} +-- +2.34.1 +package/tensorflow-lite/Config.in new file +0
-0Quoted 8 lines
package/tensorflow-lite/Config.in line 3
Quoted 7 lines
index 0000000000..9231d674bd
package/tensorflow-lite/Config.in new file +3
-0@@ -0,0 +1,32 @@ +config BR2_PACKAGE_TENSORFLOW_LITE + bool "tensorflow-lite" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_9Can you please add to comment that explains why this version of GCC is needed?
Quoted 1 line
I'm not sure why this is, maybe Stephan Hager can clarify.
The Tensorflow-lite build documentation for cmake on ARM uses gcc.arm.8.3 in their example.
BR offers the GCC Variables BR2_TOOLCHAIN_GCC_AT_LEAST_8, BR2_TOOLCHAIN_GCC_AT_LEAST_9 and ships with GCC 10/11/12. So choosing BR2_TOOLCHAIN_GCC_AT_LEAST_9 seemed a good solution to me.
Since i do not have prebuilt GCC8.0...GCC9.0 on hand selectiong 9 as minimum would be safe.
I tried setting to BR2_TOOLCHAIN_GCC_AT_LEAST_8 in the config and run the 'utils/./test-pkg -a'. Only 3 out of 44 possible toolchains were used for testing (the same as when using BR2_TOOLCHAIN_GCC_AT_LEAST_9), but none of them uses GCC 8.
Maybe someone can test and proof that it also works with GCC Versions < 9?
Quoted 117 lines
Quoted 18 lines
Quoted 8 lines
package/tensorflow-lite/Config.in new file +6
-0+ depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_SHARED_LIBS + depends on ( BR2_arm && BR2_ARM_CPU_ARMV7A ) || ( BR2_aarch64 && BR2_ARM_CPU_ARMV8A ) + select BR2_PACKAGE_CPUINFOpackage/tensorflow-lite/Config.in line 19
Quoted 10 lines
package/tensorflow-lite/Config.in new file +10
-0+ select BR2_PACKAGE_EIGEN + select BR2_PACKAGE_FARMHASH + select BR2_PACKAGE_FFT2D + select BR2_PACKAGE_FLATBUFFERS + select BR2_PACKAGE_GEMMLOWP + select BR2_PACKAGE_LIBABSEIL_CPP + select BR2_PACKAGE_NEON_2_SSE + select BR2_PACKAGE_RUY + help + Tensorflow Lite dynamic library and headers: Inference engine to run previously trained machine learning models.Quoted 2 lines
The text is too long. Please run "utils/check-package" to see the warning that it generates.
Fixed in v3:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/Quoted 8 lines
A couple of suggestions:
1) would it be possible to add an option to build and install thelabel_imageexample? It is always handy to be able to test this package once it is built.
2) would it be possible to add an option to build and install thebenchmark_modeltool? This tool provides useful performance information.Not sure there's really a good way to do this without adding a config flag upstream.
Quoted 68 lines
Quoted 68 lines
package/tensorflow-lite/Config.in new file +13
-0+ +comment "tensorflow-lite needs needs a toolchain w/ gcc >= 9" + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_9 + +comment "tensorflow-lite needs a toolchain w/ glibc, C++, threads" + depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS + +comment "tensorflow-lite needs a toolchain w/ shared libraries" + depends on !BR2_SHARED_LIBS + +comment "tensorflow-lite in buildroot currently only supports arm + armv7a cpu or arm64 + armv8a cpu targets" + depends on ( BR2_arm && !BR2_ARM_CPU_ARMV7A ) || ( BR2_aarch64 && !BR2_ARM_CPU_ARMV8A) || (!BR2_arm && !BR2_aarch64)package/tensorflow-lite/tensorflow-lite.hash new file +4
-0@@ -0,0 +1,4 @@ +# Locally calculated +sha256 99c732b92b1b37fc243a559e02f9aef5671771e272758aa4aec7f34dc92dac48 tensorflow-lite-2.11.0.tar.gz +# License files, locally calculated +sha256 71c6915d04265772a0339bed47276942c678b45cc01534210ebe6984fd1aec65 LICENSEpackage/tensorflow-lite/tensorflow-lite.mk new file +38
-0@@ -0,0 +1,49 @@ +################################################################################ +# +# tensorflow-lite +# +################################################################################ + +TENSORFLOW_LITE_VERSION = 2.11.0 +TENSORFLOW_LITE_SITE = $(call github,tensorflow,tensorflow,v$(TENSORFLOW_LITE_VERSION)) +TENSORFLOW_LITE_INSTALL_STAGING = YES +TENSORFLOW_LITE_LICENSE = Apache-2.0 +TENSORFLOW_LITE_LICENSE_FILES = LICENSE +TENSORFLOW_LITE_SUBDIR = tensorflow/lite +TENSORFLOW_LITE_SUPPORTS_IN_SOURCE_BUILD = NO +TENSORFLOW_LITE_DEPENDENCIES += \ + host-pkgconf \ + host-flatbuffers \ + cpuinfo \ + eigen \ + farmhash \ + fft2d \ + flatbuffers \ + gemmlowp \ + libabseil-cpp \ + neon-2-sse \ + ruy + +TENSORFLOW_LITE_CONF_OPTS = \ + -Dabsl_DIR=$(STAGING_DIR)/usr/lib/cmake/absl \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -I$(STAGING_DIR)/usr/include/gemmlowp" \ + -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DEigen3_DIR=$(STAGING_DIR)/usr/share/eigen3/cmake \ + -DFARMHASH_SOURCE_DIR=$(FARMHASH_DIR) \ + -Dfarmhash_DIR=$(STAGING_DIR)/usr/lib \ + -DFETCHCONTENT_FULLY_DISCONNECTED=ON \ + -DFETCHCONTENT_QUIET=OFF \ + -DFFT2D_SOURCE_DIR=$(STAGING_DIR)/usr/include/fft2d \Quoted 8 lines
package/tensorflow-lite/tensorflow-lite.mk line 45
Quoted 7 lines
package/tensorflow-lite/tensorflow-lite.mk new file +7
-0+ -DFlatBuffers_DIR=$(STAGING_DIR)/usr/lib/cmake/flatbuffers \ + -DNEON_2_SSE_DIR=$(STAGING_DIR)/usr/lib/cmake/NEON_2_SSE \ + -DTFLITE_ENABLE_EXTERNAL_DELEGATE=ON \ + -DTFLITE_ENABLE_GPU=OFF \ + -DTFLITE_ENABLE_INSTALL=ON \ + -DTFLITE_ENABLE_MMAP=ON \ + -DTFLITE_ENABLE_NNAPI=ON \I thought NNAPI was used in Android. Can you explain why it is required here?
Disabled in v3:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/Quoted 1 line
Quoted 8 lines
Quoted 4 lines
package/tensorflow-lite/tensorflow-lite.mk line 47
Quoted 2 lines
package/tensorflow-lite/tensorflow-lite.mk new file +2
-0+ -DTFLITE_ENABLE_RUY=ON \ + -DTFLITE_ENABLE_XNNPACK=OFFany reason why xnnpack is not enabled? It would be great to enable it as an option.
Mostly since it's not a required dependency and haven't added the dependency yet. Will look into adding that as a followup once this is merged.
I agree, it would be a nice addition, but not a necessity for the initial merge.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
package/tensorflow-lite/tensorflow-lite.mk new file +2
-1+ +$(eval $(cmake-package)) --2.34.1
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildrootthanks
Gilles.
Regards,
Stefan
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 8/8] package/tensorflow-lite: new package
Hi all,
Quoted 28 lines
Quoted 28 lines
From: James Hilliard <[email protected]>
Sent: Tuesday, January 24, 2023 10:27
To: Gilles Talis <[email protected]>
Cc: [email protected] <[email protected]>; Hager Stefan <[email protected]>; Samuel Martin <[email protected]>; Fabrice Fontaine <[email protected]>; Thomas Petazzoni <[email protected]>
Subject: Re: [Buildroot] [PATCH v2 8/8] package/tensorflow-lite: new packageQuoted 21 lines · Gilles Talis
Hi James, Hi Stefan,
fyi, I could build and successfully test tensorflow lite on an aarch64 platform with Cortex A53 cores.
a few comments though.Quoted 12 lines · James Hilliard
From: Stefan Hager <[email protected]>
This package adds the tensorflow lite runtime to buildroot.
Signed-off-by Stefan Hager <[email protected]>Signed-off-by James Hilliard <[email protected]>---
Changes v1 -> v2:
- fixlabel_imagebuild
- more explicit cmake config
---
[SNIP]
Quoted 18 lines
Quoted 11 lines
Quoted 10 lines
package/tensorflow-lite/Config.in line 3
Quoted 9 lines
package/tensorflow-lite/Config.in new file +3
-0@@ -0,0 +1,32 @@ +config BR2_PACKAGE_TENSORFLOW_LITE + bool "tensorflow-lite" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_9Can you please add to comment that explains why this version of GCC is needed?
Quoted 1 line
I'm not sure why this is, maybe Stephan Hager can clarify.
The Tensorflow-lite build documentation for cmake on ARM uses gcc.arm.8.3 in their example.
BR offers the GCC VariablesBR2_TOOLCHAIN_GCC_AT_LEAST_8,BR2_TOOLCHAIN_GCC_AT_LEAST_9and ships with GCC 10/11/12. So choosingBR2_TOOLCHAIN_GCC_AT_LEAST_9seemed a good solution to me.
Since i do not have prebuilt GCC8.0...GCC9.0 on hand selectiong 9 as minimum would be safe.
Quoted 6 lines
I tried setting to
BR2_TOOLCHAIN_GCC_AT_LEAST_8in the config and run the 'utils/./test-pkg -a'. Only 3 out of 44 possible toolchains were used for testing (the same as when usingBR2_TOOLCHAIN_GCC_AT_LEAST_9), but none of them uses GCC 8.Maybe someone can test and proof that it also works with GCC Versions < 9?
I successfully compiled and tested v3 of this patch series. tensorflow-lite and the label_image example build for armv7 with GCC 8.4 and GCC 7.5.
So I guess BR2_TOOLCHAIN_GCC_AT_LEAST_7 should be enough. The justification for GCC 7 being tensorflows need for C++17.
Quoted 139 lines
Quoted 117 lines
Quoted 18 lines
Quoted 8 lines
package/tensorflow-lite/Config.in new file +6
-0+ depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_SHARED_LIBS + depends on ( BR2_arm && BR2_ARM_CPU_ARMV7A ) || ( BR2_aarch64 && BR2_ARM_CPU_ARMV8A ) + select BR2_PACKAGE_CPUINFOpackage/tensorflow-lite/Config.in line 19
Quoted 10 lines
package/tensorflow-lite/Config.in new file +10
-0+ select BR2_PACKAGE_EIGEN + select BR2_PACKAGE_FARMHASH + select BR2_PACKAGE_FFT2D + select BR2_PACKAGE_FLATBUFFERS + select BR2_PACKAGE_GEMMLOWP + select BR2_PACKAGE_LIBABSEIL_CPP + select BR2_PACKAGE_NEON_2_SSE + select BR2_PACKAGE_RUY + help + Tensorflow Lite dynamic library and headers: Inference engine to run previously trained machine learning models.Quoted 2 lines
The text is too long. Please run "utils/check-package" to see the warning that it generates.
Fixed in v3:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/Quoted 8 lines
A couple of suggestions:
1) would it be possible to add an option to build and install thelabel_imageexample? It is always handy to be able to test this package once it is built.
2) would it be possible to add an option to build and install thebenchmark_modeltool? This tool provides useful performance information.Not sure there's really a good way to do this without adding a config flag upstream.
Quoted 68 lines
Quoted 68 lines
package/tensorflow-lite/Config.in new file +13
-0+ +comment "tensorflow-lite needs needs a toolchain w/ gcc >= 9" + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_9 + +comment "tensorflow-lite needs a toolchain w/ glibc, C++, threads" + depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS + +comment "tensorflow-lite needs a toolchain w/ shared libraries" + depends on !BR2_SHARED_LIBS + +comment "tensorflow-lite in buildroot currently only supports arm + armv7a cpu or arm64 + armv8a cpu targets" + depends on ( BR2_arm && !BR2_ARM_CPU_ARMV7A ) || ( BR2_aarch64 && !BR2_ARM_CPU_ARMV8A) || (!BR2_arm && !BR2_aarch64)package/tensorflow-lite/tensorflow-lite.hash new file +4
-0@@ -0,0 +1,4 @@ +# Locally calculated +sha256 99c732b92b1b37fc243a559e02f9aef5671771e272758aa4aec7f34dc92dac48 tensorflow-lite-2.11.0.tar.gz +# License files, locally calculated +sha256 71c6915d04265772a0339bed47276942c678b45cc01534210ebe6984fd1aec65 LICENSEpackage/tensorflow-lite/tensorflow-lite.mk new file +38
-0@@ -0,0 +1,49 @@ +################################################################################ +# +# tensorflow-lite +# +################################################################################ + +TENSORFLOW_LITE_VERSION = 2.11.0 +TENSORFLOW_LITE_SITE = $(call github,tensorflow,tensorflow,v$(TENSORFLOW_LITE_VERSION)) +TENSORFLOW_LITE_INSTALL_STAGING = YES +TENSORFLOW_LITE_LICENSE = Apache-2.0 +TENSORFLOW_LITE_LICENSE_FILES = LICENSE +TENSORFLOW_LITE_SUBDIR = tensorflow/lite +TENSORFLOW_LITE_SUPPORTS_IN_SOURCE_BUILD = NO +TENSORFLOW_LITE_DEPENDENCIES += \ + host-pkgconf \ + host-flatbuffers \ + cpuinfo \ + eigen \ + farmhash \ + fft2d \ + flatbuffers \ + gemmlowp \ + libabseil-cpp \ + neon-2-sse \ + ruy + +TENSORFLOW_LITE_CONF_OPTS = \ + -Dabsl_DIR=$(STAGING_DIR)/usr/lib/cmake/absl \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -I$(STAGING_DIR)/usr/include/gemmlowp" \ + -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ + -DEigen3_DIR=$(STAGING_DIR)/usr/share/eigen3/cmake \ + -DFARMHASH_SOURCE_DIR=$(FARMHASH_DIR) \ + -Dfarmhash_DIR=$(STAGING_DIR)/usr/lib \ + -DFETCHCONTENT_FULLY_DISCONNECTED=ON \ + -DFETCHCONTENT_QUIET=OFF \ + -DFFT2D_SOURCE_DIR=$(STAGING_DIR)/usr/include/fft2d \Quoted 8 lines
package/tensorflow-lite/tensorflow-lite.mk line 45
Quoted 7 lines
package/tensorflow-lite/tensorflow-lite.mk new file +7
-0+ -DFlatBuffers_DIR=$(STAGING_DIR)/usr/lib/cmake/flatbuffers \ + -DNEON_2_SSE_DIR=$(STAGING_DIR)/usr/lib/cmake/NEON_2_SSE \ + -DTFLITE_ENABLE_EXTERNAL_DELEGATE=ON \ + -DTFLITE_ENABLE_GPU=OFF \ + -DTFLITE_ENABLE_INSTALL=ON \ + -DTFLITE_ENABLE_MMAP=ON \ + -DTFLITE_ENABLE_NNAPI=ON \I thought NNAPI was used in Android. Can you explain why it is required here?
Disabled in v3:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/Quoted 1 line
Quoted 8 lines
Quoted 4 lines
package/tensorflow-lite/tensorflow-lite.mk line 47
Quoted 2 lines
package/tensorflow-lite/tensorflow-lite.mk new file +2
-0+ -DTFLITE_ENABLE_RUY=ON \ + -DTFLITE_ENABLE_XNNPACK=OFFany reason why xnnpack is not enabled? It would be great to enable it as an option.
Mostly since it's not a required dependency and haven't added the dependency yet. Will look into adding that as a followup once this is merged.
I agree, it would be a nice addition, but not a necessity for the initial merge.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
package/tensorflow-lite/tensorflow-lite.mk new file +2
-1+ +$(eval $(cmake-package)) --2.34.1
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
thanks
Gilles.Regards,
Stefan
Regards,
Daniel
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 5 lines · James Hilliard
The upcoming tensorflow-lite package requires flatbuffers to be built with position independent code.
Fixes:
/home/buildroot/buildroot/output/per-package/tensorflow-lite/host/bin/../lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: /home/buildroot/buildroot/output/per-package/tensorflow-lite/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libflatbuffers.a(util.cpp.o): relocationR_AARCH64_ADR_PREL_PG_HI21against symbol `_ZN11flatbuffers11CharToUpperEc' which may bind externally can not be used when making a shared object; recompile with -fPIC
This looks like something that would happen any time you try to link
flatbuffers - so it should happen for kodi as well. In that case, the patch should be applied to master. Can you check if this is the case? You unfortunately can't rely on autobuilders, kodi has so many dependencies that it (almost?) never gets built. There were 91 configurations in 2022 that included kodi [1]; all of them failed, and I think all of them failed before reaching kodi...
Regards,
Arnout
[1] http://autobuild.buildroot.net/index.php?date%5Bfrom%5D=2022-01-01&symbols%5BBR2_PACKAGE_KODI%5D=y
Quoted 11 lines
Signed-off-by James Hilliard <[email protected]>--- package/flatbuffers/flatbuffers.mk | 1 + 1 file changed, 1 insertion(+)package/flatbuffers/flatbuffers.mk +0
-0
package/flatbuffers/flatbuffers.mk FLATBUFFERS_DEPENDENCIES = host-flatbuffers · line 20
Quoted 7 lines
package/flatbuffers/flatbuffers.mk +1
-0@@ -14,6 +14,7 @@ FLATBUFFERS_DEPENDENCIES = host-flatbuffers FLATBUFFERS_CONF_OPTS += \ -DCMAKE_CXX_FLAGS="-std=c++11" \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DFLATBUFFERS_BUILD_TESTS=OFF \ -DFLATBUFFERS_FLATC_EXECUTABLE=$(HOST_DIR)/bin/flatc
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 10 lines · Arnout Vandecappelle
Quoted 5 lines · James Hilliard
The upcoming tensorflow-lite package requires flatbuffers to be built with position independent code.
Fixes:
/home/buildroot/buildroot/output/per-package/tensorflow-lite/host/bin/../lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: /home/buildroot/buildroot/output/per-package/tensorflow-lite/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libflatbuffers.a(util.cpp.o): relocationR_AARCH64_ADR_PREL_PG_HI21against symbol `_ZN11flatbuffers11CharToUpperEc' which may bind externally can not be used when making a shared object; recompile with -fPIC
Quoted 6 lines
This looks like something that would happen any time you try to link
flatbuffers - so it should happen for kodi as well. In that case, the patch should be applied to master. Can you check if this is the case? You unfortunately can't rely on autobuilders, kodi has so many dependencies that it (almost?) never gets built. There were 91 configurations in 2022 that included kodi [1]; all of them failed, and I think all of them failed before reaching kodi...
I tried building kodi manually and ran into build issues as well, so unclear if this is needed for kodi, but I think it's probably safe to apply to master.
By the way I think all those autobuilder configs were generated by tweaking kconfig probability with this patch using a local override:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
I think that plus shuffle mode might allow for coverage of packages with more dependencies, some fixes related to shuffle mode:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
Quoted 21 lines
Regards,
Arnout[1]
http://autobuild.buildroot.net/index.php?date%5Bfrom%5D=2022-01-01&symbols%5BBR2_PACKAGE_KODI%5D=yQuoted 12 lines
Signed-off-by James Hilliard <[email protected]>--- package/flatbuffers/flatbuffers.mk | 1 + 1 file changed, 1 insertion(+)package/flatbuffers/flatbuffers.mk +0
-0@@ -14,6 +14,7 @@ FLATBUFFERS_DEPENDENCIES = host-flatbuffers
Quoted 6 lines
package/flatbuffers/flatbuffers.mk FLATBUFFERS_DEPENDENCIES = host-flatbuffers · line 20
Quoted 6 lines
package/flatbuffers/flatbuffers.mk +1
-0FLATBUFFERS_CONF_OPTS += \ -DCMAKE_CXX_FLAGS="-std=c++11" \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DFLATBUFFERS_BUILD_TESTS=OFF \ -DFLATBUFFERS_FLATC_EXECUTABLE=$(HOST_DIR)/bin/flatc
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 19 lines · James Hilliard
Quoted 10 lines · Arnout Vandecappelle
Quoted 5 lines · James Hilliard
The upcoming tensorflow-lite package requires flatbuffers to be built with position independent code.
Fixes:
/home/buildroot/buildroot/output/per-package/tensorflow-lite/host/bin/../lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: /home/buildroot/buildroot/output/per-package/tensorflow-lite/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libflatbuffers.a(util.cpp.o): relocationR_AARCH64_ADR_PREL_PG_HI21against symbol `_ZN11flatbuffers11CharToUpperEc' which may bind externally can not be used when making a shared object; recompile with -fPICQuoted 6 lines
This looks like something that would happen any time you try to link
flatbuffers - so it should happen for kodi as well. In that case, the patch should be applied to master. Can you check if this is the case? You unfortunately can't rely on autobuilders, kodi has so many dependencies that it (almost?) never gets built. There were 91 configurations in 2022 that included kodi [1]; all of them failed, and I think all of them failed before reaching kodi...
Quoted 2 lines
I tried building kodi manually and ran into build issues as well, so unclear if this is needed for kodi, but I think it's probably safe to apply to master.
Fixed the kodi build issues:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
This doesn't seem to be needed for kodi, I did verify it does not cause any build issues for kodi so should be safe to apply to master.
Quoted 31 lines
By the way I think all those autobuilder configs were generated by tweaking kconfig probability with this patch using a local override:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/I think that plus shuffle mode might allow for coverage of packages with more dependencies, some fixes related to shuffle mode:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/Quoted 21 lines
Regards,
Arnout[1]
http://autobuild.buildroot.net/index.php?date%5Bfrom%5D=2022-01-01&symbols%5BBR2_PACKAGE_KODI%5D=yQuoted 12 lines
Signed-off-by James Hilliard <[email protected]>--- package/flatbuffers/flatbuffers.mk | 1 + 1 file changed, 1 insertion(+)package/flatbuffers/flatbuffers.mk +0
-0@@ -14,6 +14,7 @@ FLATBUFFERS_DEPENDENCIES = host-flatbuffers
Quoted 6 lines
Quoted 6 lines
package/flatbuffers/flatbuffers.mk FLATBUFFERS_DEPENDENCIES = host-flatbuffers · line 20
Quoted 6 lines
package/flatbuffers/flatbuffers.mk +1
-0FLATBUFFERS_CONF_OPTS += \ -DCMAKE_CXX_FLAGS="-std=c++11" \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DFLATBUFFERS_BUILD_TESTS=OFF \ -DFLATBUFFERS_FLATC_EXECUTABLE=$(HOST_DIR)/bin/flatc
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
From: James Hilliard <[email protected]>
Sent: Monday, November 28, 2022 18:58
To: [email protected] <[email protected]>
Cc: Thomas Petazzoni <[email protected]>; Fabrice Fontaine <[email protected]>; Samuel Martin <[email protected]>; Hager Stefan <[email protected]>; James Hilliard <[email protected]>
Subject: [PATCH v2 1/8] package/flatbuffers: build position independent code
The upcoming tensorflow-lite package requires flatbuffers to be
built with position independent code.
Fixes:/home/buildroot/buildroot/output/per-package/tensorflow-lite/host/bin/../lib/gcc/aarch64-buildroot-linux-gnu/11.3.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: /home/buildroot/buildroot/output/per-package/tensorflow-lite/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/libflatbuffers.a(util.cpp.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZN11flatbuffers11CharToUpperEc' which may bind externally can not be used when making a shared object; recompile with -fPIC
---
package/flatbuffers/flatbuffers.mk | 1 +
1 file changed, 1 insertion(+)
package/flatbuffers/flatbuffers.mk +0 -0
@@ -14,6 +14,7 @@ FLATBUFFERS_DEPENDENCIES = host-flatbuffers
FLATBUFFERS_CONF_OPTS += \
-DCMAKE_CXX_FLAGS="-std=c++11" \
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DFLATBUFFERS_BUILD_TESTS=OFF \
-DFLATBUFFERS_FLATC_EXECUTABLE=$(HOST_DIR)/bin/flatc
Signature · 1 line
2.34.1
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot