diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
commit | 0f558761aa2dee1017b4751e4017205e015a9560 (patch) | |
tree | 037df795519468a25d9362b4e95cdaeb84eb1cf9 /sci-libs/NNPACK | |
parent | 752d6256e5204b958b0ef7905675a940b5e9172f (diff) |
gentoo resync : 29.12.2022
Diffstat (limited to 'sci-libs/NNPACK')
-rw-r--r-- | sci-libs/NNPACK/Manifest | 4 | ||||
-rw-r--r-- | sci-libs/NNPACK/NNPACK-2020.12.22.ebuild | 52 | ||||
-rw-r--r-- | sci-libs/NNPACK/files/NNPACK-2020.12.22-gentoo.patch | 149 | ||||
-rw-r--r-- | sci-libs/NNPACK/metadata.xml | 11 |
4 files changed, 216 insertions, 0 deletions
diff --git a/sci-libs/NNPACK/Manifest b/sci-libs/NNPACK/Manifest new file mode 100644 index 000000000000..c1916415843d --- /dev/null +++ b/sci-libs/NNPACK/Manifest @@ -0,0 +1,4 @@ +AUX NNPACK-2020.12.22-gentoo.patch 6218 BLAKE2B 1bc9d1bb20504b90d99492fd0c93324830aa84a58a59101288677ba0d622c5a50e8f6181089fef1e14d14f563824a9c42979387e6f3efbb0add3211d68f6ce6c SHA512 1a52cc158c4c6259a9f5fbd8ce40f8647a96ce7c7f67bbdcfe495647b75f6c2f5baa826390b8474f48a91ee4a043bfb2085915730f0dd32f4edd34a733b2cc13 +DIST NNPACK-2020.12.22.tar.gz 219318 BLAKE2B 6b6619c8a706ef9630f20fda1e276314b2ef7f6c9aed26836a48bdaa0ae198a86383e68b04c651f37c07d34e400bc54b5daa75b06fc18cdb0a9c55e2cb33bbe1 SHA512 f0b261e8698b412d12dd739e5d0cf71c284965ae28da735ae22814a004358ba3ecaea6cd26fa17b594c0245966b7dd2561c1e05c6cbf0592fd7b85ea0f21eb37 +EBUILD NNPACK-2020.12.22.ebuild 1033 BLAKE2B 250444919be164f899e0babc25ba2b5f3b6e6b295a87bf99efa87a8d785b849bc07f7ab5e3fa08ef0b6d620614402e3e1ae2e79b58ec03a6a8aeb28a1dccabb9 SHA512 8218fca96d4adf7bd6081a5a49c0ef369b6f97386f646297dd3fd86f3e1d1d89781abbc416706387bd2ab705fb144bf29c12b2efdb36ed0b2e88a84295c8ea57 +MISC metadata.xml 331 BLAKE2B 433021dbfc82b3a36aa6e63f719c18bf785cd23fa150cb1e546f01a138b06dbfa81b2fd1588fe33ebcf4c50731c173ce2bfc87e2ff4b7f1bb2e80a62b2cca82a SHA512 3499be333f3ed44729a9abb464cdcdcb39f01bb7da604433db73654886ff8e340e176cfbdcd95479e6805753e735f185d621186ab9e317ee99cbc0458970a10b diff --git a/sci-libs/NNPACK/NNPACK-2020.12.22.ebuild b/sci-libs/NNPACK/NNPACK-2020.12.22.ebuild new file mode 100644 index 000000000000..9f86918fe2b4 --- /dev/null +++ b/sci-libs/NNPACK/NNPACK-2020.12.22.ebuild @@ -0,0 +1,52 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit cmake python-any-r1 + +CommitId=c07e3a0400713d546e0dea2d5466dd22ea389c73 + +DESCRIPTION="acceleration package for neural network computations" +HOMEPAGE="https://github.com/Maratyszcza/NNPACK/" +SRC_URI="https://github.com/Maratyszcza/${PN}/archive/${CommitId}.tar.gz + -> ${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64" +IUSE=test +RESTRICT="test" # consuming too much CPU + +RDEPEND=" + dev-libs/pthreadpool + dev-libs/cpuinfo +" +DEPEND="${RDEPEND} + dev-libs/FP16 + dev-libs/FXdiv + dev-libs/psimd +" +BDEPEND=" + ${PYTHON_DEPS} + test? ( dev-cpp/gtest ) + $(python_gen_any_dep ' + dev-python/PeachPy[${PYTHON_USEDEP}] + ') +" + +S="${WORKDIR}"/${PN}-${CommitId} + +PATCHES=( "${FILESDIR}"/${P}-gentoo.patch ) + +python_check_deps() { + has_version -b "dev-python/PeachPy[${PYTHON_USEDEP}]" +} + +src_configure() { + local mycmakeargs=( + -DNNPACK_BUILD_TESTS=$(usex test ON OFF) + ) + cmake_src_configure +} diff --git a/sci-libs/NNPACK/files/NNPACK-2020.12.22-gentoo.patch b/sci-libs/NNPACK/files/NNPACK-2020.12.22-gentoo.patch new file mode 100644 index 000000000000..82064d5171c1 --- /dev/null +++ b/sci-libs/NNPACK/files/NNPACK-2020.12.22-gentoo.patch @@ -0,0 +1,149 @@ +--- a/CMakeLists.txt 2022-05-17 20:26:04.765047673 +0200 ++++ b/CMakeLists.txt 2022-05-17 20:27:51.513583722 +0200 +@@ -123,7 +123,7 @@ + CACHE PATH "Confu-style dependencies binary directory") + + IF(NNPACK_BACKEND STREQUAL "x86-64") +- IF(NOT DEFINED PYTHON_SIX_SOURCE_DIR) ++ IF(FALSE) + MESSAGE(STATUS "Downloading six (Python package) to ${CONFU_DEPENDENCIES_SOURCE_DIR}/six (define PYTHON_SIX_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadSix.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/six-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -133,7 +133,7 @@ + SET(PYTHON_SIX_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/six" CACHE STRING "six (Python package) source directory") + ENDIF() + +- IF(NOT DEFINED PYTHON_ENUM_SOURCE_DIR) ++ IF(FALSE) + IF(${PYTHON_VERSION_STRING} VERSION_LESS 3.4) + # ---[ Python < 3.4 does not natively support enums, and needs a polyfill + MESSAGE(STATUS "Downloading enum (Python package) to ${CONFU_DEPENDENCIES_SOURCE_DIR}/enum (define PYTHON_ENUM_SOURCE_DIR to avoid it)") +@@ -148,7 +148,7 @@ + ENDIF() + ENDIF() + +- IF(NOT DEFINED PYTHON_PEACHPY_SOURCE_DIR) ++ IF(FALSE) + # ---[ PeachPy requires Opcodes for installation + IF(NOT DEFINED PYTHON_OPCODES_SOURCE_DIR) + MESSAGE(STATUS "Downloading opcodes (Python package) to ${CONFU_DEPENDENCIES_SOURCE_DIR}/opcodes (define PYTHON_OPCODES_SOURCE_DIR to avoid it)") +@@ -177,7 +177,7 @@ + ENDIF() + ENDIF() + +-IF(NOT DEFINED CPUINFO_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading cpuinfo to ${CONFU_DEPENDENCIES_SOURCE_DIR}/cpuinfo (define CPUINFO_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadCpuinfo.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/cpuinfo-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -187,7 +187,7 @@ + SET(CPUINFO_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/cpuinfo" CACHE STRING "cpuinfo source directory") + ENDIF() + +-IF(NOT DEFINED FP16_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading FP16 to ${CONFU_DEPENDENCIES_SOURCE_DIR}/fp16 (define FP16_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadFP16.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/fp16-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -197,7 +197,7 @@ + SET(FP16_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/fp16" CACHE STRING "FP16 source directory") + ENDIF() + +-IF(NOT DEFINED FXDIV_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading FXdiv to ${CONFU_DEPENDENCIES_SOURCE_DIR}/fxdiv (define FXDIV_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadFXdiv.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/fxdiv-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -207,7 +207,7 @@ + SET(FXDIV_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/fxdiv" CACHE STRING "FXdiv source directory") + ENDIF() + +-IF(NOT DEFINED PSIMD_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading PSimd to ${CONFU_DEPENDENCIES_SOURCE_DIR}/psimd (define PSIMD_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadPSimd.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/psimd-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -217,7 +217,7 @@ + SET(PSIMD_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/psimd" CACHE STRING "PSimd source directory") + ENDIF() + +-IF(NOT DEFINED PTHREADPOOL_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading pthreadpool to ${CONFU_DEPENDENCIES_SOURCE_DIR}/pthreadpool (define PTHREADPOOL_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadPThreadPool.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/pthreadpool-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -227,7 +227,7 @@ + SET(PTHREADPOOL_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/pthreadpool" CACHE STRING "pthreadpool source directory") + ENDIF() + +-IF(NNPACK_BUILD_TESTS AND NOT DEFINED GOOGLETEST_SOURCE_DIR) ++IF(FALSE) + MESSAGE(STATUS "Downloading Google Test to ${CONFU_DEPENDENCIES_SOURCE_DIR}/googletest (define GOOGLETEST_SOURCE_DIR to avoid it)") + CONFIGURE_FILE(cmake/DownloadGoogleTest.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/googletest-download/CMakeLists.txt") + EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" . +@@ -496,7 +496,7 @@ + TARGET_INCLUDE_DIRECTORIES(nnpack_reference_layers PUBLIC include) + + # ---[ Configure cpuinfo +-IF(NOT TARGET cpuinfo) ++IF(FALSE) + SET(CPUINFO_BUILD_TOOLS OFF CACHE BOOL "") + SET(CPUINFO_BUILD_UNIT_TESTS OFF CACHE BOOL "") + SET(CPUINFO_BUILD_MOCK_TESTS OFF CACHE BOOL "") +@@ -508,7 +508,7 @@ + TARGET_LINK_LIBRARIES(nnpack PRIVATE cpuinfo) + + # ---[ Configure pthreadpool +-IF(NOT TARGET pthreadpool) ++IF(FALSE) + SET(PTHREADPOOL_BUILD_TESTS OFF CACHE BOOL "") + SET(PTHREADPOOL_BUILD_BENCHMARKS OFF CACHE BOOL "") + ADD_SUBDIRECTORY( +@@ -525,7 +525,7 @@ + TARGET_LINK_LIBRARIES(nnpack_reference_layers PUBLIC pthreadpool) + + # ---[ Configure FXdiv +-IF(NOT TARGET fxdiv) ++IF(FALSE) + SET(FXDIV_BUILD_TESTS OFF CACHE BOOL "") + SET(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "") + ADD_SUBDIRECTORY( +@@ -532,18 +532,16 @@ + "${FXDIV_SOURCE_DIR}" + "${CONFU_DEPENDENCIES_BINARY_DIR}/fxdiv") + ENDIF() +-TARGET_LINK_LIBRARIES(nnpack PRIVATE fxdiv) + + # ---[ Configure psimd +-IF(NOT TARGET psimd) ++IF(FALSE) + ADD_SUBDIRECTORY( + "${PSIMD_SOURCE_DIR}" + "${CONFU_DEPENDENCIES_BINARY_DIR}/psimd") + ENDIF() +-TARGET_LINK_LIBRARIES(nnpack PRIVATE psimd) + + # ---[ Configure FP16 +-IF(NOT TARGET fp16) ++IF(FALSE) + SET(FP16_BUILD_TESTS OFF CACHE BOOL "") + SET(FP16_BUILD_BENCHMARKS OFF CACHE BOOL "") + ADD_SUBDIRECTORY( +@@ -550,8 +548,6 @@ + "${FP16_SOURCE_DIR}" + "${CONFU_DEPENDENCIES_BINARY_DIR}/fp16") + ENDIF() +-TARGET_LINK_LIBRARIES(nnpack PRIVATE fp16) +-TARGET_LINK_LIBRARIES(nnpack_reference_layers PUBLIC fp16) + + INSTALL(TARGETS nnpack + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +@@ -560,7 +560,7 @@ + + IF(NNPACK_BUILD_TESTS) + # ---[ Build google test +- IF(NOT TARGET gtest) ++ IF(FALSE) + SET(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + ADD_SUBDIRECTORY( + "${GOOGLETEST_SOURCE_DIR}" diff --git a/sci-libs/NNPACK/metadata.xml b/sci-libs/NNPACK/metadata.xml new file mode 100644 index 000000000000..654ce634d4a8 --- /dev/null +++ b/sci-libs/NNPACK/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>tupone@gentoo.org</email> + <name>Tupone Alfredo</name> + </maintainer> + <upstream> + <remote-id type="github">Maratyszcza/NNPACK</remote-id> + </upstream> +</pkgmetadata> |