From 84023d85cb12c214d309bc939cde206b2ffabcb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Wed, 24 Mar 2021 08:43:58 +0100 Subject: [PATCH 1/9] llvmPackages_rocm: 4.0.1 -> 4.1.0 --- pkgs/development/compilers/llvm/rocm/default.nix | 4 ++-- pkgs/development/compilers/llvm/rocm/lld.nix | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/llvm/rocm/default.nix b/pkgs/development/compilers/llvm/rocm/default.nix index 5f9dba0fc3cc..135fcd2d25ae 100644 --- a/pkgs/development/compilers/llvm/rocm/default.nix +++ b/pkgs/development/compilers/llvm/rocm/default.nix @@ -1,12 +1,12 @@ { lib, fetchFromGitHub, callPackage, wrapCCWith }: let - version = "4.0.1"; + version = "4.1.0"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; repo = "llvm-project"; rev = "rocm-${version}"; - hash = "sha256-5mQ8tN7A045JCF7tHKgAZAbyVmXOd6Wf0CVUiPA80YM="; + hash = "sha256-DlId/dF5r0ULl2omYPCyu1Ic3XKlLL7ndiCA0RaF264="; }; in rec { clang = wrapCCWith rec { diff --git a/pkgs/development/compilers/llvm/rocm/lld.nix b/pkgs/development/compilers/llvm/rocm/lld.nix index 2a05331f7a0f..a6e993bb203f 100644 --- a/pkgs/development/compilers/llvm/rocm/lld.nix +++ b/pkgs/development/compilers/llvm/rocm/lld.nix @@ -18,6 +18,8 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; + cmakeFlags = [ "-DLLVM_MAIN_SRC_DIR=${llvm.src}" ]; + postInstall = '' moveToOutput include "$dev" moveToOutput lib "$dev" From 66a017cc5642e3c0ea85f318fa28b2e20d7fc7af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Wed, 24 Mar 2021 08:53:00 +0100 Subject: [PATCH 2/9] rocm-device-libs: 4.0.0 -> 4.1.0 --- pkgs/development/libraries/rocm-device-libs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/rocm-device-libs/default.nix b/pkgs/development/libraries/rocm-device-libs/default.nix index 965d92179b67..e62d6f0076fc 100644 --- a/pkgs/development/libraries/rocm-device-libs/default.nix +++ b/pkgs/development/libraries/rocm-device-libs/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { pname = "rocm-device-libs"; - version = "4.0.0"; + version = "4.1.0"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; repo = "ROCm-Device-Libs"; rev = "rocm-${version}"; - hash = "sha256-IAE8T/gmotXO/ADH3bxTjrpxWd2lRoj3o/rrSaEFNNo="; + hash = "sha256-9p6PIXdHFIgHgNWZzqVz5O9i2Np0z/iyxodG2cLrpGs="; }; nativeBuildInputs = [ cmake ]; From b28f05f1ef2f06ffdcef310687ee54b74aaf0037 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Wed, 24 Mar 2021 08:53:56 +0100 Subject: [PATCH 3/9] rocm-thunk: 4.0.0 -> 4.1.0 --- pkgs/development/libraries/rocm-thunk/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/rocm-thunk/default.nix b/pkgs/development/libraries/rocm-thunk/default.nix index 5863e1f0a57c..1339e035ebfd 100644 --- a/pkgs/development/libraries/rocm-thunk/default.nix +++ b/pkgs/development/libraries/rocm-thunk/default.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation rec { pname = "rocm-thunk"; - version = "4.0.0"; + version = "4.1.0"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; repo = "ROCT-Thunk-Interface"; rev = "rocm-${version}"; - hash = "sha256-2kLSlGwX3pD8I5pXwV5L0k9l8OzJRkUvnAqv5E+gcd4="; + hash = "sha256-gdto7BbrSRa3UiRNvTW1KLkHyjrcxdah4+L+1Gdm0wA="; }; preConfigure = '' From ecaced15e4e169e689698d33dde4a701bce4ddc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Wed, 24 Mar 2021 08:54:44 +0100 Subject: [PATCH 4/9] rocm-runtime: 4.0.0 -> 4.1.0 --- pkgs/development/libraries/rocm-runtime/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/rocm-runtime/default.nix b/pkgs/development/libraries/rocm-runtime/default.nix index beb0c61e683c..c63e8249cfc0 100644 --- a/pkgs/development/libraries/rocm-runtime/default.nix +++ b/pkgs/development/libraries/rocm-runtime/default.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { pname = "rocm-runtime"; - version = "4.0.0"; + version = "4.1.0"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; repo = "ROCR-Runtime"; rev = "rocm-${version}"; - hash = "sha256-8hNb0Yo9ApedOG7xrUr5rwiA/YsqDTcyr6dBRg8lXro="; + hash = "sha256-Jxg3n203tV0L+UrmeQEuzX0TKpFu5An2cnuEA/F/SNY="; }; sourceRoot = "source/src"; From 74ce68be64eea9bde1bda72b164d7e79085e29c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Wed, 24 Mar 2021 08:55:39 +0100 Subject: [PATCH 5/9] rocm-comgr: 4.0.0 -> 4.1.0 --- pkgs/development/libraries/rocm-comgr/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/rocm-comgr/default.nix b/pkgs/development/libraries/rocm-comgr/default.nix index 96f7108e3fe0..b9a34b113ebd 100644 --- a/pkgs/development/libraries/rocm-comgr/default.nix +++ b/pkgs/development/libraries/rocm-comgr/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "rocm-comgr"; - version = "4.0.0"; + version = "4.1.0"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; repo = "ROCm-CompilerSupport"; rev = "rocm-${version}"; - hash = "sha256-JMzXg1Hw0iWcTnKu/NgW7rD8iagp724F01GaJbrJj9M="; + hash = "sha256-LbQqyJxRqb6vpXiYSkRlF1FeqXJJXktPafGmYDDK02U="; }; sourceRoot = "source/lib/comgr"; From ec21ab9e0c4baa88c6d427fd746ef3399b7dba8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Wed, 24 Mar 2021 08:56:37 +0100 Subject: [PATCH 6/9] rocm-cmake: 4.0.0 -> 4.1.0 --- pkgs/development/tools/build-managers/rocm-cmake/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/rocm-cmake/default.nix b/pkgs/development/tools/build-managers/rocm-cmake/default.nix index 9ef0cfe10e7a..16ea0dc28318 100644 --- a/pkgs/development/tools/build-managers/rocm-cmake/default.nix +++ b/pkgs/development/tools/build-managers/rocm-cmake/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "rocm-cmake"; - version = "4.0.0"; + version = "4.1.0"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; repo = "rocm-cmake"; rev = "rocm-${version}"; - hash = "sha256-1T0S2GWA/ojRZMRyWgtFQ2rzmIqvMvaa19jI4Fl9R44="; + hash = "sha256-uK060F7d7/pTCNbGqdKCzxgPrPPbGjNwuUOt176z7EM="; }; nativeBuildInputs = [ cmake ]; From a517ae90cf680bd2bf15d4f4b53aa9580cc8078f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Wed, 24 Mar 2021 08:57:27 +0100 Subject: [PATCH 7/9] rocclr: 4.0.0 -> 4.1.0 --- pkgs/development/libraries/rocclr/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/rocclr/default.nix b/pkgs/development/libraries/rocclr/default.nix index 278fdecc1a67..c93ea5ba78ba 100644 --- a/pkgs/development/libraries/rocclr/default.nix +++ b/pkgs/development/libraries/rocclr/default.nix @@ -15,13 +15,13 @@ stdenv.mkDerivation rec { pname = "rocclr"; - version = "4.0.0"; + version = "4.1.0"; src = fetchFromGitHub { owner = "ROCm-Developer-Tools"; repo = "ROCclr"; rev = "rocm-${version}"; - hash = "sha256-B27ff1b9JRhxFUsBt7CGuYaR87hvKbVSCERWD45d8tM="; + hash = "sha256-2DI/PL29aiZcxOrGZBzXwAnNgZQpSDjyyGKgl+vDErk="; }; nativeBuildInputs = [ cmake rocm-cmake ]; From ed7d75b3a4a1b72e971859ab2598e1ac6d6d1ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Wed, 24 Mar 2021 08:58:42 +0100 Subject: [PATCH 8/9] rocm-opencl-runtime: 4.0.0 -> 4.1.0 --- pkgs/development/libraries/rocm-opencl-runtime/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/rocm-opencl-runtime/default.nix b/pkgs/development/libraries/rocm-opencl-runtime/default.nix index ab0957474adc..d721cfece96a 100644 --- a/pkgs/development/libraries/rocm-opencl-runtime/default.nix +++ b/pkgs/development/libraries/rocm-opencl-runtime/default.nix @@ -21,13 +21,13 @@ stdenv.mkDerivation rec { pname = "rocm-opencl-runtime"; - version = "4.0.0"; + version = "4.1.0"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; repo = "ROCm-OpenCL-Runtime"; rev = "rocm-${version}"; - hash = "sha256-kW5jTDlQtXQ0i4ADJEnmESxjcLCt4QZCYJ1ouIsk4YE="; + hash = "sha256-+6h1E5uWNKjjaeO5ZIi854CWYi0QGQ5mVUHdi9+4vX4="; }; nativeBuildInputs = [ cmake rocm-cmake ]; From 84fcca07aa4f8a9072b717cbacde3dc02dfd7a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Wed, 24 Mar 2021 10:04:45 +0100 Subject: [PATCH 9/9] rocm-smi: 4.0.0 -> 4.1.0 This also migrates this derivation from the old deprecated ROC-smi repository to rocm_smi_lib. --- pkgs/tools/system/rocm-smi/default.nix | 44 +++++++++++++++++++------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/pkgs/tools/system/rocm-smi/default.nix b/pkgs/tools/system/rocm-smi/default.nix index cd4eef89520b..ac980e6c36cd 100644 --- a/pkgs/tools/system/rocm-smi/default.nix +++ b/pkgs/tools/system/rocm-smi/default.nix @@ -1,23 +1,45 @@ -{ lib, buildPythonApplication, fetchFromGitHub }: +{ lib, stdenv, fetchFromGitHub, cmake, python3 }: -buildPythonApplication rec { +stdenv.mkDerivation rec { pname = "rocm-smi"; - version = "4.0.0"; + version = "4.1.0"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; - repo = "ROC-smi"; + repo = "rocm_smi_lib"; rev = "rocm-${version}"; - hash = "sha256-0QqaBMkqRVEl89x3hvWQGAgt7LbtMZPhuf7KenQYHaQ="; + hash = "sha256-LEaC1XhmyoVWrpL05MhgN02LVT2rLKdnw9g2QdfM/uE="; }; - format = "other"; + nativeBuildInputs = [ cmake python3.pkgs.wrapPython ]; - dontConfigure = true; - dontBuild = true; + postPatch = '' + # Upstream ROCm is installed in an /opt directory. For this reason, + # it does not completely follow FHS layout, creating top-level + # rocm_smi, oam, and bindings top-level directories. Since rocm-smi + # is a package that is typically installed, we change the paths to + # follow FHS more closely. - installPhase = '' - install -Dm0755 rocm_smi.py $out/bin/rocm-smi + # rocm_smi libraries and headers go into lib and include. Bindings + # go into lib/rocm_smi/bindings. + substituteInPlace rocm_smi/CMakeLists.txt \ + --replace "DESTINATION rocm_smi/" "DESTINATION " \ + --replace "DESTINATION bindings" "DESTINATION lib/rocm_smi/bindings" \ + --replace "../rocm_smi/bindings/rsmiBindings.py" "../lib/rocm_smi/bindings/rsmiBindings.py" \ + --replace 'DESTINATION ''${ROCM_SMI}/' "DESTINATION " + + # oam libraries and headers go into lib and include. + substituteInPlace oam/CMakeLists.txt \ + --replace "DESTINATION oam/" "DESTINATION " \ + --replace 'DESTINATION ''${OAM_NAME}/' "DESTINATION " + + # Update relative path to librocm_smi64 in the Python binding. + substituteInPlace python_smi_tools/rsmiBindings.py \ + --replace "/../lib/librocm_smi64.so" "/../../librocm_smi64.so" + ''; + + postInstall = '' + wrapPythonProgramsIn $out/bin ''; meta = with lib; { @@ -25,6 +47,6 @@ buildPythonApplication rec { homepage = "https://github.com/RadeonOpenCompute/ROC-smi"; license = with licenses; [ mit ]; maintainers = with maintainers; [ danieldk ]; - platforms = platforms.linux; + platforms = [ "x86_64-linux" ]; }; }