diff options
author | Alfredo Tupone <tupone@gentoo.org> | 2022-05-19 08:02:32 +0200 |
---|---|---|
committer | Alfredo Tupone <tupone@gentoo.org> | 2022-05-19 08:02:32 +0200 |
commit | 450a71868049a8e33152f857acb1b2870b678a7b (patch) | |
tree | 616def617bced184536cda69fb09dfd099668782 /sci-libs | |
parent | sci-libs/XNNPACK: fix deps (diff) | |
download | gentoo-450a71868049a8e33152f857acb1b2870b678a7b.tar.gz gentoo-450a71868049a8e33152f857acb1b2870b678a7b.tar.bz2 gentoo-450a71868049a8e33152f857acb1b2870b678a7b.zip |
sci-libs/QNNPACK: add to tree
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/QNNPACK/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/QNNPACK/QNNPACK-2019.08.28.ebuild | 46 | ||||
-rw-r--r-- | sci-libs/QNNPACK/files/QNNPACK-2019.08.28-gentoo.patch | 130 | ||||
-rw-r--r-- | sci-libs/QNNPACK/metadata.xml | 11 |
4 files changed, 188 insertions, 0 deletions
diff --git a/sci-libs/QNNPACK/Manifest b/sci-libs/QNNPACK/Manifest new file mode 100644 index 000000000000..bd09babe05a3 --- /dev/null +++ b/sci-libs/QNNPACK/Manifest @@ -0,0 +1 @@ +DIST QNNPACK-2019.08.28.tar.gz 205600 BLAKE2B f174051cba9e3307633f0b12326a37d8fde23562d47e09d3c078350146439094ca6cb2f032cf3aa4af40e5968ee16b8847241f787f7c84ea501124e0528fb82d SHA512 437a835acfedae851a9a8572fa6eea9854dcb8bcca499bc4a2582314e44f5f199778e857932da4aecf943bea7cb2eb5b1c41d4b4ca6075bddbe0f18b2c7b9127 diff --git a/sci-libs/QNNPACK/QNNPACK-2019.08.28.ebuild b/sci-libs/QNNPACK/QNNPACK-2019.08.28.ebuild new file mode 100644 index 000000000000..11fde064e65b --- /dev/null +++ b/sci-libs/QNNPACK/QNNPACK-2019.08.28.ebuild @@ -0,0 +1,46 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit cmake + +CommitId=7d2a4e9931a82adc3814275b6219a03e24e36b4c + +DESCRIPTION="Quantized Neural Networks PACKage" +HOMEPAGE="https://github.com/pytorch/QNNPACK/" +SRC_URI="https://github.com/pytorch/${PN}/archive/${CommitId}.tar.gz + -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="static-libs test" + +RDEPEND=" + dev-libs/cpuinfo + dev-libs/pthreadpool +" +DEPEND="${RDEPEND} + dev-libs/FP16 + dev-libs/FXdiv +" + +BDEPEND="test? ( dev-cpp/gtest )" +RESTRICT="!test? ( test )" +REQUIRED_USE="test? ( static-libs )" + +S="${WORKDIR}"/${PN}-${CommitId} + +PATCHES=( + "${FILESDIR}"/${P}-gentoo.patch +) + +src_configure() { + local mycmakeargs=( + -DQNNPACK_BUILD_BENCHMARKS=OFF + -DQNNPACK_BUILD_TESTS=$(usex test ON OFF) + -DQNNPACK_LIBRARY_TYPE=$(usex static-libs static shared) + ) + + cmake_src_configure +} diff --git a/sci-libs/QNNPACK/files/QNNPACK-2019.08.28-gentoo.patch b/sci-libs/QNNPACK/files/QNNPACK-2019.08.28-gentoo.patch new file mode 100644 index 000000000000..46dbcc14f720 --- /dev/null +++ b/sci-libs/QNNPACK/files/QNNPACK-2019.08.28-gentoo.patch @@ -0,0 +1,130 @@ +--- a/CMakeLists.txt 2022-05-18 22:04:51.143871114 +0200 ++++ b/CMakeLists.txt 2022-05-18 22:05:11.998576858 +0200 +@@ -57,7 +57,7 @@ + SET(CLOG_SOURCE_DIR "${PROJECT_SOURCE_DIR}/deps/clog") + 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}" . +@@ -67,7 +67,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}" . +@@ -77,7 +77,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}" . +@@ -87,7 +87,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}" . +@@ -97,7 +97,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}" . +@@ -107,7 +107,7 @@ + SET(PTHREADPOOL_SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/pthreadpool" CACHE STRING "pthreadpool source directory") + ENDIF() + +-IF(QNNPACK_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}" . +@@ -272,7 +272,7 @@ + SET_TARGET_PROPERTIES(qnnpack PROPERTIES PUBLIC_HEADER include/qnnpack.h) + + # ---[ Configure clog +-IF(NOT TARGET clog) ++IF(FALSE) + SET(CLOG_BUILD_TESTS OFF CACHE BOOL "") + SET(CLOG_RUNTIME_TYPE "${CPUINFO_RUNTIME_TYPE}" CACHE STRING "") + ADD_SUBDIRECTORY( +@@ -284,7 +284,7 @@ + TARGET_LINK_LIBRARIES(qnnpack PRIVATE clog) + + # ---[ 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 "") +@@ -296,7 +296,7 @@ + TARGET_LINK_LIBRARIES(qnnpack 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( +@@ -312,7 +312,7 @@ + ENDIF() + + # ---[ Configure FXdiv +-IF(NOT TARGET fxdiv) ++IF(FALSE) + SET(FXDIV_BUILD_TESTS OFF CACHE BOOL "") + SET(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "") + ADD_SUBDIRECTORY( +@@ -319,18 +319,16 @@ + "${FXDIV_SOURCE_DIR}" + "${CONFU_DEPENDENCIES_BINARY_DIR}/fxdiv") + ENDIF() +-TARGET_LINK_LIBRARIES(qnnpack PRIVATE fxdiv) + + # ---[ Configure psimd +-IF(NOT TARGET psimd) ++IF(FALSE) + ADD_SUBDIRECTORY( + "${PSIMD_SOURCE_DIR}" + "${CONFU_DEPENDENCIES_BINARY_DIR}/psimd") + ENDIF() +-TARGET_LINK_LIBRARIES(qnnpack 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( +@@ -337,7 +335,6 @@ + "${FP16_SOURCE_DIR}" + "${CONFU_DEPENDENCIES_BINARY_DIR}/fp16") + ENDIF() +-TARGET_LINK_LIBRARIES(qnnpack PRIVATE fp16) + + INSTALL(TARGETS qnnpack + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +@@ -347,7 +347,7 @@ + # ---[ QNNPACK unit tests + IF(QNNPACK_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/QNNPACK/metadata.xml b/sci-libs/QNNPACK/metadata.xml new file mode 100644 index 000000000000..2187de2a666b --- /dev/null +++ b/sci-libs/QNNPACK/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">pytorch/QNNPACK</remote-id> + </upstream> +</pkgmetadata> |