nvidia-apex-22.04.ebuild

This commit is contained in:
Anton Bolshakov 2023-03-21 21:50:58 +08:00
parent a270187ec2
commit 69f30fe108
No known key found for this signature in database
GPG key ID: 32BDCED870788F04
3 changed files with 67 additions and 4 deletions

View file

@ -1 +1,2 @@
DIST nvidia-apex-22.04-gh.tar.gz 769456 BLAKE2B 9c9270e5b19afa244784f0825a2c093820aab5e64f5621ea0350da6b127d14b734fcbf16982ff889a82b624842d982c0f447146a9efddd165dd59916988ee955 SHA512 347a67640dd1903442dacc59cb7c15efe299cafc3d7afd36ae2f1fbe4b7b08d23c18a5351035f62f3b7f47023331d37485a99cc0049ef8c788f27a32146d9e64
DIST nvidia-apex-22.12-gh.tar.gz 790427 BLAKE2B 2b53e1c2ded28d6f3de8812bd6e8ed1db35d10b3293ef53ea7df63eebe5474f2b8e8af6c5700e9f19581715cb73de893b2736944ef621f2eff37959650641784 SHA512 418c76f655d0cb1cfebc8b007b914a2b8e3d9d54efd6496911702577913f7887bc744228e3a465c13c77bcccbf7971f9f9a5a2bd217e395abb92b1fdfbc18ff2

View file

@ -0,0 +1,56 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..11} )
#FIXME: sci-libs/pytorch is single package:
#DISTUTILS_SINGLE_IMPL=1
#inherit python-single-r1
inherit distutils-r1
#git branch
HASH_COMMIT="${PV}-dev"
DESCRIPTION="Tools for easy 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}]
>=sci-libs/pytorch-1.12.0
>=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
}

View file

@ -1,21 +1,27 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..11} )
#FIXME: sci-libs/pytorch is single package:
#DISTUTILS_SINGLE_IMPL=1
#inherit python-single-r1
inherit distutils-r1
#git branch
HASH_COMMIT="${PV}-dev"
DESCRIPTION="NVIDIA-maintained utilities to streamline mixed precision and distributed training in Pytorch"
DESCRIPTION="Tools for easy 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"
KEYWORDS="~amd64 ~arm64 ~x86"
#FIXME: can't use global "cuda"
IUSE="cuda_ext"
@ -23,7 +29,7 @@ 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}]
>=sci-libs/pytorch-1.12.0[${PYTHON_USEDEP}]
>=sci-libs/pytorch-1.12.0
>=dev-python/pyyaml-5.1[${PYTHON_USEDEP}]
>=dev-python/packaging-14.0[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}"