[Buildroot] [PATCH v5 07/10] package/xnnpack: new package
James Hilliard
james.hilliard1 at gmail.com
Mon Jan 30 00:28:51 UTC 2023
This package is required by tensorflow-lite.
Signed-off-by: James Hilliard <james.hilliard1 at 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 daf0f89430..5e4daa7b3e 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2730,6 +2730,7 @@ F: package/gemmlowp/
F: package/psimd/
F: package/pthreadpool/
F: package/ruy/
+F: package/xnnpack/
N: Stefan Ott <stefan at ott.net>
F: package/unbound/
diff --git a/package/Config.in b/package/Config.in
index 867159fa2b..7fa5bb867e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2136,6 +2136,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
More information about the buildroot
mailing list