From 8be8a7eda6f971e7984ead25260342dcfb8d5217 Mon Sep 17 00:00:00 2001 From: David Elsing Date: Tue, 3 Feb 2026 21:33:21 +0100 Subject: [PATCH] gnu: Add rocm-smi. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adapted from the Guix-HPC channel (https://gitlab.inria.fr/guix-hpc/guix-hpc). * gnu/packages/rocm-tools.scm (rocm-smi): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/rocm-tools.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/rocm-tools.scm b/gnu/packages/rocm-tools.scm index 6ac4d5b851..f2331c1104 100644 --- a/gnu/packages/rocm-tools.scm +++ b/gnu/packages/rocm-tools.scm @@ -21,6 +21,7 @@ #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) + #:use-module (gnu packages base) #:use-module (gnu packages check) #:use-module (gnu packages elf) #:use-module (gnu packages instrumentation) @@ -29,10 +30,12 @@ #:use-module (gnu packages llvm) #:use-module (gnu packages pciutils) #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages python-science) #:use-module (gnu packages python-xyz) #:use-module (gnu packages rocm) + #:use-module (gnu packages xdisorg) #:use-module (gnu packages xml) #:use-module (gnu packages xorg)) @@ -167,3 +170,33 @@ translate CUDA source code into portable HIP C++.") (description "ROC profiler library. Profiling with perf-counters and derived metrics.") (license license:expat))) + +(define-public rocm-smi + (package + (name "rocm-smi") + (version %rocm-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url (string-append "https://github.com/ROCm/rocm_smi_lib")) + (commit (string-append "rocm-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "16i9ki4h6qp05g2n8pn8zakic8x581c1aavwnbyf17rrxvbnhyzz")))) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f ; requires GPU + #:build-type "Release")) + (native-inputs (list pkg-config)) + (inputs (list libdrm python)) + (propagated-inputs (list grep coreutils)) + (synopsis "The ROCm System Management Interface (ROCm SMI) Library") + (description "The ROCm System Management Interface Library, or +ROCm SMI library, is part of the Radeon Open Compute ROCm software +stack. It is a C library for Linux that provides a user space +interface for applications to monitor and control GPU applications.") + (home-page "https://github.com/ROCm/rocm_smi_lib") + (license license:ncsa)))