diff --git a/pkgs/development/compilers/llvm/rocm/default.nix b/pkgs/development/compilers/llvm/rocm/default.nix index 5f9dba0fc3c..135fcd2d25a 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 2a05331f7a0..a6e993bb203 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" diff --git a/pkgs/development/libraries/rocclr/default.nix b/pkgs/development/libraries/rocclr/default.nix index 278fdecc1a6..c93ea5ba78b 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 ]; diff --git a/pkgs/development/libraries/rocm-comgr/default.nix b/pkgs/development/libraries/rocm-comgr/default.nix index 96f7108e3fe..b9a34b113eb 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"; diff --git a/pkgs/development/libraries/rocm-device-libs/default.nix b/pkgs/development/libraries/rocm-device-libs/default.nix index 965d92179b6..e62d6f0076f 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 ]; diff --git a/pkgs/development/libraries/rocm-opencl-runtime/default.nix b/pkgs/development/libraries/rocm-opencl-runtime/default.nix index ab0957474ad..d721cfece96 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 ]; diff --git a/pkgs/development/libraries/rocm-runtime/default.nix b/pkgs/development/libraries/rocm-runtime/default.nix index beb0c61e683..c63e8249cfc 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"; diff --git a/pkgs/development/libraries/rocm-thunk/default.nix b/pkgs/development/libraries/rocm-thunk/default.nix index 5863e1f0a57..1339e035ebf 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 = '' diff --git a/pkgs/development/tools/build-managers/rocm-cmake/default.nix b/pkgs/development/tools/build-managers/rocm-cmake/default.nix index 9ef0cfe10e7..16ea0dc2831 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 ]; diff --git a/pkgs/tools/system/rocm-smi/default.nix b/pkgs/tools/system/rocm-smi/default.nix index cd4eef89520..ac980e6c36c 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" ]; }; }