From 0f2df2dad59e2f5e6da6144b009184a7f26e33b0 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 7 Nov 2025 17:41:39 +0100 Subject: [PATCH] gnu: Add gloo-for-r-torch. * gnu/packages/machine-learning.scm (gloo-for-r-torch): New variable. Change-Id: Ibaf55d20d42acf6379464f7f7484c9ce67197d40 --- gnu/packages/machine-learning.scm | 47 +++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 595204ea5e2c86c2f583185e6ef5884927a29ed1..68ff3c460a4fc35f36ce11e8df6da4bd107962e8 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -3697,6 +3697,53 @@ These include a barrier, broadcast, and allreduce.") (supported-systems %64bit-supported-systems) (license license:bsd-3)))) +(define-public gloo-for-r-torch + (let ((version "0.0.0") ; no proper version tag + (commit "81925d1c674c34f0dc34dd9a0f2151c1b6f701eb") + (revision "2")) + (package + (name "gloo") + (version (git-version version revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/facebookincubator/gloo") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "16zs8ndbiv9nppn8bv6lfanzyyssz7g5pawxiqcnafwq3nvxpj9m")))) + (build-system cmake-build-system) + (native-inputs + (list googletest)) + (inputs + (append (list openssl-1.1) + (if (supported-package? rdma-core) + (list rdma-core) + '()))) + (arguments + (list #:configure-flags #~'("-DBUILD_SHARED_LIBS=ON" + "-DBUILD_TEST=1" + "-DCMAKE_CXX_STANDARD=17" + #$@(if (this-package-input "rdma-core") + #~("-DUSE_IBVERBS=ON") + #~())) + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "make" "gloo_test"))))))) + (synopsis "Collective communications library") + (description + "Gloo is a collective communications library. It comes with a +number of collective algorithms useful for machine learning applications. +These include a barrier, broadcast, and allreduce.") + (home-page "https://github.com/facebookincubator/gloo") + (supported-systems %64bit-supported-systems) + (license license:bsd-3)))) + (define-public python-tensorly (package (name "python-tensorly")