All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code
@ 2023-01-27 14:10 James Hilliard
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 02/13] package/cpuinfo: new package James Hilliard
                   ` (12 more replies)
  0 siblings, 13 replies; 23+ messages in thread
From: James Hilliard @ 2023-01-27 14:10 UTC (permalink / raw)
  To: buildroot
  Cc: Stefan Hager, James Hilliard, Samuel Martin, Fabrice Fontaine,
	Thomas Petazzoni

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

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/flatbuffers/flatbuffers.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/flatbuffers/flatbuffers.mk b/package/flatbuffers/flatbuffers.mk
index 9d286bf9e1..487d85ee1f 100644
--- a/package/flatbuffers/flatbuffers.mk
+++ b/package/flatbuffers/flatbuffers.mk
@@ -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
 
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH v4 02/13] package/cpuinfo: new package
  2023-01-27 14:10 [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code James Hilliard
@ 2023-01-27 14:10 ` James Hilliard
  2023-01-29 21:18   ` Yann E. MORIN
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 03/13] package/ruy: " James Hilliard
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 23+ messages in thread
From: James Hilliard @ 2023-01-27 14:10 UTC (permalink / raw)
  To: buildroot
  Cc: Stefan Hager, James Hilliard, Samuel Martin, Fabrice Fontaine,
	Thomas Petazzoni

From: Stefan Hager <stefan.hager@ginzinger.com>

This package is required by tensorflow-lite.

Tested-by: Stefan Hager <stefan.hager@ginzinger.com>
Signed-off-by: Stefan Hager <stefan.hager@ginzinger.com>
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
Changes v2 -> v3:
  - move to libraries->hardware handling
---
 DEVELOPERS                   |  3 +++
 package/Config.in            |  1 +
 package/cpuinfo/Config.in    |  9 +++++++++
 package/cpuinfo/cpuinfo.hash |  4 ++++
 package/cpuinfo/cpuinfo.mk   | 17 +++++++++++++++++
 5 files changed, 34 insertions(+)
 create mode 100644 package/cpuinfo/Config.in
 create mode 100644 package/cpuinfo/cpuinfo.hash
 create mode 100644 package/cpuinfo/cpuinfo.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index e8e0dffcd3..3fd5ea32bc 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2701,6 +2701,9 @@ F:	package/libvpx/
 F:	package/mesa3d-demos/
 F:	package/ti-gfx/
 
+N:	Stefan Hager <stefan.hager@ginzinger.com>
+F:	package/cpuinfo/
+
 N:	Stefan Ott <stefan@ott.net>
 F:	package/unbound/
 
diff --git a/package/Config.in b/package/Config.in
index 995dae2c57..5537699c86 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1637,6 +1637,7 @@ menu "Hardware handling"
 	source "package/bcm2835/Config.in"
 	source "package/c-periphery/Config.in"
 	source "package/ccid/Config.in"
+	source "package/cpuinfo/Config.in"
 	source "package/dtc/Config.in"
 	source "package/gnu-efi/Config.in"
 	source "package/hackrf/Config.in"
diff --git a/package/cpuinfo/Config.in b/package/cpuinfo/Config.in
new file mode 100644
index 0000000000..137f657d69
--- /dev/null
+++ b/package/cpuinfo/Config.in
@@ -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
diff --git a/package/cpuinfo/cpuinfo.hash b/package/cpuinfo/cpuinfo.hash
new file mode 100644
index 0000000000..c3f70fa90f
--- /dev/null
+++ b/package/cpuinfo/cpuinfo.hash
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  0936848904943381b2c01321101614776e43d583840ee0f3ceeea1e3fb7405f7  cpuinfo-de2fa78ebb431db98489e78603e4f77c1f6c5c57.tar.gz
+# License files, locally calculated
+sha256  8e7e60636c3aa0cb03571a1a841ce5697f9551ff92b3c426c2561613d15ade70  LICENSE
diff --git a/package/cpuinfo/cpuinfo.mk b/package/cpuinfo/cpuinfo.mk
new file mode 100644
index 0000000000..ab6a0269ec
--- /dev/null
+++ b/package/cpuinfo/cpuinfo.mk
@@ -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

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH v4 03/13] package/ruy: new package
  2023-01-27 14:10 [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code James Hilliard
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 02/13] package/cpuinfo: new package James Hilliard
@ 2023-01-27 14:10 ` James Hilliard
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 04/13] package/gemmlowp: " James Hilliard
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 23+ messages in thread
From: James Hilliard @ 2023-01-27 14:10 UTC (permalink / raw)
  To: buildroot
  Cc: Stefan Hager, James Hilliard, Samuel Martin, Fabrice Fontaine,
	Thomas Petazzoni

From: Stefan Hager <stefan.hager@ginzinger.com>

This package is required by tensorflow-lite.

Tested-by: Stefan Hager <stefan.hager@ginzinger.com>
Signed-off-by: Stefan Hager <stefan.hager@ginzinger.com>
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
Changes v2 -> v3:
  - add C++14 dependency
---
 DEVELOPERS            |  1 +
 package/Config.in     |  1 +
 package/ruy/Config.in | 16 ++++++++++++++++
 package/ruy/ruy.hash  |  4 ++++
 package/ruy/ruy.mk    | 18 ++++++++++++++++++
 5 files changed, 40 insertions(+)
 create mode 100644 package/ruy/Config.in
 create mode 100644 package/ruy/ruy.hash
 create mode 100644 package/ruy/ruy.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 3fd5ea32bc..ba26d5f999 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2703,6 +2703,7 @@ F:	package/ti-gfx/
 
 N:	Stefan Hager <stefan.hager@ginzinger.com>
 F:	package/cpuinfo/
+F:	package/ruy/
 
 N:	Stefan Ott <stefan@ott.net>
 F:	package/unbound/
diff --git a/package/Config.in b/package/Config.in
index 5537699c86..29d55ef2b3 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2110,6 +2110,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"
diff --git a/package/ruy/Config.in b/package/ruy/Config.in
new file mode 100644
index 0000000000..c46f5c6cc9
--- /dev/null
+++ b/package/ruy/Config.in
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_RUY
+	bool "ruy"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14
+	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
+
+comment "ruy needs a toolchain w/ C++14"
+	depends on !BR2_INSTALL_LIBSTDCPP || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
diff --git a/package/ruy/ruy.hash b/package/ruy/ruy.hash
new file mode 100644
index 0000000000..98266b5881
--- /dev/null
+++ b/package/ruy/ruy.hash
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  4da8572946007603378c5d0280f48c5b77f4d38763209f5306b57c7513d9a82e  ruy-3168a5c8f4c447fd8cea94078121ee2e2cd87df0.tar.gz
+# License files, locally calculated
+sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE
diff --git a/package/ruy/ruy.mk b/package/ruy/ruy.mk
new file mode 100644
index 0000000000..ceeea8cd58
--- /dev/null
+++ b/package/ruy/ruy.mk
@@ -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

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH v4 04/13] package/gemmlowp: new package
  2023-01-27 14:10 [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code James Hilliard
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 02/13] package/cpuinfo: new package James Hilliard
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 03/13] package/ruy: " James Hilliard
@ 2023-01-27 14:10 ` James Hilliard
  2023-01-29 21:45   ` Yann E. MORIN
  2023-01-29 21:46   ` Yann E. MORIN
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 05/13] package/neon-2-sse: " James Hilliard
                   ` (9 subsequent siblings)
  12 siblings, 2 replies; 23+ messages in thread
From: James Hilliard @ 2023-01-27 14:10 UTC (permalink / raw)
  To: buildroot
  Cc: Stefan Hager, James Hilliard, Samuel Martin, Fabrice Fontaine,
	Thomas Petazzoni

From: Stefan Hager <stefan.hager@ginzinger.com>

This package is required by tensorflow-lite.

Tested-by: Stefan Hager <stefan.hager@ginzinger.com>
Signed-off-by: Stefan Hager <stefan.hager@ginzinger.com>
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
Changes v2 -> v3:
  - add C++11 dependency
---
 DEVELOPERS                     |  1 +
 package/Config.in              |  1 +
 package/gemmlowp/Config.in     | 12 ++++++++++++
 package/gemmlowp/gemmlowp.hash |  4 ++++
 package/gemmlowp/gemmlowp.mk   | 15 +++++++++++++++
 5 files changed, 33 insertions(+)
 create mode 100644 package/gemmlowp/Config.in
 create mode 100644 package/gemmlowp/gemmlowp.hash
 create mode 100644 package/gemmlowp/gemmlowp.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index ba26d5f999..f48ea66660 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2703,6 +2703,7 @@ F:	package/ti-gfx/
 
 N:	Stefan Hager <stefan.hager@ginzinger.com>
 F:	package/cpuinfo/
+F:	package/gemmlowp/
 F:	package/ruy/
 
 N:	Stefan Ott <stefan@ott.net>
diff --git a/package/Config.in b/package/Config.in
index 29d55ef2b3..8f78080963 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2009,6 +2009,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"
diff --git a/package/gemmlowp/Config.in b/package/gemmlowp/Config.in
new file mode 100644
index 0000000000..379450d1b0
--- /dev/null
+++ b/package/gemmlowp/Config.in
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_GEMMLOWP
+	bool "gemmlowp"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
+	help
+	  Low-precision matrix multiplication.
+
+	  https://github.com/google/gemmlowp
+
+comment "gemmlowp needs a toolchain w/ C++11"
+	depends on !BR2_INSTALL_LIBSTDCPP || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
diff --git a/package/gemmlowp/gemmlowp.hash b/package/gemmlowp/gemmlowp.hash
new file mode 100644
index 0000000000..7c56a18bb6
--- /dev/null
+++ b/package/gemmlowp/gemmlowp.hash
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  cc8a22b6f071c3781e6b4b72654c89b1cdc198e72ebadebb17638eac205344c1  gemmlowp-08e4bb339e34017a0835269d4a37c4ea04d15a69.tar.gz
+# License files, locally calculated
+sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE
diff --git a/package/gemmlowp/gemmlowp.mk b/package/gemmlowp/gemmlowp.mk
new file mode 100644
index 0000000000..1a36fc48f7
--- /dev/null
+++ b/package/gemmlowp/gemmlowp.mk
@@ -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

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH v4 05/13] package/neon-2-sse: new package
  2023-01-27 14:10 [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code James Hilliard
                   ` (2 preceding siblings ...)
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 04/13] package/gemmlowp: " James Hilliard
@ 2023-01-27 14:10 ` James Hilliard
  2023-01-29 21:58   ` Yann E. MORIN
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 06/13] package/fxdiv: " James Hilliard
                   ` (8 subsequent siblings)
  12 siblings, 1 reply; 23+ messages in thread
From: James Hilliard @ 2023-01-27 14:10 UTC (permalink / raw)
  To: buildroot
  Cc: Stefan Hager, James Hilliard, Samuel Martin, Fabrice Fontaine,
	Thomas Petazzoni

This package is required by tensorflow-lite.

Tested-by: Stefan Hager <stefan.hager@ginzinger.com>
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 DEVELOPERS                         |  1 +
 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 ++++++++++++++
 5 files changed, 29 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

diff --git a/DEVELOPERS b/DEVELOPERS
index f48ea66660..a711f9f1ee 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2704,6 +2704,7 @@ F:	package/ti-gfx/
 N:	Stefan Hager <stefan.hager@ginzinger.com>
 F:	package/cpuinfo/
 F:	package/gemmlowp/
+F:	package/neon-2-sse/
 F:	package/ruy/
 
 N:	Stefan Ott <stefan@ott.net>
diff --git a/package/Config.in b/package/Config.in
index 8f78080963..6377ddd2e5 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2101,6 +2101,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"
diff --git a/package/neon-2-sse/Config.in b/package/neon-2-sse/Config.in
new file mode 100644
index 0000000000..25613c5ec4
--- /dev/null
+++ b/package/neon-2-sse/Config.in
@@ -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
diff --git a/package/neon-2-sse/neon-2-sse.hash b/package/neon-2-sse/neon-2-sse.hash
new file mode 100644
index 0000000000..ded20d58f5
--- /dev/null
+++ b/package/neon-2-sse/neon-2-sse.hash
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  019fbc7ec25860070a1d90e12686fc160cfb33e22aa063c80f52b363f1361e9d  neon-2-sse-a15b489e1222b2087007546b4912e21293ea86ff.tar.gz
+# License files, locally calculated
+sha256  7022f51b439a5915e933ecc270c83e24ca0cb2cceeb08b0132dcd4dbb03ed2dc  LICENSE
diff --git a/package/neon-2-sse/neon-2-sse.mk b/package/neon-2-sse/neon-2-sse.mk
new file mode 100644
index 0000000000..0e9d066abd
--- /dev/null
+++ b/package/neon-2-sse/neon-2-sse.mk
@@ -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

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH v4 06/13] package/fxdiv: new package
  2023-01-27 14:10 [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code James Hilliard
                   ` (3 preceding siblings ...)
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 05/13] package/neon-2-sse: " James Hilliard
@ 2023-01-27 14:10 ` James Hilliard
  2023-01-29 22:28   ` Yann E. MORIN
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 07/13] package/pthreadpool: " James Hilliard
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 23+ messages in thread
From: James Hilliard @ 2023-01-27 14:10 UTC (permalink / raw)
  To: buildroot
  Cc: Stefan Hager, James Hilliard, Samuel Martin, Fabrice Fontaine,
	Thomas Petazzoni

This package is required by tensorflow-lite.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 DEVELOPERS               |  1 +
 package/Config.in        |  1 +
 package/fxdiv/Config.in  |  7 +++++++
 package/fxdiv/fxdiv.hash |  4 ++++
 package/fxdiv/fxdiv.mk   | 17 +++++++++++++++++
 5 files changed, 30 insertions(+)
 create mode 100644 package/fxdiv/Config.in
 create mode 100644 package/fxdiv/fxdiv.hash
 create mode 100644 package/fxdiv/fxdiv.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index a711f9f1ee..b600c2914e 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2703,6 +2703,7 @@ F:	package/ti-gfx/
 
 N:	Stefan Hager <stefan.hager@ginzinger.com>
 F:	package/cpuinfo/
+F:	package/fxdiv/
 F:	package/gemmlowp/
 F:	package/neon-2-sse/
 F:	package/ruy/
diff --git a/package/Config.in b/package/Config.in
index 6377ddd2e5..e393760b6a 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2007,6 +2007,7 @@ menu "Other"
 	source "package/flann/Config.in"
 	source "package/flatbuffers/Config.in"
 	source "package/flatcc/Config.in"
+	source "package/fxdiv/Config.in"
 	source "package/gconf/Config.in"
 	source "package/gdal/Config.in"
 	source "package/gemmlowp/Config.in"
diff --git a/package/fxdiv/Config.in b/package/fxdiv/Config.in
new file mode 100644
index 0000000000..5aa714e44a
--- /dev/null
+++ b/package/fxdiv/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_FXDIV
+	bool "fxdiv"
+	help
+	  Header-only library for division via fixed-point
+	  multiplication by inverse.
+
+	  https://github.com/Maratyszcza/FXdiv
diff --git a/package/fxdiv/fxdiv.hash b/package/fxdiv/fxdiv.hash
new file mode 100644
index 0000000000..2142d84e09
--- /dev/null
+++ b/package/fxdiv/fxdiv.hash
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  ec74d882a0a47cfd9c0f95bc4fae9901a4ade802a96a3b76e02671bb7340a4c5  fxdiv-63058eff77e11aa15bf531df5dd34395ec3017c8.tar.gz
+# License files, locally calculated
+sha256  7cac00006125b1486a27e4801ed66357236e984c540bd323945ab7b66b078ec3  LICENSE
diff --git a/package/fxdiv/fxdiv.mk b/package/fxdiv/fxdiv.mk
new file mode 100644
index 0000000000..56aaf11f88
--- /dev/null
+++ b/package/fxdiv/fxdiv.mk
@@ -0,0 +1,17 @@
+################################################################################
+#
+# fxdiv
+#
+################################################################################
+
+FXDIV_VERSION = 63058eff77e11aa15bf531df5dd34395ec3017c8
+FXDIV_SITE = $(call github,Maratyszcza,FXdiv,$(FXDIV_VERSION))
+FXDIV_LICENSE = MIT
+FXDIV_LICENSE_FILES = LICENSE
+FXDIV_INSTALL_STAGING = YES
+FXDIV_INSTALL_TARGET = NO
+FXDIV_CONF_OPTS = \
+	-DFXDIV_BUILD_TESTS=OFF \
+	-DFXDIV_BUILD_BENCHMARKS=OFF
+
+$(eval $(cmake-package))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH v4 07/13] package/pthreadpool: new package
  2023-01-27 14:10 [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code James Hilliard
                   ` (4 preceding siblings ...)
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 06/13] package/fxdiv: " James Hilliard
@ 2023-01-27 14:10 ` James Hilliard
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 08/13] package/psimd: " James Hilliard
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 23+ messages in thread
From: James Hilliard @ 2023-01-27 14:10 UTC (permalink / raw)
  To: buildroot
  Cc: Stefan Hager, James Hilliard, Samuel Martin, Fabrice Fontaine,
	Thomas Petazzoni

This package is required by tensorflow-lite.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 DEVELOPERS                           |  1 +
 package/Config.in                    |  1 +
 package/pthreadpool/Config.in        |  8 +++++++
 package/pthreadpool/pthreadpool.hash |  4 ++++
 package/pthreadpool/pthreadpool.mk   | 33 ++++++++++++++++++++++++++++
 5 files changed, 47 insertions(+)
 create mode 100644 package/pthreadpool/Config.in
 create mode 100644 package/pthreadpool/pthreadpool.hash
 create mode 100644 package/pthreadpool/pthreadpool.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index b600c2914e..de15ae1d98 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2706,6 +2706,7 @@ F:	package/cpuinfo/
 F:	package/fxdiv/
 F:	package/gemmlowp/
 F:	package/neon-2-sse/
+F:	package/pthreadpool/
 F:	package/ruy/
 
 N:	Stefan Ott <stefan@ott.net>
diff --git a/package/Config.in b/package/Config.in
index e393760b6a..426af4e143 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2110,6 +2110,7 @@ endif
 	source "package/protobuf/Config.in"
 	source "package/protobuf-c/Config.in"
 	source "package/protozero/Config.in"
+	source "package/pthreadpool/Config.in"
 	source "package/qhull/Config.in"
 	source "package/qlibc/Config.in"
 	source "package/riemann-c-client/Config.in"
diff --git a/package/pthreadpool/Config.in b/package/pthreadpool/Config.in
new file mode 100644
index 0000000000..194ae33f85
--- /dev/null
+++ b/package/pthreadpool/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_PTHREADPOOL
+	bool "pthreadpool"
+	select BR2_PACKAGE_FXDIV
+	help
+	  Pthreadpool is a portable and efficient thread pool
+	  implementation.
+
+	  https://github.com/Maratyszcza/pthreadpool
diff --git a/package/pthreadpool/pthreadpool.hash b/package/pthreadpool/pthreadpool.hash
new file mode 100644
index 0000000000..164ac55390
--- /dev/null
+++ b/package/pthreadpool/pthreadpool.hash
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  ae75adb19807ea28582683b38dd4e79a6b287751452564b42e214bb21216ef14  pthreadpool-43edadc654d6283b4b6e45ba09a853181ae8e850.tar.gz
+# License files, locally calculated
+sha256  57814a606b4d0fb087d9a534919084b6c11b58a4174cb5a4aef200187780dc3a  LICENSE
diff --git a/package/pthreadpool/pthreadpool.mk b/package/pthreadpool/pthreadpool.mk
new file mode 100644
index 0000000000..4ef7949da2
--- /dev/null
+++ b/package/pthreadpool/pthreadpool.mk
@@ -0,0 +1,33 @@
+################################################################################
+#
+# pthreadpool
+#
+################################################################################
+
+PTHREADPOOL_VERSION = 43edadc654d6283b4b6e45ba09a853181ae8e850
+PTHREADPOOL_SITE = $(call github,Maratyszcza,pthreadpool,$(PTHREADPOOL_VERSION))
+PTHREADPOOL_LICENSE = BSD-2-Clause
+PTHREADPOOL_LICENSE_FILES = LICENSE
+PTHREADPOOL_INSTALL_STAGING = YES
+PTHREADPOOL_DEPENDENCIES = fxdiv
+
+PTHREADPOOL_CFLAGS = $(TARGET_CFLAGS)
+PTHREADPOOL_CXXFLAGS = $(TARGET_CXXFLAGS)
+
+ifeq ($(BR2_PACKAGE_CPUINFO),y)
+PTHREADPOOL_DEPENDENCIES += cpuinfo
+PTHREADPOOL_CFLAGS += -DPTHREADPOOL_USE_CPUINFO=1
+PTHREADPOOL_CXXFLAGS += -DPTHREADPOOL_USE_CPUINFO=1
+else
+PTHREADPOOL_CFLAGS += -DPTHREADPOOL_USE_CPUINFO=0
+PTHREADPOOL_CXXFLAGS += -DPTHREADPOOL_USE_CPUINFO=0
+endif
+
+PTHREADPOOL_CONF_OPTS = \
+	-DCMAKE_C_FLAGS="$(PTHREADPOOL_CFLAGS)" \
+	-DCMAKE_CXX_FLAGS="$(PTHREADPOOL_CXXFLAGS)" \
+	-DFXDIV_SOURCE_DIR="$(FXDIV_DIR)" \
+	-DPTHREADPOOL_BUILD_TESTS=OFF \
+	-DPTHREADPOOL_BUILD_BENCHMARKS=OFF
+
+$(eval $(cmake-package))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH v4 08/13] package/psimd: new package
  2023-01-27 14:10 [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code James Hilliard
                   ` (5 preceding siblings ...)
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 07/13] package/pthreadpool: " James Hilliard
@ 2023-01-27 14:10 ` James Hilliard
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 09/13] package/fp16: " James Hilliard
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 23+ messages in thread
From: James Hilliard @ 2023-01-27 14:10 UTC (permalink / raw)
  To: buildroot
  Cc: Stefan Hager, James Hilliard, Samuel Martin, Fabrice Fontaine,
	Thomas Petazzoni

This package is required by tensorflow-lite.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 DEVELOPERS               |  1 +
 package/Config.in        |  1 +
 package/psimd/Config.in  |  6 ++++++
 package/psimd/psimd.hash |  4 ++++
 package/psimd/psimd.mk   | 14 ++++++++++++++
 5 files changed, 26 insertions(+)
 create mode 100644 package/psimd/Config.in
 create mode 100644 package/psimd/psimd.hash
 create mode 100644 package/psimd/psimd.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index de15ae1d98..501bbff35e 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2706,6 +2706,7 @@ F:	package/cpuinfo/
 F:	package/fxdiv/
 F:	package/gemmlowp/
 F:	package/neon-2-sse/
+F:	package/psimd/
 F:	package/pthreadpool/
 F:	package/ruy/
 
diff --git a/package/Config.in b/package/Config.in
index 426af4e143..a87f360221 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2110,6 +2110,7 @@ endif
 	source "package/protobuf/Config.in"
 	source "package/protobuf-c/Config.in"
 	source "package/protozero/Config.in"
+	source "package/psimd/Config.in"
 	source "package/pthreadpool/Config.in"
 	source "package/qhull/Config.in"
 	source "package/qlibc/Config.in"
diff --git a/package/psimd/Config.in b/package/psimd/Config.in
new file mode 100644
index 0000000000..c5c51ca2ef
--- /dev/null
+++ b/package/psimd/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_PSIMD
+	bool "psimd"
+	help
+	  Portable 128-bit SIMD intrinsics.
+
+	  https://github.com/Maratyszcza/psimd
diff --git a/package/psimd/psimd.hash b/package/psimd/psimd.hash
new file mode 100644
index 0000000000..5692e79bd6
--- /dev/null
+++ b/package/psimd/psimd.hash
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  f6c4dab91ae9a03b3019e7cab0572743afd0e1b6e75b97fcca50259c737c924e  psimd-072586a71b55b7f8c584153d223e95687148a900.tar.gz
+# License files, locally calculated
+sha256  984ce1e0b8ee89d234e28b960381f240e03a07a8031f35012f9c3256f56964e2  LICENSE
diff --git a/package/psimd/psimd.mk b/package/psimd/psimd.mk
new file mode 100644
index 0000000000..e5785a0327
--- /dev/null
+++ b/package/psimd/psimd.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# psimd
+#
+################################################################################
+
+PSIMD_VERSION = 072586a71b55b7f8c584153d223e95687148a900
+PSIMD_SITE = $(call github,Maratyszcza,psimd,$(PSIMD_VERSION))
+PSIMD_LICENSE = MIT
+PSIMD_LICENSE_FILES = LICENSE
+PSIMD_INSTALL_STAGING = YES
+PSIMD_INSTALL_TARGET = NO
+
+$(eval $(cmake-package))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH v4 09/13] package/fp16: new package
  2023-01-27 14:10 [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code James Hilliard
                   ` (6 preceding siblings ...)
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 08/13] package/psimd: " James Hilliard
@ 2023-01-27 14:10 ` James Hilliard
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 10/13] package/xnnpack: " James Hilliard
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 23+ messages in thread
From: James Hilliard @ 2023-01-27 14:10 UTC (permalink / raw)
  To: buildroot
  Cc: Stefan Hager, James Hilliard, Samuel Martin, Fabrice Fontaine,
	Thomas Petazzoni

This package is required by tensorflow-lite.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 DEVELOPERS             |  1 +
 package/Config.in      |  1 +
 package/fp16/Config.in |  8 ++++++++
 package/fp16/fp16.hash |  4 ++++
 package/fp16/fp16.mk   | 19 +++++++++++++++++++
 5 files changed, 33 insertions(+)
 create mode 100644 package/fp16/Config.in
 create mode 100644 package/fp16/fp16.hash
 create mode 100644 package/fp16/fp16.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 501bbff35e..fc74c089fe 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2703,6 +2703,7 @@ F:	package/ti-gfx/
 
 N:	Stefan Hager <stefan.hager@ginzinger.com>
 F:	package/cpuinfo/
+F:	package/fp16/
 F:	package/fxdiv/
 F:	package/gemmlowp/
 F:	package/neon-2-sse/
diff --git a/package/Config.in b/package/Config.in
index a87f360221..d33806a013 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2007,6 +2007,7 @@ menu "Other"
 	source "package/flann/Config.in"
 	source "package/flatbuffers/Config.in"
 	source "package/flatcc/Config.in"
+	source "package/fp16/Config.in"
 	source "package/fxdiv/Config.in"
 	source "package/gconf/Config.in"
 	source "package/gdal/Config.in"
diff --git a/package/fp16/Config.in b/package/fp16/Config.in
new file mode 100644
index 0000000000..e07c6ebb8a
--- /dev/null
+++ b/package/fp16/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_FP16
+	bool "fp16"
+	select BR2_PACKAGE_PSIMD
+	help
+	  Header-only library for conversion to/from half-precision
+	  floating point formats.
+
+	  https://github.com/Maratyszcza/FP16
diff --git a/package/fp16/fp16.hash b/package/fp16/fp16.hash
new file mode 100644
index 0000000000..63634eb2cf
--- /dev/null
+++ b/package/fp16/fp16.hash
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  a91f4770ff9c39f4d72e339c379f566b3bbb359fa66122d85fc0bae3dde7abc7  fp16-0a92994d729ff76a58f692d3028ca1b64b145d91.tar.gz
+# License files, locally calculated
+sha256  17e4f539024be2749ee729d1e2f01d24cef12ece8c9bf18e91a4349be29c80bf  LICENSE
diff --git a/package/fp16/fp16.mk b/package/fp16/fp16.mk
new file mode 100644
index 0000000000..52f48232fa
--- /dev/null
+++ b/package/fp16/fp16.mk
@@ -0,0 +1,19 @@
+################################################################################
+#
+# fp16
+#
+################################################################################
+
+FP16_VERSION = 0a92994d729ff76a58f692d3028ca1b64b145d91
+FP16_SITE = $(call github,Maratyszcza,FP16,$(FP16_VERSION))
+FP16_LICENSE = MIT
+FP16_LICENSE_FILES = LICENSE
+FP16_INSTALL_STAGING = YES
+FP16_INSTALL_TARGET = NO
+FP16_DEPENDENCIES = psimd
+FP16_CONF_OPTS = \
+	-DFP16_BUILD_TESTS=OFF \
+	-DFP16_BUILD_BENCHMARKS=OFF \
+	-DPSIMD_SOURCE_DIR="$(PSIMD_DIR)"
+
+$(eval $(cmake-package))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH v4 10/13] package/xnnpack: new package
  2023-01-27 14:10 [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code James Hilliard
                   ` (7 preceding siblings ...)
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 09/13] package/fp16: " James Hilliard
@ 2023-01-27 14:10 ` James Hilliard
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 11/13] package/fft2d: " James Hilliard
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 23+ messages in thread
From: James Hilliard @ 2023-01-27 14:10 UTC (permalink / raw)
  To: buildroot
  Cc: Stefan Hager, James Hilliard, Samuel Martin, Fabrice Fontaine,
	Thomas Petazzoni

This package is required by tensorflow-lite.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 DEVELOPERS                   |  1 +
 package/Config.in            |  1 +
 package/xnnpack/Config.in    | 17 +++++++++++++++++
 package/xnnpack/xnnpack.hash |  4 ++++
 package/xnnpack/xnnpack.mk   | 18 ++++++++++++++++++
 5 files changed, 41 insertions(+)
 create mode 100644 package/xnnpack/Config.in
 create mode 100644 package/xnnpack/xnnpack.hash
 create mode 100644 package/xnnpack/xnnpack.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index fc74c089fe..cfb0a8228d 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2710,6 +2710,7 @@ F:	package/neon-2-sse/
 F:	package/psimd/
 F:	package/pthreadpool/
 F:	package/ruy/
+F:	package/xnnpack/
 
 N:	Stefan Ott <stefan@ott.net>
 F:	package/unbound/
diff --git a/package/Config.in b/package/Config.in
index d33806a013..26e37e2687 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2128,6 +2128,7 @@ endif
 	source "package/uvw/Config.in"
 	source "package/volk/Config.in"
 	source "package/xapian/Config.in"
+	source "package/xnnpack/Config.in"
 endmenu
 
 menu "Security"
diff --git a/package/xnnpack/Config.in b/package/xnnpack/Config.in
new file mode 100644
index 0000000000..2016ce9817
--- /dev/null
+++ b/package/xnnpack/Config.in
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_XNNPACK
+	bool "xnnpack"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14
+	select BR2_PACKAGE_CPUINFO
+	select BR2_PACKAGE_FP16
+	select BR2_PACKAGE_FXDIV
+	select BR2_PACKAGE_PTHREADPOOL
+	help
+	  XNNPACK is a highly optimized solution for neural network
+	  inference on ARM, x86, WebAssembly, and RISC-V platforms.
+
+	  https://github.com/google/XNNPACK
+
+comment "xnnpack needs a toolchain w/ C++14"
+	depends on !BR2_INSTALL_LIBSTDCPP || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
diff --git a/package/xnnpack/xnnpack.hash b/package/xnnpack/xnnpack.hash
new file mode 100644
index 0000000000..249f553f2a
--- /dev/null
+++ b/package/xnnpack/xnnpack.hash
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  5d70dde70c0b1aef9e608f5d193c148aa1e538574a98d912278b51e60f2457f2  xnnpack-1f7f6131f7be587d0a657d03bdd0161d67ba2700.tar.gz
+# License files, locally calculated
+sha256  63f519e15726f4c4f830bd958f694c84fecb4e0a4cacc527d2696bb71ef95ada  LICENSE
diff --git a/package/xnnpack/xnnpack.mk b/package/xnnpack/xnnpack.mk
new file mode 100644
index 0000000000..d46b4c22de
--- /dev/null
+++ b/package/xnnpack/xnnpack.mk
@@ -0,0 +1,18 @@
+################################################################################
+#
+# xnnpack
+#
+################################################################################
+
+XNNPACK_VERSION = 1f7f6131f7be587d0a657d03bdd0161d67ba2700
+XNNPACK_SITE = $(call github,google,XNNPACK,$(XNNPACK_VERSION))
+XNNPACK_LICENSE = BSD-3-Clause
+XNNPACK_LICENSE_FILES = LICENSE
+XNNPACK_INSTALL_STAGING = YES
+XNNPACK_DEPENDENCIES = cpuinfo fp16 fxdiv pthreadpool
+XNNPACK_CONF_OPTS = \
+	-DXNNPACK_BUILD_TESTS=OFF \
+	-DXNNPACK_BUILD_BENCHMARKS=OFF \
+	-DXNNPACK_USE_SYSTEM_LIBS=ON
+
+$(eval $(cmake-package))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH v4 11/13] package/fft2d: new package
  2023-01-27 14:10 [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code James Hilliard
                   ` (8 preceding siblings ...)
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 10/13] package/xnnpack: " James Hilliard
@ 2023-01-27 14:10 ` James Hilliard
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 12/13] package/farmhash: " James Hilliard
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 23+ messages in thread
From: James Hilliard @ 2023-01-27 14:10 UTC (permalink / raw)
  To: buildroot
  Cc: Stefan Hager, James Hilliard, Samuel Martin, Fabrice Fontaine,
	Thomas Petazzoni

From: Stefan Hager <stefan.hager@ginzinger.com>

This package is required by tensorflow-lite.

This package doesn't provide a conventional install mechanism so
we need to install it manually.

Tested-by: Stefan Hager <stefan.hager@ginzinger.com>
Signed-off-by: Stefan Hager <stefan.hager@ginzinger.com>
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
Changes v3 -> v4:
  - fix license
---
 DEVELOPERS               |  1 +
 package/Config.in        |  1 +
 package/fft2d/Config.in  |  7 +++++++
 package/fft2d/fft2d.hash |  4 ++++
 package/fft2d/fft2d.mk   | 22 ++++++++++++++++++++++
 5 files changed, 35 insertions(+)
 create mode 100644 package/fft2d/Config.in
 create mode 100644 package/fft2d/fft2d.hash
 create mode 100644 package/fft2d/fft2d.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index cfb0a8228d..a9ecf7847f 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2704,6 +2704,7 @@ F:	package/ti-gfx/
 N:	Stefan Hager <stefan.hager@ginzinger.com>
 F:	package/cpuinfo/
 F:	package/fp16/
+F:	package/fft2d/
 F:	package/fxdiv/
 F:	package/gemmlowp/
 F:	package/neon-2-sse/
diff --git a/package/Config.in b/package/Config.in
index 26e37e2687..53f544ef40 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2003,6 +2003,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"
diff --git a/package/fft2d/Config.in b/package/fft2d/Config.in
new file mode 100644
index 0000000000..38394f6170
--- /dev/null
+++ b/package/fft2d/Config.in
@@ -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
diff --git a/package/fft2d/fft2d.hash b/package/fft2d/fft2d.hash
new file mode 100644
index 0000000000..a1b1a326ae
--- /dev/null
+++ b/package/fft2d/fft2d.hash
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  ada7e99087c4ed477bfdf11413f2ba8db8a840ba9bbf8ac94f4f3972e2a7cec9  fft2d.tgz
+# License files, locally calculated
+sha256  0b2a2082537735a2a576dbec2e8f9c1a09812eac6df6a389502a6ba860072906  readme2d.txt
diff --git a/package/fft2d/fft2d.mk b/package/fft2d/fft2d.mk
new file mode 100644
index 0000000000..eac68325a1
--- /dev/null
+++ b/package/fft2d/fft2d.mk
@@ -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 = MIT-like
+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

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH v4 12/13] package/farmhash: new package
  2023-01-27 14:10 [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code James Hilliard
                   ` (9 preceding siblings ...)
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 11/13] package/fft2d: " James Hilliard
@ 2023-01-27 14:10 ` James Hilliard
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 13/13] package/tensorflow-lite: " James Hilliard
  2023-01-29 20:55 ` [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code Yann E. MORIN
  12 siblings, 0 replies; 23+ messages in thread
From: James Hilliard @ 2023-01-27 14:10 UTC (permalink / raw)
  To: buildroot
  Cc: Stefan Hager, James Hilliard, Samuel Martin, Fabrice Fontaine,
	Thomas Petazzoni

From: Stefan Hager <stefan.hager@ginzinger.com>

This package is required by tensorflow-lite.

Tested-by: Stefan Hager <stefan.hager@ginzinger.com>
Signed-off-by: Stefan Hager <stefan.hager@ginzinger.com>
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
Changes v2 -> v3:
  - add C++11 dependency
---
 DEVELOPERS                     |  1 +
 package/Config.in              |  1 +
 package/farmhash/Config.in     | 12 ++++++++++++
 package/farmhash/farmhash.hash |  4 ++++
 package/farmhash/farmhash.mk   | 14 ++++++++++++++
 5 files changed, 32 insertions(+)
 create mode 100644 package/farmhash/Config.in
 create mode 100644 package/farmhash/farmhash.hash
 create mode 100644 package/farmhash/farmhash.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index a9ecf7847f..2afe29be47 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2703,6 +2703,7 @@ F:	package/ti-gfx/
 
 N:	Stefan Hager <stefan.hager@ginzinger.com>
 F:	package/cpuinfo/
+F:	package/farmhash/
 F:	package/fp16/
 F:	package/fft2d/
 F:	package/fxdiv/
diff --git a/package/Config.in b/package/Config.in
index 53f544ef40..a7c7e87c78 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2003,6 +2003,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"
diff --git a/package/farmhash/Config.in b/package/farmhash/Config.in
new file mode 100644
index 0000000000..ef22898774
--- /dev/null
+++ b/package/farmhash/Config.in
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_FARMHASH
+	bool "farmhash"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
+	help
+	  FarmHash, a family of hash functions.
+
+	  https://github.com/google/farmhash
+
+comment "farmhash needs a toolchain w/ C++11"
+	depends on !BR2_INSTALL_LIBSTDCPP || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
diff --git a/package/farmhash/farmhash.hash b/package/farmhash/farmhash.hash
new file mode 100644
index 0000000000..afdfc0f994
--- /dev/null
+++ b/package/farmhash/farmhash.hash
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  18392cf0736e1d62ecbb8d695c31496b6507859e8c75541d7ad0ba092dc52115  farmhash-0d859a811870d10f53a594927d0d0b97573ad06d.tar.gz
+# License files, locally calculated
+sha256  4162dd091caae234f72d3b57e138174f733e736b2430a4c51b098b17d866fcb6  COPYING
diff --git a/package/farmhash/farmhash.mk b/package/farmhash/farmhash.mk
new file mode 100644
index 0000000000..6ab7d1a88b
--- /dev/null
+++ b/package/farmhash/farmhash.mk
@@ -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

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH v4 13/13] package/tensorflow-lite: new package
  2023-01-27 14:10 [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code James Hilliard
                   ` (10 preceding siblings ...)
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 12/13] package/farmhash: " James Hilliard
@ 2023-01-27 14:10 ` James Hilliard
  2023-01-29 20:55 ` [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code Yann E. MORIN
  12 siblings, 0 replies; 23+ messages in thread
From: James Hilliard @ 2023-01-27 14:10 UTC (permalink / raw)
  To: buildroot
  Cc: Stefan Hager, James Hilliard, Samuel Martin, Fabrice Fontaine,
	Thomas Petazzoni

From: Stefan Hager <stefan.hager@ginzinger.com>

This package adds the tensorflow lite runtime to buildroot.

Tested-by: Stefan Hager <stefan.hager@ginzinger.com>
Signed-off-by: Stefan Hager <stefan.hager@ginzinger.com>
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
Changes v3 -> v4:
  - fix min gcc version
  - enable xnnpack
Changes v2 -> v3:
  - drop architecture restrictions which appear inaccurate after adding neon-2-sse
  - disable android only nnapi
Changes v1 -> v2:
  - fix label_image build
  - more explicit cmake config
---
 DEVELOPERS                                    |  1 +
 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             | 27 ++++++++++
 package/tensorflow-lite/tensorflow-lite.hash  |  4 ++
 package/tensorflow-lite/tensorflow-lite.mk    | 51 +++++++++++++++++++
 8 files changed, 202 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

diff --git a/DEVELOPERS b/DEVELOPERS
index 2afe29be47..c682ed1b7f 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2712,6 +2712,7 @@ F:	package/neon-2-sse/
 F:	package/psimd/
 F:	package/pthreadpool/
 F:	package/ruy/
+F:	package/tensorflow-lite/
 F:	package/xnnpack/
 
 N:	Stefan Ott <stefan@ott.net>
diff --git a/package/Config.in b/package/Config.in
index a7c7e87c78..4168ce878d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2124,6 +2124,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"
diff --git a/package/tensorflow-lite/0001-lite-Update-CMakeLists.txt.patch b/package/tensorflow-lite/0001-lite-Update-CMakeLists.txt.patch
new file mode 100644
index 0000000000..53b5170681
--- /dev/null
+++ b/package/tensorflow-lite/0001-lite-Update-CMakeLists.txt.patch
@@ -0,0 +1,49 @@
+From 081c2e4e3cf021efb2853a485a18b563e88f6117 Mon Sep 17 00:00:00 2001
+From: Terry Heo <terryheo@google.com>
+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 <james.hilliard1@gmail.com>
+[james.hilliard1@gmail.com: 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
+
diff --git a/package/tensorflow-lite/0002-Fix-FindFlatBuffers-cmake-file.patch b/package/tensorflow-lite/0002-Fix-FindFlatBuffers-cmake-file.patch
new file mode 100644
index 0000000000..e97bb3e52f
--- /dev/null
+++ b/package/tensorflow-lite/0002-Fix-FindFlatBuffers-cmake-file.patch
@@ -0,0 +1,37 @@
+From a4ff4b5e952a22906ac0ed01e73f84f42926c325 Mon Sep 17 00:00:00 2001
+From: James Hilliard <james.hilliard1@gmail.com>
+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 <james.hilliard1@gmail.com>
+[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
+
diff --git a/package/tensorflow-lite/0003-Don-t-link-tensorflow-lite-against-gemmlowp.patch b/package/tensorflow-lite/0003-Don-t-link-tensorflow-lite-against-gemmlowp.patch
new file mode 100644
index 0000000000..dbee9942b3
--- /dev/null
+++ b/package/tensorflow-lite/0003-Don-t-link-tensorflow-lite-against-gemmlowp.patch
@@ -0,0 +1,32 @@
+From fb584589f707853d85a081c99b1b82598c2631c1 Mon Sep 17 00:00:00 2001
+From: James Hilliard <james.hilliard1@gmail.com>
+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 <james.hilliard1@gmail.com>
+[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
+
diff --git a/package/tensorflow-lite/Config.in b/package/tensorflow-lite/Config.in
new file mode 100644
index 0000000000..92a364ca36
--- /dev/null
+++ b/package/tensorflow-lite/Config.in
@@ -0,0 +1,27 @@
+config BR2_PACKAGE_TENSORFLOW_LITE
+	bool "tensorflow-lite"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # C++17
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	depends on BR2_SHARED_LIBS
+	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
+	select BR2_PACKAGE_XNNPACK
+	help
+	  Tensorflow Lite dynamic library and headers: Inference engine
+	  to run previously trained machine learning models.
+
+comment "tensorflow-lite needs a toolchain w/ glibc, C++17, threads"
+	depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP || \
+			!BR2_TOOLCHAIN_GCC_AT_LEAST_7 || !BR2_TOOLCHAIN_HAS_THREADS
+
+comment "tensorflow-lite needs a toolchain w/ shared libraries"
+	depends on !BR2_SHARED_LIBS
diff --git a/package/tensorflow-lite/tensorflow-lite.hash b/package/tensorflow-lite/tensorflow-lite.hash
new file mode 100644
index 0000000000..7d9035707b
--- /dev/null
+++ b/package/tensorflow-lite/tensorflow-lite.hash
@@ -0,0 +1,4 @@
+# Locally calculated
+sha256  99c732b92b1b37fc243a559e02f9aef5671771e272758aa4aec7f34dc92dac48  tensorflow-lite-2.11.0.tar.gz
+# License files, locally calculated
+sha256  71c6915d04265772a0339bed47276942c678b45cc01534210ebe6984fd1aec65  LICENSE
diff --git a/package/tensorflow-lite/tensorflow-lite.mk b/package/tensorflow-lite/tensorflow-lite.mk
new file mode 100644
index 0000000000..4f8e8b9595
--- /dev/null
+++ b/package/tensorflow-lite/tensorflow-lite.mk
@@ -0,0 +1,51 @@
+################################################################################
+#
+# 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 \
+	xnnpack
+
+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 \
+	-DFlatBuffers_DIR=$(STAGING_DIR)/usr/lib/cmake/flatbuffers \
+	-DNEON_2_SSE_DIR=$(STAGING_DIR)/usr/lib/cmake/NEON_2_SSE \
+	-Dxnnpack_POPULATED=ON \
+	-DTFLITE_ENABLE_EXTERNAL_DELEGATE=ON \
+	-DTFLITE_ENABLE_GPU=OFF \
+	-DTFLITE_ENABLE_INSTALL=ON \
+	-DTFLITE_ENABLE_MMAP=ON \
+	-DTFLITE_ENABLE_NNAPI=OFF \
+	-DTFLITE_ENABLE_RUY=ON \
+	-DTFLITE_ENABLE_XNNPACK=ON
+
+$(eval $(cmake-package))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code
  2023-01-27 14:10 [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code James Hilliard
                   ` (11 preceding siblings ...)
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 13/13] package/tensorflow-lite: " James Hilliard
@ 2023-01-29 20:55 ` Yann E. MORIN
  12 siblings, 0 replies; 23+ messages in thread
From: Yann E. MORIN @ 2023-01-29 20:55 UTC (permalink / raw)
  To: James Hilliard
  Cc: Stefan Hager, Samuel Martin, Fabrice Fontaine, Thomas Petazzoni,
	buildroot

James, All,

On 2023-01-27 07:10 -0700, James Hilliard spake thusly:
> 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
> 
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/flatbuffers/flatbuffers.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/flatbuffers/flatbuffers.mk b/package/flatbuffers/flatbuffers.mk
> index 9d286bf9e1..487d85ee1f 100644
> --- a/package/flatbuffers/flatbuffers.mk
> +++ b/package/flatbuffers/flatbuffers.mk
> @@ -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
>  
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Buildroot] [PATCH v4 02/13] package/cpuinfo: new package
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 02/13] package/cpuinfo: new package James Hilliard
@ 2023-01-29 21:18   ` Yann E. MORIN
  0 siblings, 0 replies; 23+ messages in thread
From: Yann E. MORIN @ 2023-01-29 21:18 UTC (permalink / raw)
  To: James Hilliard
  Cc: Stefan Hager, Samuel Martin, Fabrice Fontaine, Thomas Petazzoni,
	buildroot

James, All,

On 2023-01-27 07:10 -0700, James Hilliard spake thusly:
> From: Stefan Hager <stefan.hager@ginzinger.com>
> 
> This package is required by tensorflow-lite.
> 
> Tested-by: Stefan Hager <stefan.hager@ginzinger.com>
> Signed-off-by: Stefan Hager <stefan.hager@ginzinger.com>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
[--SNIP--]
> diff --git a/package/cpuinfo/Config.in b/package/cpuinfo/Config.in
> new file mode 100644
> index 0000000000..137f657d69
> --- /dev/null
> +++ b/package/cpuinfo/Config.in
> @@ -0,0 +1,9 @@
> +config BR2_PACKAGE_CPUINFO
> +	bool "cpuinfo"
> +	depends on BR2_INSTALL_LIBSTDCPP

The CMakeList.txt requires a CXX compiler but it looks like cpuinfo is a
C-only package, as I could not find any C++ source file, except some
test cases, and the benchmarks but they are disabled.

So, I think we should make C++ optional and submit the patch upstream.

Regards,
Yann E. MORIN.

> +	help
> +	  CPU INFOrmation library, cpuinfo is a library to detect
> +	  essential for performance optimization information about
> +	  host CPU.
> +
> +	  https://github.com/pytorch/cpuinfo
> diff --git a/package/cpuinfo/cpuinfo.hash b/package/cpuinfo/cpuinfo.hash
> new file mode 100644
> index 0000000000..c3f70fa90f
> --- /dev/null
> +++ b/package/cpuinfo/cpuinfo.hash
> @@ -0,0 +1,4 @@
> +# Locally calculated
> +sha256  0936848904943381b2c01321101614776e43d583840ee0f3ceeea1e3fb7405f7  cpuinfo-de2fa78ebb431db98489e78603e4f77c1f6c5c57.tar.gz
> +# License files, locally calculated
> +sha256  8e7e60636c3aa0cb03571a1a841ce5697f9551ff92b3c426c2561613d15ade70  LICENSE
> diff --git a/package/cpuinfo/cpuinfo.mk b/package/cpuinfo/cpuinfo.mk
> new file mode 100644
> index 0000000000..ab6a0269ec
> --- /dev/null
> +++ b/package/cpuinfo/cpuinfo.mk
> @@ -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
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Buildroot] [PATCH v4 04/13] package/gemmlowp: new package
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 04/13] package/gemmlowp: " James Hilliard
@ 2023-01-29 21:45   ` Yann E. MORIN
  2023-01-30  3:17     ` James Hilliard
  2023-01-29 21:46   ` Yann E. MORIN
  1 sibling, 1 reply; 23+ messages in thread
From: Yann E. MORIN @ 2023-01-29 21:45 UTC (permalink / raw)
  To: James Hilliard
  Cc: Stefan Hager, Samuel Martin, Fabrice Fontaine, Thomas Petazzoni,
	buildroot

James, All,

On 2023-01-27 07:10 -0700, James Hilliard spake thusly:
> From: Stefan Hager <stefan.hager@ginzinger.com>
> 
> This package is required by tensorflow-lite.
> 
> Tested-by: Stefan Hager <stefan.hager@ginzinger.com>
> Signed-off-by: Stefan Hager <stefan.hager@ginzinger.com>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
[--SNIP--]
> diff --git a/package/gemmlowp/gemmlowp.mk b/package/gemmlowp/gemmlowp.mk
> new file mode 100644
> index 0000000000..1a36fc48f7
> --- /dev/null
> +++ b/package/gemmlowp/gemmlowp.mk
> @@ -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

Upstream is very careful to point to some optimisations that are
required or performance will suffer.

Notably, should be enabled:
  - for x86: sse4.1
  - for ARM: NEON

For NEON, it seems this is automatically handled, though, based on
looking at some macros:

    internal/detect_platform.h
    85 #if (defined __ARM_NEON) || (defined __ARM_NEON__)
    86 #define GEMMLOWP_NEON
    87 #endif

For x86, we should probably have code like (what we have as
BR2_X86_CPU_HAS_SSE4 seems to be SSE4.1, but it is not clear whether
there is an actual delta between SSE4 and SSE4.1 [0], so let's be safe
and assume that BR2_X86_CPU_HAS_SSE4 is not enough):

    ifeq ($(BR2_X86_CPU_HAS_SSE42),y)
    GEMMLOWP_OPTIM += -msse4.1
    endif

However, that same header seems to also have some detection based on
macros... This needs to be cleared, maybe?

[0] https://en.wikipedia.org/wiki/SSE4

Regards,
Yann E. MORIN.

> +$(eval $(cmake-package))
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Buildroot] [PATCH v4 04/13] package/gemmlowp: new package
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 04/13] package/gemmlowp: " James Hilliard
  2023-01-29 21:45   ` Yann E. MORIN
@ 2023-01-29 21:46   ` Yann E. MORIN
  2023-01-29 23:51     ` James Hilliard
  1 sibling, 1 reply; 23+ messages in thread
From: Yann E. MORIN @ 2023-01-29 21:46 UTC (permalink / raw)
  To: James Hilliard
  Cc: Stefan Hager, Samuel Martin, Fabrice Fontaine, Thomas Petazzoni,
	buildroot

James, All,

On 2023-01-27 07:10 -0700, James Hilliard spake thusly:
> From: Stefan Hager <stefan.hager@ginzinger.com>
> 
> This package is required by tensorflow-lite.
> 
> Tested-by: Stefan Hager <stefan.hager@ginzinger.com>
> Signed-off-by: Stefan Hager <stefan.hager@ginzinger.com>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
[--SNIP--]
> diff --git a/package/gemmlowp/gemmlowp.mk b/package/gemmlowp/gemmlowp.mk
> new file mode 100644
> index 0000000000..1a36fc48f7
> --- /dev/null
> +++ b/package/gemmlowp/gemmlowp.mk
> @@ -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

Why not install to target? This needs a little explanations, even if
it's only a comment above, like:  # Only installs headers

Regards,
Yann E. MORIN.

> +GEMMLOWP_SUBDIR = contrib
> +
> +$(eval $(cmake-package))
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Buildroot] [PATCH v4 05/13] package/neon-2-sse: new package
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 05/13] package/neon-2-sse: " James Hilliard
@ 2023-01-29 21:58   ` Yann E. MORIN
  0 siblings, 0 replies; 23+ messages in thread
From: Yann E. MORIN @ 2023-01-29 21:58 UTC (permalink / raw)
  To: James Hilliard
  Cc: Stefan Hager, Samuel Martin, Fabrice Fontaine, Thomas Petazzoni,
	buildroot

James, All,

On 2023-01-27 07:10 -0700, James Hilliard spake thusly:
> This package is required by tensorflow-lite.
> 
> Tested-by: Stefan Hager <stefan.hager@ginzinger.com>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

Applied to master, thanks.

> ---
>  DEVELOPERS                         |  1 +
>  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 ++++++++++++++
>  5 files changed, 29 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
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index f48ea66660..a711f9f1ee 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -2704,6 +2704,7 @@ F:	package/ti-gfx/
>  N:	Stefan Hager <stefan.hager@ginzinger.com>
>  F:	package/cpuinfo/
>  F:	package/gemmlowp/
> +F:	package/neon-2-sse/

Since Stefan was not the author, only a tester, I moved that to James
entry.

Applied to master, thanks.

Regards,
Yann E. MORIN.

>  F:	package/ruy/
>  
>  N:	Stefan Ott <stefan@ott.net>
> diff --git a/package/Config.in b/package/Config.in
> index 8f78080963..6377ddd2e5 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -2101,6 +2101,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"
> diff --git a/package/neon-2-sse/Config.in b/package/neon-2-sse/Config.in
> new file mode 100644
> index 0000000000..25613c5ec4
> --- /dev/null
> +++ b/package/neon-2-sse/Config.in
> @@ -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
> diff --git a/package/neon-2-sse/neon-2-sse.hash b/package/neon-2-sse/neon-2-sse.hash
> new file mode 100644
> index 0000000000..ded20d58f5
> --- /dev/null
> +++ b/package/neon-2-sse/neon-2-sse.hash
> @@ -0,0 +1,4 @@
> +# Locally calculated
> +sha256  019fbc7ec25860070a1d90e12686fc160cfb33e22aa063c80f52b363f1361e9d  neon-2-sse-a15b489e1222b2087007546b4912e21293ea86ff.tar.gz
> +# License files, locally calculated
> +sha256  7022f51b439a5915e933ecc270c83e24ca0cb2cceeb08b0132dcd4dbb03ed2dc  LICENSE
> diff --git a/package/neon-2-sse/neon-2-sse.mk b/package/neon-2-sse/neon-2-sse.mk
> new file mode 100644
> index 0000000000..0e9d066abd
> --- /dev/null
> +++ b/package/neon-2-sse/neon-2-sse.mk
> @@ -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
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Buildroot] [PATCH v4 06/13] package/fxdiv: new package
  2023-01-27 14:10 ` [Buildroot] [PATCH v4 06/13] package/fxdiv: " James Hilliard
@ 2023-01-29 22:28   ` Yann E. MORIN
  0 siblings, 0 replies; 23+ messages in thread
From: Yann E. MORIN @ 2023-01-29 22:28 UTC (permalink / raw)
  To: James Hilliard
  Cc: Stefan Hager, Samuel Martin, Fabrice Fontaine, Thomas Petazzoni,
	buildroot

James, All,

On 2023-01-27 07:10 -0700, James Hilliard spake thusly:
> This package is required by tensorflow-lite.
> 
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

Applied to master, thanks, but see below...

> ---
[--SNIP--]
> diff --git a/DEVELOPERS b/DEVELOPERS
> index a711f9f1ee..b600c2914e 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -2703,6 +2703,7 @@ F:	package/ti-gfx/
>  
>  N:	Stefan Hager <stefan.hager@ginzinger.com>
>  F:	package/cpuinfo/
> +F:	package/fxdiv/

I again have moved that to James entry, since the patch is from James
not Stefan (and Stefan does not already have any entry).

Stefan, if you want to also adopt that package and/or neon2sse, then
just send a patch to that effect.

[--SNIP--]
> diff --git a/package/fxdiv/fxdiv.mk b/package/fxdiv/fxdiv.mk
> new file mode 100644
> index 0000000000..56aaf11f88
> --- /dev/null
> +++ b/package/fxdiv/fxdiv.mk
> @@ -0,0 +1,17 @@
> +################################################################################
> +#
> +# fxdiv
> +#
> +################################################################################
> +
> +FXDIV_VERSION = 63058eff77e11aa15bf531df5dd34395ec3017c8
> +FXDIV_SITE = $(call github,Maratyszcza,FXdiv,$(FXDIV_VERSION))
> +FXDIV_LICENSE = MIT
> +FXDIV_LICENSE_FILES = LICENSE
> +FXDIV_INSTALL_STAGING = YES

I added:    # Only installs a header

Applied to master, thanks.

Regards,
Yann E. MORIN.

> +FXDIV_INSTALL_TARGET = NO
> +FXDIV_CONF_OPTS = \
> +	-DFXDIV_BUILD_TESTS=OFF \
> +	-DFXDIV_BUILD_BENCHMARKS=OFF
> +
> +$(eval $(cmake-package))
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Buildroot] [PATCH v4 04/13] package/gemmlowp: new package
  2023-01-29 21:46   ` Yann E. MORIN
@ 2023-01-29 23:51     ` James Hilliard
  0 siblings, 0 replies; 23+ messages in thread
From: James Hilliard @ 2023-01-29 23:51 UTC (permalink / raw)
  To: Yann E. MORIN
  Cc: Stefan Hager, Samuel Martin, Fabrice Fontaine, Thomas Petazzoni,
	buildroot

On Sun, Jan 29, 2023 at 2:46 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> James, All,
>
> On 2023-01-27 07:10 -0700, James Hilliard spake thusly:
> > From: Stefan Hager <stefan.hager@ginzinger.com>
> >
> > This package is required by tensorflow-lite.
> >
> > Tested-by: Stefan Hager <stefan.hager@ginzinger.com>
> > Signed-off-by: Stefan Hager <stefan.hager@ginzinger.com>
> > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> > ---
> [--SNIP--]
> > diff --git a/package/gemmlowp/gemmlowp.mk b/package/gemmlowp/gemmlowp.mk
> > new file mode 100644
> > index 0000000000..1a36fc48f7
> > --- /dev/null
> > +++ b/package/gemmlowp/gemmlowp.mk
> > @@ -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
>
> Why not install to target? This needs a little explanations, even if
> it's only a comment above, like:  # Only installs headers

Yeah, it's another header-only library.

>
> Regards,
> Yann E. MORIN.
>
> > +GEMMLOWP_SUBDIR = contrib
> > +
> > +$(eval $(cmake-package))
> > --
> > 2.34.1
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Buildroot] [PATCH v4 04/13] package/gemmlowp: new package
  2023-01-29 21:45   ` Yann E. MORIN
@ 2023-01-30  3:17     ` James Hilliard
  2023-01-30  7:13       ` Yann E. MORIN
  0 siblings, 1 reply; 23+ messages in thread
From: James Hilliard @ 2023-01-30  3:17 UTC (permalink / raw)
  To: Yann E. MORIN
  Cc: Stefan Hager, Samuel Martin, Fabrice Fontaine, Thomas Petazzoni,
	buildroot

On Sun, Jan 29, 2023 at 2:45 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> James, All,
>
> On 2023-01-27 07:10 -0700, James Hilliard spake thusly:
> > From: Stefan Hager <stefan.hager@ginzinger.com>
> >
> > This package is required by tensorflow-lite.
> >
> > Tested-by: Stefan Hager <stefan.hager@ginzinger.com>
> > Signed-off-by: Stefan Hager <stefan.hager@ginzinger.com>
> > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> > ---
> [--SNIP--]
> > diff --git a/package/gemmlowp/gemmlowp.mk b/package/gemmlowp/gemmlowp.mk
> > new file mode 100644
> > index 0000000000..1a36fc48f7
> > --- /dev/null
> > +++ b/package/gemmlowp/gemmlowp.mk
> > @@ -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
>
> Upstream is very careful to point to some optimisations that are
> required or performance will suffer.
>
> Notably, should be enabled:
>   - for x86: sse4.1
>   - for ARM: NEON
>
> For NEON, it seems this is automatically handled, though, based on
> looking at some macros:
>
>     internal/detect_platform.h
>     85 #if (defined __ARM_NEON) || (defined __ARM_NEON__)
>     86 #define GEMMLOWP_NEON
>     87 #endif
>
> For x86, we should probably have code like (what we have as
> BR2_X86_CPU_HAS_SSE4 seems to be SSE4.1, but it is not clear whether
> there is an actual delta between SSE4 and SSE4.1 [0], so let's be safe
> and assume that BR2_X86_CPU_HAS_SSE4 is not enough):
>
>     ifeq ($(BR2_X86_CPU_HAS_SSE42),y)
>     GEMMLOWP_OPTIM += -msse4.1
>     endif
>
> However, that same header seems to also have some detection based on
> macros... This needs to be cleared, maybe?

Well gemmlowp is effectively a header only library so optimization flags would
not be set for the gemmlowp package itself but rather in something like the
tensorflow-lite package which consumes the headers AFAIU.

Note there's technically an unused deprecated library that gets installed
to staging, we don't install it to target since we don't have anything consuming
that deprecated interface at all:
https://github.com/google/gemmlowp#old-eightbitintgemm-legacy-deprecated-interface

>
> [0] https://en.wikipedia.org/wiki/SSE4
>
> Regards,
> Yann E. MORIN.
>
> > +$(eval $(cmake-package))
> > --
> > 2.34.1
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Buildroot] [PATCH v4 04/13] package/gemmlowp: new package
  2023-01-30  3:17     ` James Hilliard
@ 2023-01-30  7:13       ` Yann E. MORIN
  2023-01-30  7:45         ` James Hilliard
  0 siblings, 1 reply; 23+ messages in thread
From: Yann E. MORIN @ 2023-01-30  7:13 UTC (permalink / raw)
  To: James Hilliard
  Cc: Stefan Hager, Samuel Martin, Fabrice Fontaine, Thomas Petazzoni,
	buildroot

James, All,

On 2023-01-29 20:17 -0700, James Hilliard spake thusly:
> On Sun, Jan 29, 2023 at 2:45 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
[--SNIP--]
> > For x86, we should probably have code like (what we have as
> > BR2_X86_CPU_HAS_SSE4 seems to be SSE4.1, but it is not clear whether
> > there is an actual delta between SSE4 and SSE4.1 [0], so let's be safe
> > and assume that BR2_X86_CPU_HAS_SSE4 is not enough):
> >
> >     ifeq ($(BR2_X86_CPU_HAS_SSE42),y)
> >     GEMMLOWP_OPTIM += -msse4.1
> >     endif
> >
> > However, that same header seems to also have some detection based on
> > macros... This needs to be cleared, maybe?
> 
> Well gemmlowp is effectively a header only library so optimization flags would
> not be set for the gemmlowp package itself but rather in something like the
> tensorflow-lite package which consumes the headers AFAIU.

Yeah, I noticed that it was a header-only library only later...

Still, for those packages, gemmlowp, neon-2-sse, maybe fxdiv, they do
have a requirement that SSE be needed, so they should depend on that.
For example:

    config BR2_PACKAGES_GEMMLOWP_ARCH_SUPPORTS
        bool
        default y if BR2_X86_CPU_HAS_SSE42
        default y if BR2_ARM_CPU_HAS_NEON

Or:

    config BR2_PACKAGES_NEON_2_SEE_ARCH_SUPPORTS
        bool
        default y if BR2_X86_CPU_HAS_SSE3

Otherwise, those packages (notable neon-2-sse) don't make much sense, or
will be horribly slow...

Can you send a set of patches, please?

Regards,
Yann E. MORIN.

> Note there's technically an unused deprecated library that gets installed
> to staging, we don't install it to target since we don't have anything consuming
> that deprecated interface at all:
> https://github.com/google/gemmlowp#old-eightbitintgemm-legacy-deprecated-interface
> 
> >
> > [0] https://en.wikipedia.org/wiki/SSE4
> >
> > Regards,
> > Yann E. MORIN.
> >
> > > +$(eval $(cmake-package))
> > > --
> > > 2.34.1
> > >
> > > _______________________________________________
> > > buildroot mailing list
> > > buildroot@buildroot.org
> > > https://lists.buildroot.org/mailman/listinfo/buildroot
> >
> > --
> > .-----------------.--------------------.------------------.--------------------.
> > |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> > | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> > | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> > '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Buildroot] [PATCH v4 04/13] package/gemmlowp: new package
  2023-01-30  7:13       ` Yann E. MORIN
@ 2023-01-30  7:45         ` James Hilliard
  0 siblings, 0 replies; 23+ messages in thread
From: James Hilliard @ 2023-01-30  7:45 UTC (permalink / raw)
  To: Yann E. MORIN
  Cc: Stefan Hager, Samuel Martin, Fabrice Fontaine, Thomas Petazzoni,
	buildroot

On Mon, Jan 30, 2023 at 12:13 AM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> James, All,
>
> On 2023-01-29 20:17 -0700, James Hilliard spake thusly:
> > On Sun, Jan 29, 2023 at 2:45 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> [--SNIP--]
> > > For x86, we should probably have code like (what we have as
> > > BR2_X86_CPU_HAS_SSE4 seems to be SSE4.1, but it is not clear whether
> > > there is an actual delta between SSE4 and SSE4.1 [0], so let's be safe
> > > and assume that BR2_X86_CPU_HAS_SSE4 is not enough):
> > >
> > >     ifeq ($(BR2_X86_CPU_HAS_SSE42),y)
> > >     GEMMLOWP_OPTIM += -msse4.1
> > >     endif
> > >
> > > However, that same header seems to also have some detection based on
> > > macros... This needs to be cleared, maybe?
> >
> > Well gemmlowp is effectively a header only library so optimization flags would
> > not be set for the gemmlowp package itself but rather in something like the
> > tensorflow-lite package which consumes the headers AFAIU.
>
> Yeah, I noticed that it was a header-only library only later...
>
> Still, for those packages, gemmlowp, neon-2-sse, maybe fxdiv, they do
> have a requirement that SSE be needed, so they should depend on that.
> For example:
>
>     config BR2_PACKAGES_GEMMLOWP_ARCH_SUPPORTS
>         bool
>         default y if BR2_X86_CPU_HAS_SSE42
>         default y if BR2_ARM_CPU_HAS_NEON
>
> Or:
>
>     config BR2_PACKAGES_NEON_2_SEE_ARCH_SUPPORTS
>         bool
>         default y if BR2_X86_CPU_HAS_SSE3
>
> Otherwise, those packages (notable neon-2-sse) don't make much sense, or
> will be horribly slow...

The tensorflow-lite build system enforces that these header libraries are
present even in cases where they are not used, for example neon-2-sse
isn't always used but tensorflow-lite always enforces that it is present even
on architectures where it is not required/used.

Changing tensorflow-lite to not enforce the presence of these libraries
would be rather complex as they tend to be used via conditional imports
with the presence checks being done in cmake.

Because of this we can't restrict the selection of these header-only libraries
to their compatible architectures without breaking tensorflow-lite.

>
> Can you send a set of patches, please?
>
> Regards,
> Yann E. MORIN.
>
> > Note there's technically an unused deprecated library that gets installed
> > to staging, we don't install it to target since we don't have anything consuming
> > that deprecated interface at all:
> > https://github.com/google/gemmlowp#old-eightbitintgemm-legacy-deprecated-interface
> >
> > >
> > > [0] https://en.wikipedia.org/wiki/SSE4
> > >
> > > Regards,
> > > Yann E. MORIN.
> > >
> > > > +$(eval $(cmake-package))
> > > > --
> > > > 2.34.1
> > > >
> > > > _______________________________________________
> > > > buildroot mailing list
> > > > buildroot@buildroot.org
> > > > https://lists.buildroot.org/mailman/listinfo/buildroot
> > >
> > > --
> > > .-----------------.--------------------.------------------.--------------------.
> > > |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> > > | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> > > | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> > > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> > > '------------------------------^-------^------------------^--------------------'
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2023-01-30  7:45 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-27 14:10 [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code James Hilliard
2023-01-27 14:10 ` [Buildroot] [PATCH v4 02/13] package/cpuinfo: new package James Hilliard
2023-01-29 21:18   ` Yann E. MORIN
2023-01-27 14:10 ` [Buildroot] [PATCH v4 03/13] package/ruy: " James Hilliard
2023-01-27 14:10 ` [Buildroot] [PATCH v4 04/13] package/gemmlowp: " James Hilliard
2023-01-29 21:45   ` Yann E. MORIN
2023-01-30  3:17     ` James Hilliard
2023-01-30  7:13       ` Yann E. MORIN
2023-01-30  7:45         ` James Hilliard
2023-01-29 21:46   ` Yann E. MORIN
2023-01-29 23:51     ` James Hilliard
2023-01-27 14:10 ` [Buildroot] [PATCH v4 05/13] package/neon-2-sse: " James Hilliard
2023-01-29 21:58   ` Yann E. MORIN
2023-01-27 14:10 ` [Buildroot] [PATCH v4 06/13] package/fxdiv: " James Hilliard
2023-01-29 22:28   ` Yann E. MORIN
2023-01-27 14:10 ` [Buildroot] [PATCH v4 07/13] package/pthreadpool: " James Hilliard
2023-01-27 14:10 ` [Buildroot] [PATCH v4 08/13] package/psimd: " James Hilliard
2023-01-27 14:10 ` [Buildroot] [PATCH v4 09/13] package/fp16: " James Hilliard
2023-01-27 14:10 ` [Buildroot] [PATCH v4 10/13] package/xnnpack: " James Hilliard
2023-01-27 14:10 ` [Buildroot] [PATCH v4 11/13] package/fft2d: " James Hilliard
2023-01-27 14:10 ` [Buildroot] [PATCH v4 12/13] package/farmhash: " James Hilliard
2023-01-27 14:10 ` [Buildroot] [PATCH v4 13/13] package/tensorflow-lite: " James Hilliard
2023-01-29 20:55 ` [Buildroot] [PATCH v4 01/13] package/flatbuffers: build position independent code Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.