rocm-related: add update script

rocprim: add update script

hipcub: add update script

rocsparse: add update script

hipsparse: add update script

rccl: add update script

rocfft: add update script

tensile: add update script

rocblas: add update script

miopengemm: add update script

clang-ocl: add update script

rocthrust: add update script

rocmlir: add update script
This commit is contained in:
Madoura 2022-11-22 08:13:49 -06:00
parent 878cb61054
commit a80fa825e6
No known key found for this signature in database
GPG key ID: 3201136B3DB072F9
12 changed files with 141 additions and 9 deletions

View file

@ -1,6 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, writeScript
, cmake , cmake
, rocm-cmake , rocm-cmake
, rocm-device-libs , rocm-device-libs
@ -34,6 +35,13 @@ stdenv.mkDerivation rec {
"-DCMAKE_CXX_COMPILER=clang++" "-DCMAKE_CXX_COMPILER=clang++"
]; ];
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
rocmVersion="$(curl -sL "https://api.github.com/repos/RadeonOpenCompute/clang-ocl/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
update-source-version clang-ocl "$rocmVersion" --ignore-same-hash --version-key=rocmVersion
'';
meta = with lib; { meta = with lib; {
description = "OpenCL compilation with clang compiler"; description = "OpenCL compilation with clang compiler";
homepage = "https://github.com/RadeonOpenCompute/clang-ocl"; homepage = "https://github.com/RadeonOpenCompute/clang-ocl";

View file

@ -1,6 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, writeScript
, cmake , cmake
, rocm-cmake , rocm-cmake
, rocm-runtime , rocm-runtime
@ -20,8 +21,9 @@ assert buildBenchmarks -> gbenchmark != null;
# CUB can also be used as a backend instead of rocPRIM. # CUB can also be used as a backend instead of rocPRIM.
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "hipcub"; pname = "hipcub";
repoVersion = "2.12.0";
rocmVersion = "5.3.1"; rocmVersion = "5.3.1";
version = "2.12.0-${rocmVersion}"; version = "${repoVersion}-${rocmVersion}";
outputs = [ outputs = [
"out" "out"
@ -79,6 +81,16 @@ stdenv.mkDerivation rec {
rmdir $out/bin rmdir $out/bin
''; '';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
json="$(curl -sL "https://api.github.com/repos/ROCmSoftwarePlatform/hipCUB/releases?per_page=1")"
repoVersion="$(echo "$json" | jq '.[0].name | split(" ") | .[1]' --raw-output)"
rocmVersion="$(echo "$json" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
update-source-version hipcub "$repoVersion" --ignore-same-hash --version-key=repoVersion
update-source-version hipcub "$rocmVersion" --ignore-same-hash --version-key=rocmVersion
'';
meta = with lib; { meta = with lib; {
description = "Thin wrapper library on top of rocPRIM or CUB"; description = "Thin wrapper library on top of rocPRIM or CUB";
homepage = "https://github.com/ROCmSoftwarePlatform/hipCUB"; homepage = "https://github.com/ROCmSoftwarePlatform/hipCUB";

View file

@ -1,6 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, writeScript
, cmake , cmake
, rocm-cmake , rocm-cmake
, rocm-runtime , rocm-runtime
@ -27,8 +28,9 @@ let
}; };
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
pname = "hipsparse"; pname = "hipsparse";
repoVersion = "2.3.1";
rocmVersion = "5.3.1"; rocmVersion = "5.3.1";
version = "2.3.1-${rocmVersion}"; version = "${repoVersion}-${rocmVersion}";
outputs = [ outputs = [
"out" "out"
@ -122,6 +124,16 @@ in stdenv.mkDerivation rec {
rmdir $out/bin rmdir $out/bin
''; '';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
json="$(curl -sL "https://api.github.com/repos/ROCmSoftwarePlatform/hipSPARSE/releases?per_page=1")"
repoVersion="$(echo "$json" | jq '.[0].name | split(" ") | .[1]' --raw-output)"
rocmVersion="$(echo "$json" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
update-source-version hipsparse "$repoVersion" --ignore-same-hash --version-key=repoVersion
update-source-version hipsparse "$rocmVersion" --ignore-same-hash --version-key=rocmVersion
'';
meta = with lib; { meta = with lib; {
description = "ROCm SPARSE marshalling library"; description = "ROCm SPARSE marshalling library";
homepage = "https://github.com/ROCmSoftwarePlatform/hipSPARSE"; homepage = "https://github.com/ROCmSoftwarePlatform/hipSPARSE";

View file

@ -1,6 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, writeScript
, cmake , cmake
, rocm-cmake , rocm-cmake
, rocm-opencl-runtime , rocm-opencl-runtime
@ -119,6 +120,13 @@ in stdenv.mkDerivation rec {
mv ../doc/pdf/miopengemm.pdf $docs/share/doc/miopengemm mv ../doc/pdf/miopengemm.pdf $docs/share/doc/miopengemm
''; '';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
rocmVersion="$(curl -sL "https://api.github.com/repos/ROCmSoftwarePlatform/MIOpenGEMM/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
update-source-version miopengemm "$rocmVersion" --ignore-same-hash --version-key=rocmVersion
'';
meta = with lib; { meta = with lib; {
description = "OpenCL general matrix multiplication API for ROCm"; description = "OpenCL general matrix multiplication API for ROCm";
homepage = "https://github.com/ROCmSoftwarePlatform/MIOpenGEMM"; homepage = "https://github.com/ROCmSoftwarePlatform/MIOpenGEMM";

View file

@ -1,6 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, writeScript
, cmake , cmake
, rocm-cmake , rocm-cmake
, rocm-runtime , rocm-runtime
@ -17,8 +18,9 @@ assert buildTests -> chrpath != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "rccl"; pname = "rccl";
repoVersion = "2.12.10";
rocmVersion = "5.3.1"; rocmVersion = "5.3.1";
version = "2.12.10-${rocmVersion}"; version = "${repoVersion}-${rocmVersion}";
outputs = [ outputs = [
"out" "out"
@ -74,6 +76,16 @@ stdenv.mkDerivation rec {
rmdir $out/bin rmdir $out/bin
''; '';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
json="$(curl -sL "https://api.github.com/repos/ROCmSoftwarePlatform/rccl/releases?per_page=1")"
repoVersion="$(echo "$json" | jq '.[0].name | split(" ") | .[1]' --raw-output)"
rocmVersion="$(echo "$json" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
update-source-version rccl "$repoVersion" --ignore-same-hash --version-key=repoVersion
update-source-version rccl "$rocmVersion" --ignore-same-hash --version-key=rocmVersion
'';
meta = with lib; { meta = with lib; {
description = "ROCm communication collectives library"; description = "ROCm communication collectives library";
homepage = "https://github.com/ROCmSoftwarePlatform/rccl"; homepage = "https://github.com/ROCmSoftwarePlatform/rccl";

View file

@ -1,6 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, writeScript
, fetchpatch , fetchpatch
, cmake , cmake
, rocm-cmake , rocm-cmake
@ -42,8 +43,9 @@ assert buildBenchmarks == false;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "rocblas"; pname = "rocblas";
repoVersion = "2.45.0";
rocmVersion = "5.3.1"; rocmVersion = "5.3.1";
version = "2.45.0-${rocmVersion}"; version = "${repoVersion}-${rocmVersion}";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ROCmSoftwarePlatform"; owner = "ROCmSoftwarePlatform";
@ -126,6 +128,16 @@ stdenv.mkDerivation rec {
--replace "virtualenv_install(\''${Tensile_TEST_LOCAL_PATH})" "" --replace "virtualenv_install(\''${Tensile_TEST_LOCAL_PATH})" ""
''; '';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
json="$(curl -sL "https://api.github.com/repos/ROCmSoftwarePlatform/rocBLAS/releases?per_page=1")"
repoVersion="$(echo "$json" | jq '.[0].name | split(" ") | .[1]' --raw-output)"
rocmVersion="$(echo "$json" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
update-source-version rocblas "$repoVersion" --ignore-same-hash --version-key=repoVersion
update-source-version rocblas "$rocmVersion" --ignore-same-hash --version-key=rocmVersion
'';
meta = with lib; { meta = with lib; {
description = "BLAS implementation for ROCm platform"; description = "BLAS implementation for ROCm platform";
homepage = "https://github.com/ROCmSoftwarePlatform/rocBLAS"; homepage = "https://github.com/ROCmSoftwarePlatform/rocBLAS";

View file

@ -1,6 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, writeScript
, cmake , cmake
, rocm-cmake , rocm-cmake
, rocm-runtime , rocm-runtime
@ -26,8 +27,9 @@ assert (buildTests || buildBenchmarks) -> llvmPackages != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "rocfft"; pname = "rocfft";
repoVersion = "1.0.18";
rocmVersion = "5.3.1"; rocmVersion = "5.3.1";
version = "1.0.18-${rocmVersion}"; version = "${repoVersion}-${rocmVersion}";
outputs = [ outputs = [
"out" "out"
@ -104,6 +106,16 @@ stdenv.mkDerivation rec {
mv $out/rocfft_rtc_helper $out/bin mv $out/rocfft_rtc_helper $out/bin
''; '';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
json="$(curl -sL "https://api.github.com/repos/ROCmSoftwarePlatform/rocFFT/releases?per_page=1")"
repoVersion="$(echo "$json" | jq '.[0].name | split(" ") | .[1]' --raw-output)"
rocmVersion="$(echo "$json" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
update-source-version rocfft "$repoVersion" --ignore-same-hash --version-key=repoVersion
update-source-version rocfft "$rocmVersion" --ignore-same-hash --version-key=rocmVersion
'';
meta = with lib; { meta = with lib; {
description = "FFT implementation for ROCm "; description = "FFT implementation for ROCm ";
homepage = "https://github.com/ROCmSoftwarePlatform/rocFFT"; homepage = "https://github.com/ROCmSoftwarePlatform/rocFFT";

View file

@ -1,6 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, writeScript
, cmake , cmake
, hip , hip
, python3 , python3
@ -32,6 +33,13 @@ stdenv.mkDerivation rec {
"-DBUILD_FAT_LIBMLIRMIOPEN=ON" "-DBUILD_FAT_LIBMLIRMIOPEN=ON"
]; ];
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
rocmVersion="$(curl -sL "https://api.github.com/repos/ROCmSoftwarePlatform/rocMLIR/tags?per_page=2" | jq '.[1].name | split("-") | .[1]' --raw-output)"
update-source-version rocmlir "$rocmVersion" --ignore-same-hash --version-key=rocmVersion
'';
meta = with lib; { meta = with lib; {
description = "MLIR-based convolution and GEMM kernel generator"; description = "MLIR-based convolution and GEMM kernel generator";
homepage = "https://github.com/ROCmSoftwarePlatform/rocMLIR"; homepage = "https://github.com/ROCmSoftwarePlatform/rocMLIR";

View file

@ -1,6 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, writeScript
, cmake , cmake
, rocm-cmake , rocm-cmake
, rocm-runtime , rocm-runtime
@ -18,8 +19,9 @@ assert buildBenchmarks -> gbenchmark != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "rocprim"; pname = "rocprim";
repoVersion = "2.11.0";
rocmVersion = "5.3.1"; rocmVersion = "5.3.1";
version = "2.11.0-${rocmVersion}"; version = "${repoVersion}-${rocmVersion}";
outputs = [ outputs = [
"out" "out"
@ -75,6 +77,16 @@ stdenv.mkDerivation rec {
rmdir $out/bin rmdir $out/bin
''; '';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
json="$(curl -sL "https://api.github.com/repos/ROCmSoftwarePlatform/rocPRIM/releases?per_page=1")"
repoVersion="$(echo "$json" | jq '.[0].name | split(" ") | .[1]' --raw-output)"
rocmVersion="$(echo "$json" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
update-source-version rocprim "$repoVersion" --ignore-same-hash --version-key=repoVersion
update-source-version rocprim "$rocmVersion" --ignore-same-hash --version-key=rocmVersion
'';
meta = with lib; { meta = with lib; {
description = "ROCm parallel primitives"; description = "ROCm parallel primitives";
homepage = "https://github.com/ROCmSoftwarePlatform/rocPRIM"; homepage = "https://github.com/ROCmSoftwarePlatform/rocPRIM";

View file

@ -1,6 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, writeScript
, cmake , cmake
, rocm-cmake , rocm-cmake
, rocm-runtime , rocm-runtime
@ -31,8 +32,9 @@ let
}; };
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
pname = "rocsparse"; pname = "rocsparse";
repoVersion = "2.3.2";
rocmVersion = "5.3.1"; rocmVersion = "5.3.1";
version = "2.3.2-${rocmVersion}"; version = "${repoVersion}-${rocmVersion}";
outputs = [ outputs = [
"out" "out"
@ -138,6 +140,16 @@ in stdenv.mkDerivation rec {
rmdir $out/bin rmdir $out/bin
''; '';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
json="$(curl -sL "https://api.github.com/repos/ROCmSoftwarePlatform/rocSPARSE/releases?per_page=1")"
repoVersion="$(echo "$json" | jq '.[0].name | split(" ") | .[1]' --raw-output)"
rocmVersion="$(echo "$json" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
update-source-version rocsparse "$repoVersion" --ignore-same-hash --version-key=repoVersion
update-source-version rocsparse "$rocmVersion" --ignore-same-hash --version-key=rocmVersion
'';
meta = with lib; { meta = with lib; {
description = "ROCm SPARSE implementation"; description = "ROCm SPARSE implementation";
homepage = "https://github.com/ROCmSoftwarePlatform/rocSPARSE"; homepage = "https://github.com/ROCmSoftwarePlatform/rocSPARSE";

View file

@ -1,6 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, writeScript
, cmake , cmake
, rocm-cmake , rocm-cmake
, rocm-runtime , rocm-runtime
@ -22,8 +23,9 @@ assert buildBenchmarks == false;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "rocthrust"; pname = "rocthrust";
repoVersion = "2.16.0";
rocmVersion = "5.3.1"; rocmVersion = "5.3.1";
version = "2.16.0-${rocmVersion}"; version = "${repoVersion}-${rocmVersion}";
# Comment out these outputs until tests/benchmarks are fixed (upstream?) # Comment out these outputs until tests/benchmarks are fixed (upstream?)
# outputs = [ # outputs = [
@ -81,6 +83,16 @@ stdenv.mkDerivation rec {
# rmdir $out/bin # rmdir $out/bin
# ''; # '';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
json="$(curl -sL "https://api.github.com/repos/ROCmSoftwarePlatform/rocThrust/releases?per_page=1")"
repoVersion="$(echo "$json" | jq '.[0].name | split(" ") | .[1]' --raw-output)"
rocmVersion="$(echo "$json" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
update-source-version rocthrust "$repoVersion" --ignore-same-hash --version-key=repoVersion
update-source-version rocthrust "$rocmVersion" --ignore-same-hash --version-key=rocmVersion
'';
meta = with lib; { meta = with lib; {
description = "ROCm parallel algorithm library"; description = "ROCm parallel algorithm library";
homepage = "https://github.com/ROCmSoftwarePlatform/rocThrust"; homepage = "https://github.com/ROCmSoftwarePlatform/rocThrust";

View file

@ -1,6 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, writeScript
, buildPythonPackage , buildPythonPackage
, pyyaml , pyyaml
, msgpack , msgpack
@ -9,8 +10,9 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "tensile"; pname = "tensile";
repoVersion = "4.34.0";
rocmVersion = "5.3.1"; rocmVersion = "5.3.1";
version = "4.34.0-${rocmVersion}"; version = "${repoVersion}-${rocmVersion}";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ROCmSoftwarePlatform"; owner = "ROCmSoftwarePlatform";
@ -25,6 +27,16 @@ buildPythonPackage rec {
pandas pandas
]; ];
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
json="$(curl -sL "https://api.github.com/repos/ROCmSoftwarePlatform/Tensile/releases?per_page=1")"
repoVersion="$(echo "$json" | jq '.[0].name | split(" ") | .[1]' --raw-output)"
rocmVersion="$(echo "$json" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
update-source-version tensile "$repoVersion" --ignore-same-hash --version-key=repoVersion
update-source-version tensile "$rocmVersion" --ignore-same-hash --version-key=rocmVersion
'';
meta = with lib; { meta = with lib; {
description = "GEMMs and tensor contractions"; description = "GEMMs and tensor contractions";
homepage = "https://github.com/ROCmSoftwarePlatform/Tensile"; homepage = "https://github.com/ROCmSoftwarePlatform/Tensile";