summaryrefslogtreecommitdiff
path: root/sci-libs/QNNPACK
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /sci-libs/QNNPACK
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'sci-libs/QNNPACK')
-rw-r--r--sci-libs/QNNPACK/Manifest4
-rw-r--r--sci-libs/QNNPACK/QNNPACK-2019.08.28.ebuild46
-rw-r--r--sci-libs/QNNPACK/files/QNNPACK-2019.08.28-gentoo.patch130
-rw-r--r--sci-libs/QNNPACK/metadata.xml11
4 files changed, 191 insertions, 0 deletions
diff --git a/sci-libs/QNNPACK/Manifest b/sci-libs/QNNPACK/Manifest
new file mode 100644
index 000000000000..9ca243cfcd94
--- /dev/null
+++ b/sci-libs/QNNPACK/Manifest
@@ -0,0 +1,4 @@
+AUX QNNPACK-2019.08.28-gentoo.patch 5090 BLAKE2B ced2f40a4c51e9d5ddd578ef92e5241023f11b1ac75940144362e50c7e4fd4293b2fa58e3b0bb83e793ed7120f985b34c423f63415a136666692cb000ff7d053 SHA512 1a44c83b6a90990086d10032d458945d51c20831dfa01af3620ff8300ea572afe95d7d38032b63035a292de13c7f37a971c74e94ffe3340d54df4f601f2ec58d
+DIST QNNPACK-2019.08.28.tar.gz 205600 BLAKE2B f174051cba9e3307633f0b12326a37d8fde23562d47e09d3c078350146439094ca6cb2f032cf3aa4af40e5968ee16b8847241f787f7c84ea501124e0528fb82d SHA512 437a835acfedae851a9a8572fa6eea9854dcb8bcca499bc4a2582314e44f5f199778e857932da4aecf943bea7cb2eb5b1c41d4b4ca6075bddbe0f18b2c7b9127
+EBUILD QNNPACK-2019.08.28.ebuild 907 BLAKE2B 6a7afceb21651b5c469206196011ce43c89150ceb1489722039b6e9e3c38ae129a34ca9bd7f22de52c00dd7701cb56c40da61213334959d2234af77b46ba2e0d SHA512 0daa7e7ac7600bd947ec97c889112eff2451ed631dd016b4d5c73174fafbef301abe1108d8144df5f05c0915190ba7d45c2083f75245722c0a087fd788350e51
+MISC metadata.xml 328 BLAKE2B 91d01f7ecc3a888de237de72067042fc78bf1a9fa99e8e62e32548d11cf0d3923ec837f141c53fe95c040f618a1319d601eec870de84bf35703be696a3788a87 SHA512 fae5ec89b7e7bd7cd962b6af41734da23766d3cb4f5c138e2325a43386e8c972306b4debc46404a86a218506edc3860df1d127e85684399b271dfc533cb32c66
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>