mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-20 05:41:12 +02:00
nvidia-apex-22.12.ebuild
This commit is contained in:
parent
692b486d96
commit
57542e4a92
3 changed files with 50 additions and 78 deletions
|
|
@ -1 +1 @@
|
|||
DIST nvidia-apex-22.08-gh.tar.gz 746501 BLAKE2B 7d882e551c14b7b3a6b463f7873d22603b55e957ffd792735ab05ba158706c61c492325f87fb5d3370cf96108a7a4ec9546efc93c78a3e96f16470e43b93cee8 SHA512 11291444f5038f6b1702e7bd2c65daa29746ada9add18d1af226ed7d3facd21c4fe4ba2e262936f6a95e3a84f41184edf2a1ff964394fc6eb7b23e76157dcdf5
|
||||
DIST nvidia-apex-22.12-gh.tar.gz 790427 BLAKE2B 2b53e1c2ded28d6f3de8812bd6e8ed1db35d10b3293ef53ea7df63eebe5474f2b8e8af6c5700e9f19581715cb73de893b2736944ef621f2eff37959650641784 SHA512 418c76f655d0cb1cfebc8b007b914a2b8e3d9d54efd6496911702577913f7887bc744228e3a465c13c77bcccbf7971f9f9a5a2bd217e395abb92b1fdfbc18ff2
|
||||
|
|
|
|||
|
|
@ -1,77 +0,0 @@
|
|||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_IN_SOURCE_BUILD=1
|
||||
PYTHON_COMPAT=( python3_{10..11} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
#git branch
|
||||
HASH_COMMIT="${PV}-dev"
|
||||
|
||||
DESCRIPTION="NVIDIA-maintained utilities to streamline mixed precision and distributed training in Pytorch"
|
||||
HOMEPAGE="https://github.com/NVIDIA/apex"
|
||||
SRC_URI="https://github.com/NVIDIA/apex/archive/${HASH_COMMIT}.tar.gz -> ${P}-gh.tar.gz"
|
||||
|
||||
LICENSE=""
|
||||
SLOT="0"
|
||||
# unable to build in sanbox for some reason
|
||||
#KEYWORDS="amd64 ~arm64 x86"
|
||||
|
||||
#FIXME: can't use global "cuda"
|
||||
IUSE="cuda_ext"
|
||||
|
||||
RDEPEND=">=dev-python/tqdm-4.28.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/numpy-1.15.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyyaml-5.1[${PYTHON_USEDEP}]"
|
||||
DEPEND="${RDEPEND}"
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
S="${WORKDIR}/apex-${HASH_COMMIT}"
|
||||
|
||||
#python_prepare() {
|
||||
# if use !cuda_ext; then
|
||||
# einfo "CUDA disabled"
|
||||
#sed -i -e "s|fused_layer_norm_cuda = importlib|\#fused_layer_norm_cuda = importlib|" apex/normalization/fused_layer_norm.py || die
|
||||
# eapply ${FILESDIR}/disable_cuda.patch
|
||||
# fi
|
||||
# eapply_user
|
||||
#}
|
||||
|
||||
#python_prepare_all() {
|
||||
# export TORCH_CUDA_ARCH_LIST="compute capability"
|
||||
# python_setup
|
||||
# esetup.py
|
||||
# distutils-r1_python_prepare_all
|
||||
#}
|
||||
|
||||
#If you wish to cross-compile for a single specific architecture,
|
||||
#export TORCH_CUDA_ARCH_LIST="compute capability" before running setup.py.
|
||||
python_configure_all() {
|
||||
# export MAX_JOBS=1
|
||||
if use cuda_ext; then
|
||||
# export TORCH_CUDA_ARCH_LIST="compute capability"
|
||||
addpredict "/dev/nvidiactl"
|
||||
DISTUTILS_ARGS=( --cpp_ext --cuda_ext )
|
||||
fi
|
||||
}
|
||||
|
||||
#python_compile_all() {
|
||||
# export TORCH_CUDA_ARCH_LIST="compute capability"
|
||||
# esetup.py
|
||||
#}
|
||||
|
||||
#python_compile() {
|
||||
# export TORCH_CUDA_ARCH_LIST="compute capability"
|
||||
# breaks with parallel build
|
||||
# need to avoid dropping .so plugins into
|
||||
# build-lib, which breaks tests
|
||||
# esetup.py build_ext --inplace
|
||||
# --cpp_ext --cuda_ext build_ext --inplace -j1
|
||||
# TORCH_CUDA_ARCH_LIST="compute capability" distutils-r1_python_compile -j1
|
||||
# distutils-r1_python_compile -j1
|
||||
#}
|
||||
49
dev-python/nvidia-apex/nvidia-apex-22.12.ebuild
Normal file
49
dev-python/nvidia-apex/nvidia-apex-22.12.ebuild
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..11} )
|
||||
inherit distutils-r1
|
||||
|
||||
#git branch
|
||||
HASH_COMMIT="${PV}-dev"
|
||||
|
||||
DESCRIPTION="NVIDIA-maintained utilities to streamline mixed precision and distributed training in Pytorch"
|
||||
HOMEPAGE="https://github.com/NVIDIA/apex"
|
||||
SRC_URI="https://github.com/NVIDIA/apex/archive/${HASH_COMMIT}.tar.gz -> ${P}-gh.tar.gz"
|
||||
|
||||
LICENSE=""
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ~arm64 x86"
|
||||
|
||||
#FIXME: can't use global "cuda"
|
||||
IUSE="cuda_ext"
|
||||
|
||||
RDEPEND=">=dev-python/cxxfilt-0.2.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/tqdm-4.28.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/numpy-1.15.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/pyyaml-5.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/packaging-14.0[${PYTHON_USEDEP}]"
|
||||
DEPEND="${RDEPEND}"
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
S="${WORKDIR}/apex-${HASH_COMMIT}"
|
||||
|
||||
#If you wish to cross-compile for a single specific architecture,
|
||||
#export TORCH_CUDA_ARCH_LIST="compute capability" before running setup.py.
|
||||
python_configure_all() {
|
||||
if use cuda_ext; then
|
||||
# export MAX_JOBS=1
|
||||
#export TORCH_CUDA_ARCH_LIST="compute capability"
|
||||
export TORCH_CUDA_ARCH_LIST="7.5"
|
||||
|
||||
DISTUTILS_ARGS=( --cpp_ext --cuda_ext )
|
||||
fi
|
||||
}
|
||||
|
||||
python_compile() {
|
||||
distutils-r1_python_compile -j1
|
||||
}
|
||||
Loading…
Reference in a new issue