commit: 42e97047743f969dd9a85dedbc2718c0e8a92f9a
Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 26 22:14:24 2025 +0000
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Fri Dec 26 22:14:55 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42e97047
sci-ml/gloo: add 2025.12.02
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
sci-ml/gloo/Manifest | 1 +
sci-ml/gloo/gloo-2025.12.02.ebuild | 95 ++++++++++++++++++++++++++++++++++++++
2 files changed, 96 insertions(+)
diff --git a/sci-ml/gloo/Manifest b/sci-ml/gloo/Manifest
index 1993d7768c61..547ddd50e9aa 100644
--- a/sci-ml/gloo/Manifest
+++ b/sci-ml/gloo/Manifest
@@ -1,3 +1,4 @@
DIST gloo-2023.12.03.tar.gz 259857 BLAKE2B
b56cbbb0986b70ed327a8d019f140099c5d1d725576120089cd5e640dc42daa6c6bb67de877d540fd2160f5b8d89cf54af7c11a1b81039e62e4de97daa4f63d6
SHA512
597679dd96394e7d0009be34ef9bd6f8446d22e2faa006c0853e055caf0d6d821c7532ff867b4d924197e92ab53c4c7ee9b74f897d6c5a469ee797c11ce0d28d
DIST gloo-2025.06.04.tar.gz 272417 BLAKE2B
f3cf3326276bb839166f3094d49fcd537e5a446bda65fb34adad5540df4c505bf7f7f56071d78d14cbc49db6d02f190198e45dd25ae307cfbc5d27db4c2c3703
SHA512
87264b940f2a9f50f3054d3853ad3c0aff33c29253e27c4d0e5fc18a674ebb362719a811b01847daaadf0b9a151a51eabd9dae694ac7d1ad300e24842bea1241
+DIST gloo-2025.12.02.tar.gz 275121 BLAKE2B
3d554fe2e84e06c7d18aa10950e3d6fc5168f3cc98129da8526a209c53facec4a26254108148d8891fb3431c0272fce32edb102cf8cb7c05b4dcd5a4048481f6
SHA512
32a45ed9fe1f28cce3ca95640bd87b638c122c1a33cbb29f6761feb6ae0bd10db53de6f4abe79991e08797551b783b7244446f11a094c1707cc54ce4ecb29ad6
DIST pytorch-2.9.0.tar.gz 55750268 BLAKE2B
943459ec60a4e1f5e36766defc7018fbf9722fb1564b723c2a7ebcb2a5d8b1735f0b1542dc67a77f788af3e2454ea6261dbdee5beb2bcfa4af2e58ca566edc93
SHA512
2ecdc0eac39ecee68b0f4c98e498424cde00c45bbeeff576c8778046f97119cd02885498b072352dd3cdd9aecd02baf61cdc5554bce8d757b30c673053a0cc80
diff --git a/sci-ml/gloo/gloo-2025.12.02.ebuild
b/sci-ml/gloo/gloo-2025.12.02.ebuild
new file mode 100644
index 000000000000..2c8f9940a611
--- /dev/null
+++ b/sci-ml/gloo/gloo-2025.12.02.ebuild
@@ -0,0 +1,95 @@
+# Copyright 2022-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+ROCM_VERSION=6.3
+inherit cmake cuda flag-o-matic rocm
+
+CommitId=3135b0b41b67dde590eef0938a0bf3d6238df5f7
+
+# Need half/bf16 headers from any pytorch
+PYTORCH_PV=2.9.0
+PYTORCH_P=pytorch-${PYTORCH_PV}
+
+DESCRIPTION="library of floating-point neural network inference operators"
+HOMEPAGE="https://github.com/facebookincubator/gloo/"
+SRC_URI="
+ https://github.com/facebookincubator/${PN}/archive/${CommitId}.tar.gz
-> ${P}.tar.gz
+
+ cuda? (
https://github.com/pytorch/pytorch/archive/refs/tags/v${PYTORCH_PV}.tar.gz ->
${PYTORCH_P}.tar.gz )
+ rocm? (
https://github.com/pytorch/pytorch/archive/refs/tags/v${PYTORCH_PV}.tar.gz ->
${PYTORCH_P}.tar.gz )
+"
+
+S="${WORKDIR}"/${PN}-${CommitId}
+PYTORCH_S="${WORKDIR}"/${PYTORCH_P}
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="cuda libuv mpi redis rocm ssl test"
+
+RDEPEND="
+ cuda? ( dev-util/nvidia-cuda-toolkit:= )
+ libuv? ( dev-libs/libuv )
+ mpi? ( virtual/mpi )
+ redis? (
+ dev-db/redis
+ dev-libs/hiredis
+ )
+ rocm? ( dev-util/hip:= )
+ ssl? ( dev-libs/openssl:= )
+"
+DEPEND="${RDEPEND}
+ cuda? ( sci-ml/caffe2[cuda] )
+"
+
+BDEPEND="test? ( dev-cpp/gtest )"
+RESTRICT="test" # For some test the network is needed
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2025.06.04-gentoo.patch
+ "${FILESDIR}"/${PN}-2025.06.04-ssl3.patch
+ "${FILESDIR}"/${PN}-2023.12.03-gcc15.patch
+)
+
+src_prepare() {
+ if use cuda || use rocm; then
+ touch "${PYTORCH_S}"/torch/headeronly/macros/cmake_macros.h ||
die
+ fi
+ cmake_src_prepare
+ use cuda && cuda_add_sandbox
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_TEST=$(usex test ON OFF)
+ -DGLOO_USE_CUDA_TOOLKIT=$(usex cuda ON OFF)
+ -DUSE_LIBUV=$(usex libuv ON OFF)
+ -DUSE_MPI=$(usex mpi ON OFF)
+ -DUSE_REDIS=$(usex redis ON OFF)
+ -DUSE_TCP_OPENSSL_LINK=$(usex ssl ON OFF)
+ )
+ if use cuda; then
+ addpredict "/proc/self/task"
+
+ mycmakeargs+=(
+ -DCMAKE_CUDA_FLAGS="$(cuda_gccdir -f | tr -d \")"
+ -DGLOO_TORCH_DIR="${PYTORCH_S}"
+ -DGLOO_USE_TORCH_DTYPES=ON
+ -DUSE_CUDA=ON
+ )
+ fi
+ if use rocm; then
+ export ROCM_PATH="${EPREFIX}/usr"
+ export GLOO_ROCM_ARCH="$(get_amdgpu_flags)"
+ mycmakeargs+=(
+ -DCMAKE_HIP_ARCHITECTURES="${GLOO_ROCM_ARCH}"
+ -DCMAKE_REQUIRE_FIND_PACKAGE_HIP=$(usex rocm ON OFF)
+ -DGLOO_TORCH_DIR="${PYTORCH_S}"
+ -DHIP_CXX_FLAGS="$(test-flags-HIPCXX ${CXXFLAGS})"
+ -DGLOO_USE_TORCH_DTYPES=ON
+ -DUSE_ROCM=ON
+ )
+ fi
+ cmake_src_configure
+}