summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2022-07-02 23:12:40 +0200
committerAlfredo Tupone <tupone@gentoo.org>2022-07-02 23:12:40 +0200
commit0f9a010a044de133417cbd56f63c32692451732c (patch)
treed0a46a1bdd2bfc2289bdfa7efdeee6d3fe732fba /sci-libs
parentdev-libs/collada-dom: update EAPI 6 -> 8 (diff)
downloadgentoo-0f9a010a044de133417cbd56f63c32692451732c.tar.gz
gentoo-0f9a010a044de133417cbd56f63c32692451732c.tar.bz2
gentoo-0f9a010a044de133417cbd56f63c32692451732c.zip
sci-libs/caffe2: add support for nnpack
Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/caffe2/caffe2-1.11.0-r2.ebuild (renamed from sci-libs/caffe2/caffe2-1.11.0-r1.ebuild)5
-rw-r--r--sci-libs/caffe2/files/caffe2-1.11.0-gentoo.patch11
-rw-r--r--sci-libs/caffe2/metadata.xml1
3 files changed, 15 insertions, 2 deletions
diff --git a/sci-libs/caffe2/caffe2-1.11.0-r1.ebuild b/sci-libs/caffe2/caffe2-1.11.0-r2.ebuild
index d48fb9082441..c59a498341cd 100644
--- a/sci-libs/caffe2/caffe2-1.11.0-r1.ebuild
+++ b/sci-libs/caffe2/caffe2-1.11.0-r2.ebuild
@@ -18,7 +18,7 @@ LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"
RESTRICT="test"
-IUSE="xnnpack"
+IUSE="nnpack xnnpack"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="
@@ -30,6 +30,7 @@ RDEPEND="
sci-libs/lapack
sci-libs/onnx
sci-libs/foxi
+ nnpack? ( sci-libs/NNPACK )
xnnpack? ( sci-libs/XNNPACK )
"
DEPEND="${RDEPEND}
@@ -62,7 +63,6 @@ src_configure() {
-DUSE_GLOO=OFF
-DUSE_SYSTEM_FP16=ON
-DUSE_FBGEMM=OFF
- -DUSE_NNPACK=OFF
-DUSE_PYTORCH_QNNPACK=OFF
-DUSE_QNNPACK=OFF
-DUSE_SYSTEM_CPUINFO=ON
@@ -81,6 +81,7 @@ src_configure() {
-DUSE_SYSTEM_FXDIV=ON
-DUSE_XNNPACK=$(usex xnnpack ON OFF)
-DUSE_SYSTEM_XNNPACK=$(usex xnnpack ON OFF)
+ -DUSE_NNPACK=$(usex nnpack ON OFF)
)
cmake_src_configure
}
diff --git a/sci-libs/caffe2/files/caffe2-1.11.0-gentoo.patch b/sci-libs/caffe2/files/caffe2-1.11.0-gentoo.patch
index f34216ea0970..b6b35e2329e8 100644
--- a/sci-libs/caffe2/files/caffe2-1.11.0-gentoo.patch
+++ b/sci-libs/caffe2/files/caffe2-1.11.0-gentoo.patch
@@ -110,3 +110,14 @@
endif()
# ==========================================================
+--- a/cmake/External/nnpack.cmake 2022-07-02 21:56:54.905696921 +0200
++++ b/cmake/External/nnpack.cmake 2022-07-02 21:57:03.665696739 +0200
+@@ -58,7 +58,7 @@
+ set(PTHREADPOOL_SOURCE_DIR "${CAFFE2_THIRD_PARTY_ROOT}/pthreadpool" CACHE STRING "pthreadpool source directory")
+ set(GOOGLETEST_SOURCE_DIR "${CAFFE2_THIRD_PARTY_ROOT}/googletest" CACHE STRING "Google Test source directory")
+
+- if(NOT TARGET nnpack)
++ if(FALSE)
+ if(NOT USE_SYSTEM_PTHREADPOOL AND USE_INTERNAL_PTHREADPOOL_IMPL)
+ set(NNPACK_CUSTOM_THREADPOOL ON CACHE BOOL "")
+ endif()
diff --git a/sci-libs/caffe2/metadata.xml b/sci-libs/caffe2/metadata.xml
index bdd11115f0fe..da10df6e0739 100644
--- a/sci-libs/caffe2/metadata.xml
+++ b/sci-libs/caffe2/metadata.xml
@@ -6,6 +6,7 @@
<name>Tupone Alfredo</name>
</maintainer>
<use>
+ <flag name="nnpack">Use NNPACK</flag>
<flag name="xnnpack">Use XNNPACK</flag>
</use>
<upstream>