Merge pull request #203412 from Madouura/pr/rocm-misc
This commit is contained in:
commit
d9a5323ea7
27 changed files with 187 additions and 311 deletions
|
@ -171,7 +171,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
passthru.updateScript = writeScript "update.sh" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts nix-prefetch-github
|
||||
version="$(curl -sL "https://api.github.com/repos/ROCm-Developer-Tools/HIP/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} -sL "https://api.github.com/repos/ROCm-Developer-Tools/HIP/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
||||
current_version="$(grep "version =" pkgs/development/compilers/hip/default.nix | head -n1 | cut -d'"' -f2)"
|
||||
if [[ "$version" != "$current_version" ]]; then
|
||||
tarball_meta="$(nix-prefetch-github ROCm-Developer-Tools HIP --rev "rocm-$version")"
|
||||
|
@ -183,7 +183,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
echo hip already up-to-date
|
||||
fi
|
||||
|
||||
version="$(curl -sL "https://api.github.com/repos/ROCm-Developer-Tools/hipamd/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} -sL "https://api.github.com/repos/ROCm-Developer-Tools/hipamd/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
||||
current_version="$(grep "version =" pkgs/development/compilers/hip/default.nix | tail -n1 | cut -d'"' -f2)"
|
||||
if [[ "$version" != "$current_version" ]]; then
|
||||
tarball_meta="$(nix-prefetch-github ROCm-Developer-Tools hipamd --rev "rocm-$version")"
|
||||
|
|
|
@ -66,7 +66,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts nix-prefetch-github
|
||||
|
||||
version="$(curl -sL "https://api.github.com/repos/RadeonOpenCompute/llvm-project/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} -sL "https://api.github.com/repos/RadeonOpenCompute/llvm-project/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
current_version="$(grep "version =" pkgs/development/compilers/llvm/rocm/default.nix | cut -d'"' -f2)"
|
||||
if [[ "$version" != "$current_version" ]]; then
|
||||
tarball_meta="$(nix-prefetch-github RadeonOpenCompute llvm-project --rev "rocm-$version")"
|
||||
|
|
|
@ -10,13 +10,12 @@
|
|||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "clang-ocl";
|
||||
rocmVersion = "5.3.3";
|
||||
version = finalAttrs.rocmVersion;
|
||||
version = "5.3.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "RadeonOpenCompute";
|
||||
repo = "clang-ocl";
|
||||
rev = "rocm-${finalAttrs.rocmVersion}";
|
||||
rev = "rocm-${finalAttrs.version}";
|
||||
hash = "sha256-uMSvcVJj+me2E+7FsXZ4l4hTcK6uKEegXpkHGcuist0=";
|
||||
};
|
||||
|
||||
|
@ -38,8 +37,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
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
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
|
||||
-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 "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -47,6 +47,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
homepage = "https://github.com/RadeonOpenCompute/clang-ocl";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = teams.rocm.members;
|
||||
broken = finalAttrs.rocmVersion != clang.version;
|
||||
broken = finalAttrs.version != clang.version;
|
||||
};
|
||||
})
|
||||
|
|
|
@ -5,19 +5,12 @@
|
|||
, rocm-cmake
|
||||
, hip
|
||||
, openmp
|
||||
, gtest ? null
|
||||
, gtest
|
||||
, buildTests ? false
|
||||
, buildExamples ? false
|
||||
, gpuTargets ? null # gpuTargets = [ "gfx803" "gfx900" "gfx1030" ... ]
|
||||
, gpuTargets ? [ ] # gpuTargets = [ "gfx803" "gfx900" "gfx1030" ... ]
|
||||
}:
|
||||
|
||||
assert buildTests -> gtest != null;
|
||||
|
||||
# Several tests seem to either not compile or have a race condition
|
||||
# Undefined reference to symbol '_ZTIN7testing4TestE'
|
||||
# Try removing this next update
|
||||
assert buildTests == false;
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "composable_kernel";
|
||||
version = "unstable-2022-11-19";
|
||||
|
@ -54,8 +47,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
cmakeFlags = [
|
||||
"-DCMAKE_C_COMPILER=hipcc"
|
||||
"-DCMAKE_CXX_COMPILER=hipcc"
|
||||
] ++ lib.optionals (gpuTargets != null) [
|
||||
"-DGPU_TARGETS=${lib.strings.concatStringsSep ";" gpuTargets}"
|
||||
] ++ lib.optionals (gpuTargets != [ ]) [
|
||||
"-DGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}"
|
||||
];
|
||||
|
||||
# No flags to build selectively it seems...
|
||||
|
@ -89,5 +82,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
homepage = "https://github.com/ROCmSoftwarePlatform/composable_kernel";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = teams.rocm.members;
|
||||
# Several tests seem to either not compile or have a race condition
|
||||
# Undefined reference to symbol '_ZTIN7testing4TestE'
|
||||
# Try removing this next update
|
||||
broken = buildTests;
|
||||
};
|
||||
})
|
||||
|
|
|
@ -9,21 +9,16 @@
|
|||
, rocm-comgr
|
||||
, rocprim
|
||||
, hip
|
||||
, gtest ? null
|
||||
, gbenchmark ? null
|
||||
, gtest
|
||||
, gbenchmark
|
||||
, buildTests ? false
|
||||
, buildBenchmarks ? false
|
||||
}:
|
||||
|
||||
assert buildTests -> gtest != null;
|
||||
assert buildBenchmarks -> gbenchmark != null;
|
||||
|
||||
# CUB can also be used as a backend instead of rocPRIM.
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hipcub";
|
||||
repoVersion = "2.12.0";
|
||||
rocmVersion = "5.3.3";
|
||||
version = "${finalAttrs.repoVersion}-${finalAttrs.rocmVersion}";
|
||||
version = "5.3.3";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
|
@ -36,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
src = fetchFromGitHub {
|
||||
owner = "ROCmSoftwarePlatform";
|
||||
repo = "hipCUB";
|
||||
rev = "rocm-${finalAttrs.rocmVersion}";
|
||||
rev = "rocm-${finalAttrs.version}";
|
||||
hash = "sha256-/GMZKbMD1sZQCM2FulM9jiJQ8ByYZinn0C8d/deFh0g=";
|
||||
};
|
||||
|
||||
|
@ -84,11 +79,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
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
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
|
||||
-sL "https://api.github.com/repos/ROCmSoftwarePlatform/hipCUB/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version hipcub "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -96,6 +89,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
homepage = "https://github.com/ROCmSoftwarePlatform/hipCUB";
|
||||
license = with licenses; [ bsd3 ];
|
||||
maintainers = teams.rocm.members;
|
||||
broken = finalAttrs.rocmVersion != hip.version;
|
||||
broken = finalAttrs.version != hip.version;
|
||||
};
|
||||
})
|
||||
|
|
|
@ -11,18 +11,14 @@
|
|||
, hip
|
||||
, gfortran
|
||||
, git
|
||||
, gtest ? null
|
||||
, gtest
|
||||
, buildTests ? false
|
||||
}:
|
||||
|
||||
assert buildTests -> gtest != null;
|
||||
|
||||
# This can also use cuSPARSE as a backend instead of rocSPARSE
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hipsparse";
|
||||
repoVersion = "2.3.1";
|
||||
rocmVersion = "5.3.3";
|
||||
version = "${finalAttrs.repoVersion}-${finalAttrs.rocmVersion}";
|
||||
version = "5.3.3";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
|
@ -33,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
src = fetchFromGitHub {
|
||||
owner = "ROCmSoftwarePlatform";
|
||||
repo = "hipSPARSE";
|
||||
rev = "rocm-${finalAttrs.rocmVersion}";
|
||||
rev = "rocm-${finalAttrs.version}";
|
||||
hash = "sha256-Phcihat774ZSAe1QetE/GSZzGlnCnvS9GwsHBHCaD4c=";
|
||||
};
|
||||
|
||||
|
@ -119,11 +115,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
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
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
|
||||
-sL "https://api.github.com/repos/ROCmSoftwarePlatform/hipSPARSE/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version hipsparse "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -131,6 +125,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
homepage = "https://github.com/ROCmSoftwarePlatform/hipSPARSE";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = teams.rocm.members;
|
||||
broken = finalAttrs.rocmVersion != hip.version;
|
||||
broken = finalAttrs.version != hip.version;
|
||||
};
|
||||
})
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
, writeScript
|
||||
, pkg-config
|
||||
, cmake
|
||||
|
@ -21,13 +22,12 @@
|
|||
, boost
|
||||
, sqlite
|
||||
, bzip2
|
||||
, texlive ? null
|
||||
, doxygen ? null
|
||||
, sphinx ? null
|
||||
, python3Packages ? null
|
||||
, zlib ? null
|
||||
, fetchurl ? null
|
||||
, buildDocs ? false
|
||||
, texlive
|
||||
, doxygen
|
||||
, sphinx
|
||||
, zlib
|
||||
, python3Packages
|
||||
, buildDocs ? true
|
||||
, buildTests ? false
|
||||
# LFS isn't working, so we will manually fetch these
|
||||
# This isn't strictly required, but is recommended
|
||||
|
@ -36,15 +36,8 @@
|
|||
, useOpenCL ? false
|
||||
}:
|
||||
|
||||
assert buildDocs -> texlive != null;
|
||||
assert buildDocs -> doxygen != null;
|
||||
assert buildDocs -> sphinx != null;
|
||||
assert buildDocs -> python3Packages != null;
|
||||
assert buildTests -> zlib != null;
|
||||
assert fetchKDBs -> fetchurl != null;
|
||||
|
||||
let
|
||||
latex = lib.optionalAttrs buildDocs (texlive.combine {
|
||||
latex = lib.optionalAttrs buildDocs texlive.combine {
|
||||
inherit (texlive) scheme-small
|
||||
latexmk
|
||||
tex-gyre
|
||||
|
@ -56,7 +49,7 @@ let
|
|||
tabulary
|
||||
varwidth
|
||||
titlesec;
|
||||
});
|
||||
};
|
||||
|
||||
kdbs = lib.optionalAttrs fetchKDBs import ./deps.nix {
|
||||
inherit fetchurl;
|
||||
|
@ -64,11 +57,7 @@ let
|
|||
};
|
||||
in stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "miopen";
|
||||
# We have to manually specify the repoVersion for now
|
||||
# Find the github release or `-- MIOpen_VERSION= X.X.X` in the build log
|
||||
repoVersion = "2.18.0";
|
||||
rocmVersion = "5.3.3";
|
||||
version = "${finalAttrs.repoVersion}-${finalAttrs.rocmVersion}";
|
||||
version = "5.3.3";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
|
@ -81,7 +70,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
src = fetchFromGitHub {
|
||||
owner = "ROCmSoftwarePlatform";
|
||||
repo = "MIOpen";
|
||||
rev = "rocm-${finalAttrs.rocmVersion}";
|
||||
rev = "rocm-${finalAttrs.version}";
|
||||
hash = "sha256-5/JitdGJ0afzK4pGOOywRLsB3/Thc6/71sRkKIxf2Lg=";
|
||||
};
|
||||
|
||||
|
@ -112,7 +101,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
latex
|
||||
doxygen
|
||||
sphinx
|
||||
python3Packages.sphinx_rtd_theme
|
||||
python3Packages.sphinx-rtd-theme
|
||||
python3Packages.breathe
|
||||
python3Packages.myst-parser
|
||||
] ++ lib.optionals buildTests [
|
||||
|
@ -179,27 +168,21 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
|
||||
postInstall = ''
|
||||
rm $out/bin/install_precompiled_kernels.sh
|
||||
'' + lib.optionalString buildDocs ''
|
||||
mv ../doc/html $out/share/doc/miopen-${if useOpenCL then "opencl" else "hip"}
|
||||
mv ../doc/pdf/miopen.pdf $out/share/doc/miopen-${if useOpenCL then "opencl" else "hip"}
|
||||
'' + lib.optionalString buildTests ''
|
||||
mkdir -p $test/bin
|
||||
mv bin/test_* $test/bin
|
||||
patchelf --set-rpath ${lib.makeLibraryPath (finalAttrs.nativeBuildInputs ++ finalAttrs.buildInputs)}:$out/lib $test/bin/*
|
||||
'';
|
||||
|
||||
postFixup = lib.optionalString (buildDocs && !useOpenCL) ''
|
||||
export docDir=$doc/share/doc/miopen-hip
|
||||
'' + lib.optionalString (buildDocs && useOpenCL) ''
|
||||
export docDir=$doc/share/doc/miopen-opencl
|
||||
'' + lib.optionalString buildDocs ''
|
||||
mkdir -p $docDir
|
||||
mv ../doc/html $docDir
|
||||
mv ../doc/pdf/miopen.pdf $docDir
|
||||
patchelf --set-rpath ${lib.makeLibraryPath (finalAttrs.buildInputs ++ [ hip ])}:$out/lib $test/bin/*
|
||||
'';
|
||||
|
||||
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/MIOpen/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version miopen "$rocmVersion" --ignore-same-hash --version-key=rocmVersion
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
|
||||
-sL "https://api.github.com/repos/ROCmSoftwarePlatform/MIOpen/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version miopen "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -207,7 +190,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
homepage = "https://github.com/ROCmSoftwarePlatform/MIOpen";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = teams.rocm.members;
|
||||
broken = finalAttrs.rocmVersion != hip.version;
|
||||
broken = finalAttrs.version != hip.version;
|
||||
# MIOpen will produce a very large output due to KDBs fetched
|
||||
# Also possibly in the future because of KDB generation
|
||||
hydraPlatforms = [ ];
|
||||
|
|
|
@ -6,24 +6,18 @@
|
|||
, rocm-cmake
|
||||
, rocm-opencl-runtime
|
||||
, clang
|
||||
, texlive ? null
|
||||
, doxygen ? null
|
||||
, sphinx ? null
|
||||
, python3Packages ? null
|
||||
, openblas ? null
|
||||
, buildDocs ? false
|
||||
, texlive
|
||||
, doxygen
|
||||
, sphinx
|
||||
, openblas
|
||||
, python3Packages
|
||||
, buildDocs ? true
|
||||
, buildTests ? false
|
||||
, buildBenchmarks ? false
|
||||
}:
|
||||
|
||||
assert buildDocs -> texlive != null;
|
||||
assert buildDocs -> doxygen != null;
|
||||
assert buildDocs -> sphinx != null;
|
||||
assert buildDocs -> python3Packages != null;
|
||||
assert buildTests -> openblas != null;
|
||||
|
||||
let
|
||||
latex = lib.optionalAttrs buildDocs (texlive.combine {
|
||||
latex = lib.optionalAttrs buildDocs texlive.combine {
|
||||
inherit (texlive) scheme-small
|
||||
latexmk
|
||||
tex-gyre
|
||||
|
@ -35,16 +29,15 @@ let
|
|||
tabulary
|
||||
varwidth
|
||||
titlesec;
|
||||
});
|
||||
};
|
||||
in stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "miopengemm";
|
||||
rocmVersion = "5.3.3";
|
||||
version = finalAttrs.rocmVersion;
|
||||
version = "5.3.3";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
] ++ lib.optionals buildDocs [
|
||||
"docs"
|
||||
"doc"
|
||||
] ++ lib.optionals buildTests [
|
||||
"test"
|
||||
] ++ lib.optionals buildBenchmarks [
|
||||
|
@ -54,7 +47,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
src = fetchFromGitHub {
|
||||
owner = "ROCmSoftwarePlatform";
|
||||
repo = "MIOpenGEMM";
|
||||
rev = "rocm-${finalAttrs.rocmVersion}";
|
||||
rev = "rocm-${finalAttrs.version}";
|
||||
hash = "sha256-AiRzOMYRA/0nbQomyq4oOEwNZdkPYWRA2W6QFlctvFc=";
|
||||
};
|
||||
|
||||
|
@ -70,7 +63,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
latex
|
||||
doxygen
|
||||
sphinx
|
||||
python3Packages.sphinx_rtd_theme
|
||||
python3Packages.sphinx-rtd-theme
|
||||
python3Packages.breathe
|
||||
] ++ lib.optionals buildTests [
|
||||
openblas
|
||||
|
@ -104,7 +97,10 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
make examples
|
||||
'';
|
||||
|
||||
postInstall = lib.optionalString buildTests ''
|
||||
postInstall = lib.optionalString buildDocs ''
|
||||
mv ../doc/html $out/share/doc/miopengemm
|
||||
mv ../doc/pdf/miopengemm.pdf $out/share/doc/miopengemm
|
||||
'' + lib.optionalString buildTests ''
|
||||
mkdir -p $test/bin
|
||||
find tests -executable -type f -exec mv {} $test/bin \;
|
||||
patchelf --set-rpath ${lib.makeLibraryPath finalAttrs.buildInputs}:$out/lib $test/bin/*
|
||||
|
@ -114,17 +110,12 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
patchelf --set-rpath ${lib.makeLibraryPath finalAttrs.buildInputs}:$out/lib $benchmark/bin/*
|
||||
'';
|
||||
|
||||
postFixup = lib.optionalString buildDocs ''
|
||||
mkdir -p $docs/share/doc/miopengemm
|
||||
mv ../doc/html $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
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
|
||||
-sL "https://api.github.com/repos/ROCmSoftwarePlatform/MIOpenGEMM/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version miopengemm "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -132,6 +123,6 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
homepage = "https://github.com/ROCmSoftwarePlatform/MIOpenGEMM";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = teams.rocm.members;
|
||||
broken = finalAttrs.rocmVersion != clang.version;
|
||||
broken = finalAttrs.version != clang.version;
|
||||
};
|
||||
})
|
||||
|
|
|
@ -10,17 +10,13 @@
|
|||
, rocm-smi
|
||||
, hip
|
||||
, gtest
|
||||
, chrpath ? null
|
||||
, chrpath
|
||||
, buildTests ? false
|
||||
}:
|
||||
|
||||
assert buildTests -> chrpath != null;
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "rccl";
|
||||
repoVersion = "2.12.10";
|
||||
rocmVersion = "5.3.3";
|
||||
version = "${finalAttrs.repoVersion}-${finalAttrs.rocmVersion}";
|
||||
version = "5.3.3";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
|
@ -31,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
src = fetchFromGitHub {
|
||||
owner = "ROCmSoftwarePlatform";
|
||||
repo = "rccl";
|
||||
rev = "rocm-${finalAttrs.rocmVersion}";
|
||||
rev = "rocm-${finalAttrs.version}";
|
||||
hash = "sha256-whRXGD8oINDYhFs8+hEWKWoGNqacGlyy7xi8peA8Qsk=";
|
||||
};
|
||||
|
||||
|
@ -79,11 +75,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
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
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
|
||||
-sL "https://api.github.com/repos/ROCmSoftwarePlatform/rccl/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version rccl "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -91,6 +85,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
homepage = "https://github.com/ROCmSoftwarePlatform/rccl";
|
||||
license = with licenses; [ bsd2 bsd3 ];
|
||||
maintainers = teams.rocm.members;
|
||||
broken = finalAttrs.rocmVersion != hip.version;
|
||||
broken = finalAttrs.version != hip.version;
|
||||
};
|
||||
})
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
, rocm-comgr
|
||||
, hip
|
||||
, python3
|
||||
, tensile ? null
|
||||
, msgpack ? null
|
||||
, libxml2 ? null
|
||||
, llvm ? null
|
||||
, python3Packages ? null
|
||||
, gtest ? null
|
||||
, gfortran ? null
|
||||
, tensile
|
||||
, msgpack
|
||||
, libxml2
|
||||
, llvm
|
||||
, gtest
|
||||
, gfortran
|
||||
, python3Packages
|
||||
, buildTensile ? true
|
||||
, buildTests ? false
|
||||
, buildBenchmarks ? false
|
||||
|
@ -28,29 +28,14 @@
|
|||
, gpuTargets ? [ "all" ]
|
||||
}:
|
||||
|
||||
assert buildTensile -> tensile != null;
|
||||
assert buildTensile -> msgpack != null;
|
||||
assert buildTensile -> libxml2 != null;
|
||||
assert buildTensile -> llvm != null;
|
||||
assert buildTensile -> python3Packages != null;
|
||||
assert buildTests -> gtest != null;
|
||||
assert buildTests -> gfortran != null;
|
||||
|
||||
# Tests and benchmarks are a can of worms that I will tackle in a different PR
|
||||
# It involves completely rewriting the amd-blis derivation
|
||||
assert buildTests == false;
|
||||
assert buildBenchmarks == false;
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "rocblas";
|
||||
repoVersion = "2.45.0";
|
||||
rocmVersion = "5.3.3";
|
||||
version = "${finalAttrs.repoVersion}-${finalAttrs.rocmVersion}";
|
||||
version = "5.3.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ROCmSoftwarePlatform";
|
||||
repo = "rocBLAS";
|
||||
rev = "rocm-${finalAttrs.rocmVersion}";
|
||||
rev = "rocm-${finalAttrs.version}";
|
||||
hash = "sha256-z40WxF+suMeIZihBWJPRWyL20S2FUbeZb5JewmQWOJo=";
|
||||
};
|
||||
|
||||
|
@ -90,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
"-DCMAKE_C_COMPILER=hipcc"
|
||||
"-DCMAKE_CXX_COMPILER=hipcc"
|
||||
"-Dpython=python3"
|
||||
"-DAMDGPU_TARGETS=${lib.strings.concatStringsSep ";" gpuTargets}"
|
||||
"-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}"
|
||||
"-DBUILD_WITH_TENSILE=${if buildTensile then "ON" else "OFF"}"
|
||||
# Manually define CMAKE_INSTALL_<DIR>
|
||||
# See: https://github.com/NixOS/nixpkgs/pull/197838
|
||||
|
@ -131,11 +116,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
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
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
|
||||
-sL "https://api.github.com/repos/ROCmSoftwarePlatform/rocBLAS/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version rocblas "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -143,6 +126,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
homepage = "https://github.com/ROCmSoftwarePlatform/rocBLAS";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = teams.rocm.members;
|
||||
broken = finalAttrs.rocmVersion != hip.version;
|
||||
# Tests and benchmarks are a can of worms that I will tackle in a different PR
|
||||
# It involves completely rewriting the amd-blis derivation
|
||||
broken = finalAttrs.version != hip.version || buildTests || buildBenchmarks;
|
||||
};
|
||||
})
|
||||
|
|
|
@ -45,7 +45,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
passthru.updateScript = writeScript "update.sh" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts
|
||||
version="$(curl -sL "https://api.github.com/repos/ROCm-Developer-Tools/ROCclr/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} -sL "https://api.github.com/repos/ROCm-Developer-Tools/ROCclr/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
||||
update-source-version rocclr "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
|
|
|
@ -10,26 +10,18 @@
|
|||
, hip
|
||||
, sqlite
|
||||
, python3
|
||||
, gtest ? null
|
||||
, boost ? null
|
||||
, fftw ? null
|
||||
, fftwFloat ? null
|
||||
, llvmPackages ? null
|
||||
, gtest
|
||||
, boost
|
||||
, fftw
|
||||
, fftwFloat
|
||||
, llvmPackages
|
||||
, buildTests ? false
|
||||
, buildBenchmarks ? false
|
||||
}:
|
||||
|
||||
assert buildTests -> gtest != null;
|
||||
assert buildBenchmarks -> fftw != null;
|
||||
assert buildBenchmarks -> fftwFloat != null;
|
||||
assert (buildTests || buildBenchmarks) -> boost != null;
|
||||
assert (buildTests || buildBenchmarks) -> llvmPackages != null;
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "rocfft";
|
||||
repoVersion = "1.0.18";
|
||||
rocmVersion = "5.3.3";
|
||||
version = "${finalAttrs.repoVersion}-${finalAttrs.rocmVersion}";
|
||||
version = "5.3.3";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
|
@ -42,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
src = fetchFromGitHub {
|
||||
owner = "ROCmSoftwarePlatform";
|
||||
repo = "rocFFT";
|
||||
rev = "rocm-${finalAttrs.rocmVersion}";
|
||||
rev = "rocm-${finalAttrs.version}";
|
||||
hash = "sha256-jb2F1fRe+YLloYJ/KtzrptUDhmdBDBtddeW/g55owKM=";
|
||||
};
|
||||
|
||||
|
@ -109,11 +101,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
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
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
|
||||
-sL "https://api.github.com/repos/ROCmSoftwarePlatform/rocFFT/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version rocfft "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -121,7 +111,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
homepage = "https://github.com/ROCmSoftwarePlatform/rocFFT";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = teams.rocm.members;
|
||||
broken = finalAttrs.rocmVersion != hip.version;
|
||||
broken = finalAttrs.version != hip.version;
|
||||
hydraPlatforms = [ ]; # rocFFT produces an extremely large output
|
||||
};
|
||||
})
|
||||
|
|
|
@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
passthru.updateScript = writeScript "update.sh" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts
|
||||
version="$(curl -sL "https://api.github.com/repos/RadeonOpenCompute/ROCm-CompilerSupport/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} -sL "https://api.github.com/repos/RadeonOpenCompute/ROCm-CompilerSupport/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version rocm-comgr "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
passthru.updateScript = writeScript "update.sh" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts
|
||||
version="$(curl -sL "https://api.github.com/repos/RadeonOpenCompute/ROCm-Device-Libs/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} -sL "https://api.github.com/repos/RadeonOpenCompute/ROCm-Device-Libs/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version rocm-device-libs "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
passthru.updateScript = writeScript "update.sh" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts
|
||||
version="$(curl -sL "https://api.github.com/repos/RadeonOpenCompute/ROCm-OpenCL-Runtime/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} -sL "https://api.github.com/repos/RadeonOpenCompute/ROCm-OpenCL-Runtime/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
||||
update-source-version rocm-opencl-runtime "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
passthru.updateScript = writeScript "update.sh" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts
|
||||
version="$(curl -sL "https://api.github.com/repos/RadeonOpenCompute/ROCR-Runtime/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} -sL "https://api.github.com/repos/RadeonOpenCompute/ROCR-Runtime/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version rocm-runtime "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
passthru.updateScript = writeScript "update.sh" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts
|
||||
version="$(curl -sL "https://api.github.com/repos/RadeonOpenCompute/ROCT-Thunk-Interface/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} -sL "https://api.github.com/repos/RadeonOpenCompute/ROCT-Thunk-Interface/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
||||
update-source-version rocm-thunk "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
|
|
|
@ -9,13 +9,12 @@
|
|||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "rocmlir";
|
||||
rocmVersion = "5.3.3";
|
||||
version = finalAttrs.rocmVersion;
|
||||
version = "5.3.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ROCmSoftwarePlatform";
|
||||
repo = "rocMLIR";
|
||||
rev = "rocm-${finalAttrs.rocmVersion}";
|
||||
rev = "rocm-${finalAttrs.version}";
|
||||
hash = "sha256-s/5gAH5vh2tgATZemPP66juQFDg8BR2sipzX2Q6pOOQ=";
|
||||
};
|
||||
|
||||
|
@ -35,8 +34,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
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
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
|
||||
-sL "https://api.github.com/repos/ROCmSoftwarePlatform/rocMLIR/tags?per_page=2" | jq '.[1].name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version rocmlir "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -44,6 +44,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
homepage = "https://github.com/ROCmSoftwarePlatform/rocMLIR";
|
||||
license = with licenses; [ asl20 ];
|
||||
maintainers = teams.rocm.members;
|
||||
broken = finalAttrs.rocmVersion != hip.version;
|
||||
broken = finalAttrs.version != hip.version;
|
||||
};
|
||||
})
|
||||
|
|
|
@ -8,20 +8,15 @@
|
|||
, rocm-device-libs
|
||||
, rocm-comgr
|
||||
, hip
|
||||
, gtest ? null
|
||||
, gbenchmark ? null
|
||||
, gtest
|
||||
, gbenchmark
|
||||
, buildTests ? false
|
||||
, buildBenchmarks ? false
|
||||
}:
|
||||
|
||||
assert buildTests -> gtest != null;
|
||||
assert buildBenchmarks -> gbenchmark != null;
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "rocprim";
|
||||
repoVersion = "2.11.1";
|
||||
rocmVersion = "5.3.3";
|
||||
version = "${finalAttrs.repoVersion}-${finalAttrs.rocmVersion}";
|
||||
version = "5.3.3";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
|
@ -34,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
src = fetchFromGitHub {
|
||||
owner = "ROCmSoftwarePlatform";
|
||||
repo = "rocPRIM";
|
||||
rev = "rocm-${finalAttrs.rocmVersion}";
|
||||
rev = "rocm-${finalAttrs.version}";
|
||||
hash = "sha256-jfTuGEPyssARpdo0ZnfVJt0MBkoHnmBtf6Zg4xXNJ1U=";
|
||||
};
|
||||
|
||||
|
@ -80,11 +75,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
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
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
|
||||
-sL "https://api.github.com/repos/ROCmSoftwarePlatform/rocPRIM/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version rocprim "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -92,6 +85,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
homepage = "https://github.com/ROCmSoftwarePlatform/rocPRIM";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = teams.rocm.members;
|
||||
broken = finalAttrs.rocmVersion != hip.version;
|
||||
broken = finalAttrs.version != hip.version;
|
||||
};
|
||||
})
|
||||
|
|
|
@ -8,20 +8,15 @@
|
|||
, rocm-device-libs
|
||||
, rocm-comgr
|
||||
, hip
|
||||
, gtest ? null
|
||||
, gbenchmark ? null
|
||||
, gtest
|
||||
, gbenchmark
|
||||
, buildTests ? false
|
||||
, buildBenchmarks ? false
|
||||
}:
|
||||
|
||||
assert buildTests -> gtest != null;
|
||||
assert buildBenchmarks -> gbenchmark != null;
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "rocrand";
|
||||
repoVersion = "2.10.15";
|
||||
rocmVersion = "5.3.3";
|
||||
version = "${finalAttrs.repoVersion}-${finalAttrs.rocmVersion}";
|
||||
version = "5.3.3";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
|
@ -34,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
src = fetchFromGitHub {
|
||||
owner = "ROCmSoftwarePlatform";
|
||||
repo = "rocRAND";
|
||||
rev = "rocm-${finalAttrs.rocmVersion}";
|
||||
rev = "rocm-${finalAttrs.version}";
|
||||
hash = "sha256-awQLqPmhVxegrqqSoC8fiCQJ33bPKZlljSAXnHVcIZo=";
|
||||
fetchSubmodules = true; # For inline hipRAND
|
||||
};
|
||||
|
@ -83,11 +78,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
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/rocRAND/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 rocrand "$repoVersion" --ignore-same-hash --version-key=repoVersion
|
||||
update-source-version rocrand "$rocmVersion" --ignore-same-hash --version-key=rocmVersion
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
|
||||
-sL "https://api.github.com/repos/ROCmSoftwarePlatform/rocRAND/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version rocrand "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -95,6 +88,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
homepage = "https://github.com/ROCmSoftwarePlatform/rocRAND";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = teams.rocm.members;
|
||||
broken = finalAttrs.rocmVersion != hip.version;
|
||||
broken = finalAttrs.version != hip.version;
|
||||
};
|
||||
})
|
||||
|
|
|
@ -12,22 +12,16 @@
|
|||
, hip
|
||||
, gfortran
|
||||
, git
|
||||
, gtest ? null
|
||||
, boost ? null
|
||||
, python3Packages ? null
|
||||
, gtest
|
||||
, boost
|
||||
, python3Packages
|
||||
, buildTests ? false
|
||||
, buildBenchmarks ? false # Seems to depend on tests
|
||||
}:
|
||||
|
||||
assert (buildTests || buildBenchmarks) -> gtest != null;
|
||||
assert (buildTests || buildBenchmarks) -> boost != null;
|
||||
assert (buildTests || buildBenchmarks) -> python3Packages != null;
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "rocsparse";
|
||||
repoVersion = "2.3.2";
|
||||
rocmVersion = "5.3.3";
|
||||
version = "${finalAttrs.repoVersion}-${finalAttrs.rocmVersion}";
|
||||
version = "5.3.3";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
|
@ -40,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
src = fetchFromGitHub {
|
||||
owner = "ROCmSoftwarePlatform";
|
||||
repo = "rocSPARSE";
|
||||
rev = "rocm-${finalAttrs.rocmVersion}";
|
||||
rev = "rocm-${finalAttrs.version}";
|
||||
hash = "sha256-1069oBrIpZ4M9CAkzoQ9a5j3WlCXErirTbgTUZuT6b0=";
|
||||
};
|
||||
|
||||
|
@ -143,11 +137,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
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
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
|
||||
-sL "https://api.github.com/repos/ROCmSoftwarePlatform/rocSPARSE/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version rocsparse "$version" --ignore-same-hash
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -156,6 +148,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
homepage = "https://github.com/ROCmSoftwarePlatform/rocSPARSE";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = teams.rocm.members;
|
||||
broken = finalAttrs.rocmVersion != hip.version;
|
||||
broken = finalAttrs.version != hip.version;
|
||||
};
|
||||
})
|
||||
|
|
|
@ -9,23 +9,14 @@
|
|||
, rocm-comgr
|
||||
, rocprim
|
||||
, hip
|
||||
, gtest ? null
|
||||
, gtest
|
||||
, buildTests ? false
|
||||
, buildBenchmarks ? false
|
||||
}:
|
||||
|
||||
assert buildTests -> gtest != null;
|
||||
|
||||
# Doesn't seem to work, thousands of errors compiling with no clear fix
|
||||
# Is this an upstream issue? We don't seem to be missing dependencies
|
||||
assert buildTests == false;
|
||||
assert buildBenchmarks == false;
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "rocthrust";
|
||||
repoVersion = "2.16.0";
|
||||
rocmVersion = "5.3.3";
|
||||
version = "${finalAttrs.repoVersion}-${finalAttrs.rocmVersion}";
|
||||
version = "5.3.3";
|
||||
|
||||
# Comment out these outputs until tests/benchmarks are fixed (upstream?)
|
||||
# outputs = [
|
||||
|
@ -39,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
src = fetchFromGitHub {
|
||||
owner = "ROCmSoftwarePlatform";
|
||||
repo = "rocThrust";
|
||||
rev = "rocm-${finalAttrs.rocmVersion}";
|
||||
rev = "rocm-${finalAttrs.version}";
|
||||
hash = "sha256-WODOeWWL0AOYu0djwDlVZuiJDxcchsAT7BFG9JKYScw=";
|
||||
};
|
||||
|
||||
|
@ -86,11 +77,9 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
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
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
|
||||
-sL "https://api.github.com/repos/ROCmSoftwarePlatform/rocThrust/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version rocthrust "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -98,6 +87,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
homepage = "https://github.com/ROCmSoftwarePlatform/rocThrust";
|
||||
license = with licenses; [ asl20 ];
|
||||
maintainers = teams.rocm.members;
|
||||
broken = finalAttrs.rocmVersion != hip.version;
|
||||
# Tests/Benchmarks don't seem to work, thousands of errors compiling with no clear fix
|
||||
# Is this an upstream issue? We don't seem to be missing dependencies
|
||||
broken = finalAttrs.version != hip.version || buildTests || buildBenchmarks;
|
||||
};
|
||||
})
|
||||
|
|
|
@ -6,31 +6,20 @@
|
|||
, rocm-cmake
|
||||
, hip
|
||||
, openmp
|
||||
, gtest ? null
|
||||
, rocblas ? null
|
||||
, texlive ? null
|
||||
, doxygen ? null
|
||||
, sphinx ? null
|
||||
, python3Packages ? null
|
||||
, gtest
|
||||
, rocblas
|
||||
, texlive
|
||||
, doxygen
|
||||
, sphinx
|
||||
, python3Packages
|
||||
, buildDocs ? true
|
||||
, buildTests ? false
|
||||
, buildSamples ? false
|
||||
, buildDocs ? false
|
||||
, gpuTargets ? null # gpuTargets = [ "gfx908:xnack-" "gfx90a:xnack-" "gfx90a:xnack+" ... ]
|
||||
, gpuTargets ? [ ] # gpuTargets = [ "gfx908:xnack-" "gfx90a:xnack-" "gfx90a:xnack+" ... ]
|
||||
}:
|
||||
|
||||
assert buildTests -> gtest != null;
|
||||
assert buildTests -> rocblas != null;
|
||||
assert buildDocs -> texlive != null;
|
||||
assert buildDocs -> doxygen != null;
|
||||
assert buildDocs -> sphinx != null;
|
||||
assert buildDocs -> python3Packages != null;
|
||||
|
||||
# Building tests isn't working for now
|
||||
# undefined reference to symbol '_ZTIN7testing4TestE'
|
||||
assert buildTests == false;
|
||||
|
||||
let
|
||||
latex = lib.optionalAttrs buildDocs (texlive.combine {
|
||||
latex = lib.optionalAttrs buildDocs texlive.combine {
|
||||
inherit (texlive) scheme-small
|
||||
latexmk
|
||||
tex-gyre
|
||||
|
@ -42,27 +31,25 @@ let
|
|||
tabulary
|
||||
varwidth
|
||||
titlesec;
|
||||
});
|
||||
};
|
||||
in stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "rocwmma";
|
||||
repoVersion = "0.8";
|
||||
rocmVersion = "5.3.3";
|
||||
version = "${finalAttrs.repoVersion}-${finalAttrs.rocmVersion}";
|
||||
version = "5.3.3";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
] ++ lib.optionals buildDocs [
|
||||
"doc"
|
||||
] ++ lib.optionals buildTests [
|
||||
"test"
|
||||
] ++ lib.optionals buildSamples [
|
||||
"sample"
|
||||
] ++ lib.optionals buildDocs [
|
||||
"docs"
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ROCmSoftwarePlatform";
|
||||
repo = "rocWMMA";
|
||||
rev = "rocm-${finalAttrs.rocmVersion}";
|
||||
rev = "rocm-${finalAttrs.version}";
|
||||
hash = "sha256-wU3R1XGTy7uFbceUyE0wy+XayicuyJIVfd1ih6pbTN0=";
|
||||
};
|
||||
|
||||
|
@ -85,7 +72,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
latex
|
||||
doxygen
|
||||
sphinx
|
||||
python3Packages.sphinx_rtd_theme
|
||||
python3Packages.sphinx-rtd-theme
|
||||
python3Packages.breathe
|
||||
];
|
||||
|
||||
|
@ -98,8 +85,8 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
"-DCMAKE_INSTALL_BINDIR=bin"
|
||||
"-DCMAKE_INSTALL_LIBDIR=lib"
|
||||
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
||||
] ++ lib.optionals (gpuTargets != null) [
|
||||
"-DGPU_TARGETS=${lib.strings.concatStringsSep ";" gpuTargets}"
|
||||
] ++ lib.optionals (gpuTargets != [ ]) [
|
||||
"-DGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}"
|
||||
] ++ lib.optionals buildTests [
|
||||
"-DROCWMMA_BUILD_VALIDATION_TESTS=ON"
|
||||
"-DROCWMMA_BUILD_BENCHMARK_TESTS=ON"
|
||||
|
@ -119,7 +106,10 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
../docs/run_doc.sh
|
||||
'';
|
||||
|
||||
postInstall = lib.optionalString buildTests ''
|
||||
postInstall = lib.optionalString buildDocs ''
|
||||
mv ../docs/source/_build/html $out/share/doc/rocwmma
|
||||
mv ../docs/source/_build/latex/rocWMMA.pdf $out/share/doc/rocwmma
|
||||
'' + lib.optionalString buildTests ''
|
||||
mkdir -p $test/bin
|
||||
mv $out/bin/*_test* $test/bin
|
||||
'' + lib.optionalString buildSamples ''
|
||||
|
@ -131,20 +121,12 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
rmdir $out/bin
|
||||
'';
|
||||
|
||||
postFixup = lib.optionalString buildDocs ''
|
||||
mkdir -p $docs/share/doc/rocwmma
|
||||
mv ../docs/source/_build/html $docs/share/doc/rocwmma
|
||||
mv ../docs/source/_build/latex/rocWMMA.pdf $docs/share/doc/rocwmma
|
||||
'';
|
||||
|
||||
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/rocWMMA/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 rocwmma "$repoVersion" --ignore-same-hash --version-key=repoVersion
|
||||
update-source-version rocwmma "$rocmVersion" --ignore-same-hash --version-key=rocmVersion
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
|
||||
-sL "https://api.github.com/repos/ROCmSoftwarePlatform/rocWMMA/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version rocwmma "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -152,6 +134,8 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
homepage = "https://github.com/ROCmSoftwarePlatform/rocWMMA";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = teams.rocm.members;
|
||||
broken = finalAttrs.rocmVersion != hip.version;
|
||||
# Building tests isn't working for now
|
||||
# undefined reference to symbol '_ZTIN7testing4TestE'
|
||||
broken = finalAttrs.version != hip.version || buildTests;
|
||||
};
|
||||
})
|
||||
|
|
|
@ -10,14 +10,12 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "tensile";
|
||||
repoVersion = "4.34.0";
|
||||
rocmVersion = "5.3.3";
|
||||
version = "${repoVersion}-${rocmVersion}";
|
||||
version = "5.3.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ROCmSoftwarePlatform";
|
||||
repo = "Tensile";
|
||||
rev = "rocm-${rocmVersion}";
|
||||
rev = "rocm-${version}";
|
||||
hash = "sha256-6A7REYdIw/ZmjrJh7B+wCXZMleh4bf04TFpRItPtctA=";
|
||||
};
|
||||
|
||||
|
@ -30,11 +28,9 @@ buildPythonPackage rec {
|
|||
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
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
|
||||
-sL "https://api.github.com/repos/ROCmSoftwarePlatform/Tensile/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version tensile "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -16,7 +16,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
passthru.updateScript = writeScript "update.sh" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts
|
||||
version="$(curl -sL "https://api.github.com/repos/RadeonOpenCompute/rocm-cmake/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} -sL "https://api.github.com/repos/RadeonOpenCompute/rocm-cmake/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
||||
update-source-version rocm-cmake "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
passthru.updateScript = writeScript "update.sh" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts
|
||||
version="$(curl -sL "https://api.github.com/repos/RadeonOpenCompute/rocminfo/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} -sL "https://api.github.com/repos/RadeonOpenCompute/rocminfo/tags" | jq '.[].name | split("-") | .[1] | select( . != null )' --raw-output | sort -n | tail -1)"
|
||||
update-source-version rocminfo "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
passthru.updateScript = writeScript "update.sh" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts
|
||||
version="$(curl -sL "https://api.github.com/repos/RadeonOpenCompute/rocm_smi_lib/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
version="$(curl ''${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} -sL "https://api.github.com/repos/RadeonOpenCompute/rocm_smi_lib/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
|
||||
update-source-version rocm-smi "$version" --ignore-same-hash
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue