Merge pull request #117450 from danieldk/rocm-4.1.0

rocm: 4.0.1 -> 4.1.0
This commit is contained in:
Daniël de Kok 2021-03-25 08:53:14 +01:00 committed by GitHub
commit 445ff0cd50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 51 additions and 27 deletions

View File

@ -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 {

View File

@ -18,6 +18,8 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" ];
cmakeFlags = [ "-DLLVM_MAIN_SRC_DIR=${llvm.src}" ];
postInstall = ''
moveToOutput include "$dev"
moveToOutput lib "$dev"

View File

@ -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 ];

View File

@ -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";

View File

@ -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 ];

View File

@ -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 ];

View File

@ -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";

View File

@ -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 = ''

View File

@ -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 ];

View File

@ -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" ];
};
}