guix_mirror_bot pushed a commit to branch hpc-team
in repository guix.

commit d3676939f578c117cfeb9dc50bb517a44fd99169
Author: Romain GARBAGE <[email protected]>
AuthorDate: Thu Feb 5 11:24:21 2026 +0100

    gnu: hwloc-2: Enable ROCm support.
    
    * gnu/packages/mpi.scm (hwloc-2): Enable ROCm support.
    
    Merges guix/guix!6032
    
    Change-Id: I68d57c377bf461dd32a2c7b7793ed85158683199
    Signed-off-by: Cayetano Santos <[email protected]>
    Modified-by: Cayetano Santos <[email protected]>
---
 gnu/packages/mpi.scm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index 4aaf2d5ed7..7ad64281d5 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -67,9 +67,11 @@
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages rocm-tools)
   #:use-module (gnu packages ssh)
   #:use-module (gnu packages valgrind)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages xdisorg)
   #:use-module (srfi srfi-1)
   #:use-module (ice-9 match))
 
@@ -184,14 +186,22 @@ bind processes, and much more.")
                      (append bash)))              ;for completion tests
     (inputs (modify-inputs (package-inputs hwloc-1)
               (append level-zero)
+              ;; XXX: rocm-smi requires libdrm/drm.h but doesn't propagate a
+              ;; package providing these. For now, libdrm is used to provide
+              ;; this header.
+              (append libdrm)
               (append libxml2)
               (append opencl-icd-loader)
+              (append rocm-smi-lib)
               (delete "numactl")))               ;libnuma is no longer needed.
     (arguments
      (substitute-keyword-arguments (package-arguments hwloc-1)
        ((#:configure-flags flags '())
         #~(cons* (string-append "--with-opencl="
                                 #$(this-package-input "opencl-icd-loader"))
+                 "--enable-rsmi"
+                 (string-append "--with-rocm="
+                                #$(this-package-input "rocm-smi-lib"))
                  #$flags))
        ((#:phases phases)
         #~(modify-phases #$phases

Reply via email to