You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.1 KiB
58 lines
1.1 KiB
5 months ago
|
# Copyright 2022-2024 Gentoo Authors
|
||
2 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=8
|
||
|
|
||
5 months ago
|
PYTHON_COMPAT=( python3_{9..12} )
|
||
2 years ago
|
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() {
|
||
1 year ago
|
python_has_version "dev-python/PeachPy[${PYTHON_USEDEP}]"
|
||
2 years ago
|
}
|
||
|
|
||
1 year ago
|
src_prepare() {
|
||
|
sed -i -e "/-O/d" CMakeLists.txt || die
|
||
|
cmake_src_prepare
|
||
|
}
|
||
|
|
||
2 years ago
|
src_configure() {
|
||
|
local mycmakeargs=(
|
||
|
-DNNPACK_BUILD_TESTS=$(usex test ON OFF)
|
||
|
)
|
||
|
cmake_src_configure
|
||
|
}
|