diff options
author | Alfredo Tupone <tupone@gentoo.org> | 2024-04-30 19:20:41 +0200 |
---|---|---|
committer | Alfredo Tupone <tupone@gentoo.org> | 2024-04-30 19:20:58 +0200 |
commit | a707f7e24c174e2ceb6e9ae93d8a3571dd99e048 (patch) | |
tree | 55a9d5b0775271185622010b06723ed029a10611 /sci-libs | |
parent | sys-kernel/genkernel: drop versions (diff) | |
download | gentoo-a707f7e24c174e2ceb6e9ae93d8a3571dd99e048.tar.gz gentoo-a707f7e24c174e2ceb6e9ae93d8a3571dd99e048.tar.bz2 gentoo-a707f7e24c174e2ceb6e9ae93d8a3571dd99e048.zip |
sci-libs/pytorch: add 2.3.0
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.3.0.ebuild | 66 |
2 files changed, 67 insertions, 0 deletions
diff --git a/sci-libs/pytorch/Manifest b/sci-libs/pytorch/Manifest index b72973ca6f63..f1df96691729 100644 --- a/sci-libs/pytorch/Manifest +++ b/sci-libs/pytorch/Manifest @@ -1,2 +1,3 @@ DIST pytorch-2.1.2.tar.gz 116316469 BLAKE2B c5a55ee264bc3477d3556ba6376b5591117e992e56e0dd0c9ba93d12526e2727f7840f6f1e0730a38223b6492c9556840c4ebf22ffd220e97225c2abff303747 SHA512 a8961d78ad785b13c959a0612563a60e0de17a7c8bb9822ddea9a24072796354d07e81c47b6cc8761b21a6448845b088cf80e1661d9e889b0ed5474d3dc76756 DIST pytorch-2.2.2.tar.gz 116367503 BLAKE2B 0be22f2ec4b9aac6f5e976664cae01facf07929a32565cd57d7cc5b2d9888e9ae71ca301853752fe8f31d174d04c9974eb9ed2f3d452360a50ccf024f200726a SHA512 7990e0f9484038c3458c0bda2c863bf2b19e56edab81fc5938c6e0f08b17558287f853bb67350e8cca8f42bec0f1d4ba0e94e50a145db8da44bdd4bd703d91d0 +DIST pytorch-2.3.0.tar.gz 117029829 BLAKE2B 8f9c0d71ee0a9219b495eddccdcc65107f7ad537c43c68100b229f3d27b0e6c01ccb1659c7fffc356a48d80f2adc0a10361305dc8f1df20446de837d380f89f6 SHA512 67f7e9a096c3ffb952206ebf9105bedebb68c24ad82456083adf1d1d210437fcaa9dd52b68484cfc97d408c9eebc9541c76868c34a7c9982494dc3f424cfb07c diff --git a/sci-libs/pytorch/pytorch-2.3.0.ebuild b/sci-libs/pytorch/pytorch-2.3.0.ebuild new file mode 100644 index 000000000000..75fbde095842 --- /dev/null +++ b/sci-libs/pytorch/pytorch-2.3.0.ebuild @@ -0,0 +1,66 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{10..12} ) +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.2.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 +} |