diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-04-06 23:28:41 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-04-06 23:28:41 +0100 |
commit | 91f19a3f41e80c4ab434a07636edb90912ef7556 (patch) | |
tree | 94510a6b3336b3129759452bf1811330e591c0c0 /sci-libs/XNNPACK/XNNPACK-2022.12.22.ebuild | |
parent | 3d1ec36f5f52760f2431b79c71dd9b7aaefbc9ee (diff) |
gentoo auto-resync : 06:04:2023 - 23:28:41
Diffstat (limited to 'sci-libs/XNNPACK/XNNPACK-2022.12.22.ebuild')
-rw-r--r-- | sci-libs/XNNPACK/XNNPACK-2022.12.22.ebuild | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/sci-libs/XNNPACK/XNNPACK-2022.12.22.ebuild b/sci-libs/XNNPACK/XNNPACK-2022.12.22.ebuild new file mode 100644 index 000000000000..c30a840eaf57 --- /dev/null +++ b/sci-libs/XNNPACK/XNNPACK-2022.12.22.ebuild @@ -0,0 +1,84 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +inherit cmake + +CommitId=51a987591a6fc9f0fc0707077f53d763ac132cbf + +DESCRIPTION="library of floating-point neural network inference operators" +HOMEPAGE="https://github.com/google/XNNPACK/" +SRC_URI="https://github.com/google/${PN}/archive/${CommitId}.tar.gz + -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+assembly jit +memopt +sparse 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}"/${PN}-2022.02.17-gentoo.patch +) + +src_prepare() { + sed -i \ + -e "/PRIVATE fp16)/d" \ + -e "/PRIVATE fxdiv)/d" \ + -e "/PRIVATE clog)/d" \ + -e "/TARGET_LINK_LIBRARIES/s: fp16::" \ + CMakeLists.txt \ + || die + dropTest=( + "add-nd-test" + "subtract-nd-test" + "f32-velu-test" + "qc8-dwconv-minmax-fp32-test" + "qs8-dwconv-minmax-fp32-test" + "qs8-vadd-minmax-test" + "qs8-vaddc-minmax-test" + "qu8-dwconv-minmax-fp32-test" + "qu8-vadd-minmax-test" + "qu8-vaddc-minmax-test" + ) + for id in ${dropTest[@]} + do + sed -i \ + -e "/ADD_TEST(${id}/d" \ + CMakeLists.txt \ + || die + done + + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DXNNPACK_BUILD_BENCHMARKS=OFF + -DXNNPACK_USE_SYSTEM_LIBS=ON + -DXNNPACK_BUILD_TESTS=$(usex test ON OFF) + -DXNNPACK_LIBRARY_TYPE=$(usex static-libs static shared) + -DXNNPACK_ENABLE_ASSEMBLY=$(usex assembly ON OFF) + -DXNNPACK_ENABLE_JIT=$(usex jit ON OFF) + -DXNNPACK_ENABLE_MEMOPT=$(usex memopt ON OFF) + -DXNNPACK_ENABLE_SPARSE=$(usex sparse ON OFF) + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + ) + + cmake_src_configure + cd "${BUILD_DIR}" +} |