summaryrefslogtreecommitdiff
path: root/sci-libs/pytorch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-02-13 08:16:09 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-02-13 08:16:09 +0000
commit4a74938e510c0dad732ae4c48f815dd0f0cabb46 (patch)
treee8c52cd3619bba6cf0a5c367f6c9d2cff0ac9d80 /sci-libs/pytorch
parentebc282ef4dfa408accac685565b8ee5f6faec119 (diff)
gentoo auto-resync : 13:02:2023 - 08:16:09
Diffstat (limited to 'sci-libs/pytorch')
-rw-r--r--sci-libs/pytorch/Manifest2
-rw-r--r--sci-libs/pytorch/pytorch-1.12.1.ebuild62
2 files changed, 64 insertions, 0 deletions
diff --git a/sci-libs/pytorch/Manifest b/sci-libs/pytorch/Manifest
index 7fcd5378b4bc..6a1f93daf492 100644
--- a/sci-libs/pytorch/Manifest
+++ b/sci-libs/pytorch/Manifest
@@ -4,5 +4,7 @@ AUX pytorch-1.6.0-global-dlopen.patch 592 BLAKE2B a5e3742fcb0cf2286a9406e11bade1
AUX pytorch-1.7.1-torch_shm_manager.patch 441 BLAKE2B 28b87353a0afa0ef25c8ab00e204998b4fb3472fbbb5bb2b300a3fb22d864846d51ccef652ce331484c7a522f7d74e6674c1ceaf26d0a4956d1c8b57b29a7428 SHA512 08f2e5f35768e70713a1432797d9fbe0b133a80ae7dff2898e4b9b51ab398f88bce90a0698b3c9f77bf8a4c5c054911c22931d0684276a0b6d4f2afb69633088
AUX pytorch-1.9.0-Change-library-directory-according-to-CMake-build.patch 1063 BLAKE2B c93cb4c1ff40ef332cd518474a397e9b61d310f4cbdb8701c18749f103533a69e4a3e892f1e3613113cc97ae320951dacb956025ba6be694c5275448d2af3a78 SHA512 7931a220068a36b15ee0f282161f23422acdbef32990bd1eafeab55e06131748f5b4ad93e6a0dc7a4f92e7ebd0595a97835c768b46dd7139f626df666642ce18
DIST pytorch-1.12.0.tar.gz 106286765 BLAKE2B ff9bafedb35f859f7dccb9b606299cf9c345bdaa0deb87ecfe0c0c30c3c828414d989e1d9a243d9b7cd3f376d56a2f81c241ca2e3c9a8a2b30cddcdeddd3a5c7 SHA512 c9c748a2e0047daaaf199a1ba3198d2d1aee47f664170a9b34ccacd3deeb95f2070e4035eeb900012ef48dc62cf6fb6806f1a1dfe22de8c94892963076e593b7
+DIST pytorch-1.12.1.tar.gz 106311625 BLAKE2B e8ca19d0e1987449c33ad4c36722a3a467f7f8a9f90be2a7f2de643cbd665038f6802b5ff1f1d3da09b6253d8f29e11549a24295de013d97f73affe538c84c99 SHA512 afeb551904ebd9b5901ae623a98eadbb3045115247cedf8006a940742cfad04e5ce24cfaf363336a9ed88d7ce6a4ac53dbb6a5c690aef6efdf20477c3a22c7ca
EBUILD pytorch-1.12.0-r2.ebuild 1490 BLAKE2B 4453c84ab9d97b5cc1155e7593adb23787736866b08ec369958c4ba6830a6bdf3545dca8e47fde12838417487eccbdb67786c320465a1ed87a3a2efd3f97f7d8 SHA512 fa3df152625bc1ae314079f91f54c40fbbd635841c52c1cb495e2558f20d5c4873f215de0d6c37bce4d83b6051b59d1647294c60b817aae8831a5540c16483db
+EBUILD pytorch-1.12.1.ebuild 1490 BLAKE2B 4453c84ab9d97b5cc1155e7593adb23787736866b08ec369958c4ba6830a6bdf3545dca8e47fde12838417487eccbdb67786c320465a1ed87a3a2efd3f97f7d8 SHA512 fa3df152625bc1ae314079f91f54c40fbbd635841c52c1cb495e2558f20d5c4873f215de0d6c37bce4d83b6051b59d1647294c60b817aae8831a5540c16483db
MISC metadata.xml 328 BLAKE2B f49c6d62ac88dfffe497ed05b1f727941a94acb87a809611dda8aedbd87508fdfdf94ec0e025cac2a649b0881b600236289943b4be0f6ca44fc105b6d8fbe97c SHA512 16c29d2c1177a89026235191ea3e33870c2e6b63f029b7febd4dbd2e99f598fab4b4fd2fa7a801ffd88393663a00752300e6e2cc847a83690b715bcc481d9dc2
diff --git a/sci-libs/pytorch/pytorch-1.12.1.ebuild b/sci-libs/pytorch/pytorch-1.12.1.ebuild
new file mode 100644
index 000000000000..0948de848ca1
--- /dev/null
+++ b/sci-libs/pytorch/pytorch-1.12.1.ebuild
@@ -0,0 +1,62 @@
+# 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,10} )
+DISTUTILS_SINGLE_IMPL=1
+inherit distutils-r1
+
+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}]
+ ')
+"
+DEPEND="${RDEPEND}
+ $(python_gen_cond_dep '
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ ')
+"
+
+src_prepare() {
+ eapply \
+ "${FILESDIR}"/0002-Don-t-build-libtorch-again-for-PyTorch-1.7.1.patch \
+ "${FILESDIR}"/pytorch-1.9.0-Change-library-directory-according-to-CMake-build.patch \
+ "${FILESDIR}"/${PN}-1.6.0-global-dlopen.patch \
+ "${FILESDIR}"/pytorch-1.7.1-torch_shm_manager.patch \
+ "${FILESDIR}"/pytorch-1.12.0-CVE-2022-45907.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
+}
+
+src_compile() {
+ PYTORCH_BUILD_VERSION=${PV} \
+ PYTORCH_BUILD_NUMBER=0 \
+ USE_SYSTEM_LIBS=ON \
+ CMAKE_BUILD_DIR="${BUILD_DIR}" \
+ BUILD_DIR= \
+ distutils-r1_src_compile
+}
+
+src_install() {
+ USE_SYSTEM_LIBS=ON distutils-r1_src_install
+}