diff options
author | Alfredo Tupone <tupone@gentoo.org> | 2022-07-02 00:22:08 +0200 |
---|---|---|
committer | Alfredo Tupone <tupone@gentoo.org> | 2022-07-02 13:03:44 +0200 |
commit | e4f62deb1b127d32fc9845d5e90d21a0c090bf53 (patch) | |
tree | 276987ab38b0be5676f76169d360d1ef6fa53c46 /sci-libs | |
parent | dev-qt/qtxmlpatterns: Stabilize 5.15.5 ppc64, #853232 (diff) | |
download | gentoo-e4f62deb1b127d32fc9845d5e90d21a0c090bf53.tar.gz gentoo-e4f62deb1b127d32fc9845d5e90d21a0c090bf53.tar.bz2 gentoo-e4f62deb1b127d32fc9845d5e90d21a0c090bf53.zip |
sci-libs/caffe2: add XNNPACK usage
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-r1.ebuild (renamed from sci-libs/caffe2/caffe2-1.11.0.ebuild) | 7 | ||||
-rw-r--r-- | sci-libs/caffe2/files/caffe2-1.11.0-gentoo.patch | 19 | ||||
-rw-r--r-- | sci-libs/caffe2/metadata.xml | 3 |
3 files changed, 28 insertions, 1 deletions
diff --git a/sci-libs/caffe2/caffe2-1.11.0.ebuild b/sci-libs/caffe2/caffe2-1.11.0-r1.ebuild index e0f6d0d772f2..137c5df60ebe 100644 --- a/sci-libs/caffe2/caffe2-1.11.0.ebuild +++ b/sci-libs/caffe2/caffe2-1.11.0-r1.ebuild @@ -18,6 +18,7 @@ LICENSE="BSD" SLOT="0" KEYWORDS="~amd64" RESTRICT="test" +IUSE="xnnpack" REQUIRED_USE="${PYTHON_REQUIRED_USE}" RDEPEND=" @@ -29,6 +30,7 @@ RDEPEND=" sci-libs/lapack sci-libs/onnx sci-libs/foxi + xnnpack? ( sci-libs/XNNPACK ) " DEPEND="${RDEPEND} dev-libs/FP16 @@ -53,7 +55,7 @@ src_configure() { python_setup local mycmakeargs=( -DUSE_KINETO=OFF - -DUSE_XNNPACK=OFF + -DUSE_XNNPACK=$(usex xnnpack ON OFF) -DUSE_SYSTEM_SLEEF=ON -DUSE_BREAKPAD=OFF -DUSE_SYSTEM_ONNX=ON @@ -76,6 +78,9 @@ src_configure() { -DTORCH_INSTALL_LIB_DIR=/usr/$(get_libdir) -DLIBSHM_INSTALL_LIB_SUBDIR=/usr/$(get_libdir) -DUSE_CCACHE=OFF + -DUSE_SYSTEM_PTHREADPOOL=ON + -DUSE_SYSTEM_XNNPACK=ON + -DUSE_SYSTEM_FXDIV=ON ) 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 ac74edadab35..f34216ea0970 100644 --- a/sci-libs/caffe2/files/caffe2-1.11.0-gentoo.patch +++ b/sci-libs/caffe2/files/caffe2-1.11.0-gentoo.patch @@ -91,3 +91,22 @@ install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR} DESTINATION include FILES_MATCHING PATTERN "*.h") +--- a/caffe2/CMakeLists.txt 2022-07-01 21:56:49.643490049 +0200 ++++ b/caffe2/CMakeLists.txt 2022-07-01 21:57:17.091489479 +0200 +@@ -109,7 +109,7 @@ + # Note: the folders that are being commented out have not been properly + # addressed yet. + +-if(NOT MSVC AND USE_XNNPACK) ++if(FALSE) + if(NOT TARGET fxdiv) + set(FXDIV_BUILD_TESTS OFF CACHE BOOL "") + set(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "") +@@ -967,7 +967,6 @@ + endif() + + if(NOT MSVC AND USE_XNNPACK) +- TARGET_LINK_LIBRARIES(torch_cpu PRIVATE fxdiv) + endif() + + # ========================================================== diff --git a/sci-libs/caffe2/metadata.xml b/sci-libs/caffe2/metadata.xml index d12749aa5c21..bdd11115f0fe 100644 --- a/sci-libs/caffe2/metadata.xml +++ b/sci-libs/caffe2/metadata.xml @@ -5,6 +5,9 @@ <email>tupone@gentoo.org</email> <name>Tupone Alfredo</name> </maintainer> + <use> + <flag name="xnnpack">Use XNNPACK</flag> + </use> <upstream> <remote-id type="github">pytorch/pytorch</remote-id> </upstream> |