diff options
author | Alfredo Tupone <tupone@gentoo.org> | 2023-12-26 23:13:33 +0100 |
---|---|---|
committer | Alfredo Tupone <tupone@gentoo.org> | 2023-12-26 23:13:55 +0100 |
commit | fe0d2123de65d6d5d32306b2420875f790eff68e (patch) | |
tree | 8d397d1edfcb34f3f4ffcc0e866f88893af6be33 /sci-libs | |
parent | sci-libs/caffe2: add 2.1.2 (diff) | |
download | gentoo-fe0d2123de65d6d5d32306b2420875f790eff68e.tar.gz gentoo-fe0d2123de65d6d5d32306b2420875f790eff68e.tar.bz2 gentoo-fe0d2123de65d6d5d32306b2420875f790eff68e.zip |
sci-libs/pytorch: add 2.1.2
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/pytorch/Manifest | 1 | ||||
-rw-r--r-- | sci-libs/pytorch/pytorch-2.1.2.ebuild | 66 |
2 files changed, 67 insertions, 0 deletions
diff --git a/sci-libs/pytorch/Manifest b/sci-libs/pytorch/Manifest index d51cccdc3c37..2fc8f8663e91 100644 --- a/sci-libs/pytorch/Manifest +++ b/sci-libs/pytorch/Manifest @@ -2,3 +2,4 @@ DIST pytorch-1.13.1.tar.gz 108279745 BLAKE2B 75de03b74dfdaf8d8fb5ea743fcc0c1b0e4 DIST pytorch-2.0.0.tar.gz 111327292 BLAKE2B 6d593a975c0ade714f0b189f7e3c4ff704b9a9a2377b5e441a9cefc202fa22779966d08948e63671912c6ea5a0eee124042155f4f57a654db34e19e42f013cc9 SHA512 4dd76160711c0d87f3026c8b7fa3ed149dd86b8ac0ee9ecea0eaf80d2e6ce8c29368392e77b9466d90b60634087b462b782495997a5d33367cc8ca9fe14c8a14 DIST pytorch-2.0.1.tar.gz 111335778 BLAKE2B 7a10cc2b2d5e2422aef7e060a0c3a62ca5c7460c6e0b9becade9b98939501975c74ed5a175a653731f43ca824d2c9bd31f41d1f633c2b139779ab23d5331e9ce SHA512 2309a22b3be3ccdb36d8d9781a59a7bdcc2fdb8d95ada205702ec77862480f0cbb12cd5d6b8cd3114d01a6e33b7743d0fe9de93debf37138ca5c14403cdb0c43 DIST pytorch-2.1.1.tar.gz 116317162 BLAKE2B d9819256cba0b9951aabe95d86fb135e97d8bafa2c010d13162cd9b3373ca75f20d218e31279ace41981f3f76308721c522f9e53745a1ff9e6386fa10634f9ad SHA512 31b36e7732ee086ae7565a3811ab2d1b2869e79057bea7a4ffc4a3c95c544757e656a6d2289ee11fe7508828aca144e4220ef1e9ab1878e075e1259cf6ff9ca4 +DIST pytorch-2.1.2.tar.gz 116316469 BLAKE2B c5a55ee264bc3477d3556ba6376b5591117e992e56e0dd0c9ba93d12526e2727f7840f6f1e0730a38223b6492c9556840c4ebf22ffd220e97225c2abff303747 SHA512 a8961d78ad785b13c959a0612563a60e0de17a7c8bb9822ddea9a24072796354d07e81c47b6cc8761b21a6448845b088cf80e1661d9e889b0ed5474d3dc76756 diff --git a/sci-libs/pytorch/pytorch-2.1.2.ebuild b/sci-libs/pytorch/pytorch-2.1.2.ebuild new file mode 100644 index 000000000000..cc603731123f --- /dev/null +++ b/sci-libs/pytorch/pytorch-2.1.2.ebuild @@ -0,0 +1,66 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..11} ) +DISTUTILS_SINGLE_IMPL=1 +DISTUTILS_EXT=1 +inherit distutils-r1 prefix + +DESCRIPTION="Tensors and Dynamic neural networks in Python" +HOMEPAGE="https://pytorch.org/" +SRC_URI="https://github.com/pytorch/${PN}/archive/refs/tags/v${PV}.tar.gz + -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +RESTRICT="test" + +REQUIRED_USE=${PYTHON_REQUIRED_USE} +RDEPEND=" + ${PYTHON_DEPS} + ~sci-libs/caffe2-${PV}[${PYTHON_SINGLE_USEDEP}] + $(python_gen_cond_dep ' + dev-python/typing-extensions[${PYTHON_USEDEP}] + dev-python/sympy[${PYTHON_USEDEP}] + ') +" +DEPEND="${RDEPEND} + $(python_gen_cond_dep ' + dev-python/pyyaml[${PYTHON_USEDEP}] + ') +" + +src_prepare() { + eapply \ + "${FILESDIR}"/${PN}-2.1.1-dontbuildagain.patch \ + "${FILESDIR}"/pytorch-1.9.0-Change-library-directory-according-to-CMake-build.patch \ + "${FILESDIR}"/${PN}-2.0.0-global-dlopen.patch \ + "${FILESDIR}"/pytorch-1.7.1-torch_shm_manager.patch \ + "${FILESDIR}"/${PN}-1.13.0-setup.patch \ + "${FILESDIR}"/${PN}-2.1.1-emptyso.patch \ + + # Set build dir for pytorch's setup + sed -i \ + -e "/BUILD_DIR/s|build|/var/lib/caffe2/|" \ + tools/setup_helpers/env.py \ + || die + distutils-r1_src_prepare + + hprefixify tools/setup_helpers/env.py +} + +python_compile() { + PYTORCH_BUILD_VERSION=${PV} \ + PYTORCH_BUILD_NUMBER=0 \ + USE_SYSTEM_LIBS=ON \ + CMAKE_BUILD_DIR="${BUILD_DIR}" \ + distutils-r1_python_compile develop sdist +} + +python_install() { + USE_SYSTEM_LIBS=ON distutils-r1_python_install +} |