From a6d8e68610f56a433ba34fb9c61d1d63da472660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Fri, 17 Jul 2020 08:07:09 +0200 Subject: [PATCH] rocm-smi: init at 3.5.0 This utility reports information about AMD GPUs that are supported by the ROCm stack. It also exposes functionality for clock and temperature management. --- pkgs/tools/system/rocm-smi/default.nix | 30 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 3 +++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/tools/system/rocm-smi/default.nix diff --git a/pkgs/tools/system/rocm-smi/default.nix b/pkgs/tools/system/rocm-smi/default.nix new file mode 100644 index 000000000000..159b41fd1ce5 --- /dev/null +++ b/pkgs/tools/system/rocm-smi/default.nix @@ -0,0 +1,30 @@ +{ lib, buildPythonApplication, fetchFromGitHub }: + +buildPythonApplication rec { + pname = "rocm-smi"; + version = "3.5.0"; + + src = fetchFromGitHub { + owner = "RadeonOpenCompute"; + repo = "ROC-smi"; + rev = "rocm-${version}"; + sha256 = "189mpvmcv46nfwshyc1wla6k71kbraldik5an20g4v9s13ycrpx9"; + }; + + format = "other"; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + install -Dm0755 rocm_smi.py $out/bin/rocm-smi + ''; + + meta = with lib; { + description = "System management interface for AMD GPUs supported by ROCm"; + homepage = "https://github.com/RadeonOpenCompute/ROC-smi"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ danieldk ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8442a1720ab2..ddbbcf4ad499 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9286,6 +9286,9 @@ in rocm-runtime-ext = callPackage ../development/libraries/rocm-runtime-ext { }; + # Python >= 3.8 still gives a bunch of warnings. + rocm-smi = python37.pkgs.callPackage ../tools/system/rocm-smi { }; + rocm-thunk = callPackage ../development/libraries/rocm-thunk { }; rtags = callPackage ../development/tools/rtags {