Merge pull request #204378 from Madouura/pr/rocm-related

Fixes https://github.com/NixOS/nixpkgs/issues/203949
This commit is contained in:
Bernardo Meurer 2022-12-12 15:55:21 -03:00 committed by GitHub
commit fc6c79f771
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 338 additions and 299 deletions

View file

@ -59,4 +59,4 @@ let
) // privateAttrs // passthruAttrs // { inherit name; };
in
fetcher fetcherArgs // { meta = newMeta; inherit rev; }
fetcher fetcherArgs // { meta = newMeta; inherit rev owner repo; }

View file

@ -30,13 +30,13 @@
let
hip = stdenv.mkDerivation (finalAttrs: {
pname = "hip";
version = "5.3.3";
version = "5.4.0";
src = fetchFromGitHub {
owner = "ROCm-Developer-Tools";
repo = "HIP";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-kmRvrwnT0h2dBMI+H9d1vmeW3TmDBD+qW4YYhaMV2dE=";
hash = "sha256-34SJM2n3jZWIS2uwpboWOXVFhaVWGK5ELPKD/cJc1zw=";
};
patches = [
@ -60,9 +60,6 @@ let
-i "$f"
done
substituteInPlace bin/hip_embed_pch.sh \
--replace '$LLVM_DIR/bin/' ""
sed 's,#!/usr/bin/python,#!${python3.interpreter},' -i hip_prof_gen.py
sed -e 's,$ROCM_AGENT_ENUM = "''${ROCM_PATH}/bin/rocm_agent_enumerator";,$ROCM_AGENT_ENUM = "${rocminfo}/bin/rocm_agent_enumerator";,' \
@ -110,13 +107,13 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "hip";
version = "5.3.3";
version = "5.4.0";
src = fetchFromGitHub {
owner = "ROCm-Developer-Tools";
repo = "hipamd";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-i7hT/j+V0LT6Va2XcQyyKXF1guoIyhcOHvn842wCRx4=";
hash = "sha256-VL0vZVv099pZPX0J2pXPFvrhkVO/b6X+ZZDaD9B1hYI=";
};
nativeBuildInputs = [ cmake python3 makeWrapper perl ];
@ -168,10 +165,19 @@ stdenv.mkDerivation (finalAttrs: {
wrapProgram $out/bin/hipconfig --set HIP_PATH $out --set HSA_PATH ${rocm-runtime} --set HIP_CLANG_PATH ${clang}/bin
'';
# TODO: Separate HIP and hipamd into separate derivations
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 ''${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)"
version="$(curl ''${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \
-sL "https://api.github.com/repos/ROCm-Developer-Tools/HIP/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
IFS='.' read -a version_arr <<< "$version"
if [ "''${#version_arr[*]}" == 2 ]; then
version="''${version}.0"
fi
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 +189,15 @@ stdenv.mkDerivation (finalAttrs: {
echo hip already up-to-date
fi
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)"
version="$(curl ''${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \
-sL "https://api.github.com/repos/ROCm-Developer-Tools/hipamd/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
IFS='.' read -a version_arr <<< "$version"
if [ "''${#version_arr[*]}" == 2 ]; then
version="''${version}.0"
fi
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")"

View file

@ -1,12 +1,12 @@
{ stdenv, lib, buildPackages, fetchFromGitHub, callPackage, wrapCCWith, overrideCC }:
let
version = "5.3.3";
version = "5.4.0";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "llvm-project";
rev = "rocm-${version}";
hash = "sha256-IKo7N8wWvh5PBrZ2mh1Vu5s3uUXhanqYtC4qLV/+JBs=";
hash = "sha256-rlVo77h344PLGj/mIzsw+/ndWywsBsiKDXsEDpWSUno=";
};
in rec {
clang = wrapCCWith rec {

View file

@ -1,23 +0,0 @@
diff --git a/llvm/cmake/modules/LLVMInstallSymlink.cmake b/llvm/cmake/modules/LLVMInstallSymlink.cmake
index b5c35f706cb7..ac25e40b1436 100644
--- a/cmake/modules/LLVMInstallSymlink.cmake
+++ b/cmake/modules/LLVMInstallSymlink.cmake
@@ -4,11 +4,16 @@
include(GNUInstallDirs)
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../../cmake/Modules" ${CMAKE_MODULE_PATH})
+include(ExtendPath)
+
function(install_symlink name target outdir)
set(DESTDIR $ENV{DESTDIR})
- set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}")
+ message(STATUS "Creating ${name} at ${bindir} (${CMAKE_MODULE_PATH})")
+ extend_path(prefixed_outdir "${CMAKE_INSTALL_PREFIX}" "${outdir}")
+ set(bindir "${DESTDIR}${prefixed_outdir}")
- message(STATUS "Creating ${name}")
+ message(STATUS "Creating ${name} at ${bindir}")
execute_process(
COMMAND "${CMAKE_COMMAND}" -E create_symlink "${target}" "${name}"

View file

@ -41,7 +41,7 @@ in stdenv.mkDerivation (finalAttrs: {
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
"-DLLVM_TARGETS_TO_BUILD=AMDGPU;${llvmNativeTarget}"
"-DLLVM_ENABLE_PROJECTS=clang;lld;compiler-rt;clang-tools-extra"
"-DLLVM_ENABLE_PROJECTS=clang;lld;compiler-rt"
]
++ lib.optionals enableManpages [
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
@ -52,34 +52,40 @@ in stdenv.mkDerivation (finalAttrs: {
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
];
patches = [
./install-symlinks.patch
];
postPatch = ''
patchShebangs lib/OffloadArch/make_generated_offload_arch_h.sh
substituteInPlace ../clang/cmake/modules/CMakeLists.txt \
--replace 'FILES_MATCHING' 'NO_SOURCE_PERMISSIONS FILES_MATCHING'
'';
updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts nix-prefetch-github
passthru = {
isClang = true;
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")"
tarball_hash="$(nix to-base64 sha256-$(jq -r '.sha256' <<< "$tarball_meta"))"
sed -i "pkgs/development/compilers/llvm/rocm/default.nix" \
-e 's,version = "\(.*\)",version = "'"$version"'",' \
-e 's,hash = "\(.*\)",hash = "sha256-'"$tarball_hash"'",'
else
echo rocm-llvm already up-to-date
fi
'';
updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts nix-prefetch-github
passthru.isClang = true;
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)"
IFS='.' read -a version_arr <<< "$version"
if [ "''${#version_arr[*]}" == 2 ]; then
version="''${version}.0"
fi
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")"
tarball_hash="$(nix to-base64 sha256-$(jq -r '.sha256' <<< "$tarball_meta"))"
sed -i "pkgs/development/compilers/llvm/rocm/default.nix" \
-e 's,version = "\(.*\)",version = "'"$version"'",' \
-e 's,hash = "\(.*\)",hash = "sha256-'"$tarball_hash"'",'
else
echo rocm-llvm already up-to-date
fi
'';
};
meta = with lib; {
description = "ROCm fork of the LLVM compiler infrastructure";

View file

@ -1,7 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, writeScript
, rocmUpdateScript
, cmake
, rocm-cmake
, rocm-device-libs
@ -10,7 +10,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "clang-ocl";
version = "5.3.3";
version = "5.4.0";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
@ -34,13 +34,11 @@ stdenv.mkDerivation (finalAttrs: {
"-DCMAKE_CXX_COMPILER=clang++"
];
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "OpenCL compilation with clang compiler";

View file

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, unstableGitUpdater
, cmake
, rocm-cmake
, hip
@ -13,7 +14,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "composable_kernel";
version = "unstable-2022-11-19";
version = "unstable-2022-12-08";
outputs = [
"out"
@ -28,8 +29,8 @@ stdenv.mkDerivation (finalAttrs: {
src = fetchFromGitHub {
owner = "ROCmSoftwarePlatform";
repo = "composable_kernel";
rev = "43a889b72e3faabf04c16ff410d387ce28486c3e";
hash = "sha256-DDRrWKec/RcOhW3CrN0gl9NZsp0Bjnja7HAiTcEh7qg=";
rev = "d58b7f5155b44c8b608f3edc6a6eab314493ec1a";
hash = "sha256-4nzyaWhPnY/0TygcoJAqVzdgfXOkf+o/BE2V9N+Bm7Q=";
};
nativeBuildInputs = [
@ -77,6 +78,8 @@ stdenv.mkDerivation (finalAttrs: {
mv bin/example_* $example/bin
'';
passthru.updateScript = unstableGitUpdater { };
meta = with lib; {
description = "Performance portable programming model for machine learning tensor operators";
homepage = "https://github.com/ROCmSoftwarePlatform/composable_kernel";

View file

@ -1,7 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, writeScript
, rocmUpdateScript
, cmake
, rocm-cmake
, rocm-runtime
@ -18,7 +18,7 @@
# CUB can also be used as a backend instead of rocPRIM.
stdenv.mkDerivation (finalAttrs: {
pname = "hipcub";
version = "5.3.3";
version = "5.4.0";
outputs = [
"out"
@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCmSoftwarePlatform";
repo = "hipCUB";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-/GMZKbMD1sZQCM2FulM9jiJQ8ByYZinn0C8d/deFh0g=";
hash = "sha256-ctt7jbVqHNHcOm/Lhg0IFbMZ6JChnMylG7fJgZtzFuM=";
};
nativeBuildInputs = [
@ -76,13 +76,11 @@ stdenv.mkDerivation (finalAttrs: {
rmdir $out/bin
'';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "Thin wrapper library on top of rocPRIM or CUB";

View file

@ -1,7 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, writeScript
, rocmUpdateScript
, cmake
, rocm-cmake
, rocm-runtime
@ -18,7 +18,7 @@
# This can also use cuSPARSE as a backend instead of rocSPARSE
stdenv.mkDerivation (finalAttrs: {
pname = "hipsparse";
version = "5.3.3";
version = "5.4.0";
outputs = [
"out"
@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCmSoftwarePlatform";
repo = "hipSPARSE";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-Phcihat774ZSAe1QetE/GSZzGlnCnvS9GwsHBHCaD4c=";
hash = "sha256-JWjmMvqIm4in1aPq2UgYmL0eWjrrRBiU6vH3FnCZZ40=";
};
nativeBuildInputs = [
@ -112,13 +112,11 @@ stdenv.mkDerivation (finalAttrs: {
rmdir $out/bin
'';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "ROCm SPARSE marshalling library";

View file

@ -2,7 +2,7 @@
, stdenv
, fetchFromGitHub
, fetchurl
, writeScript
, rocmUpdateScript
, pkg-config
, cmake
, rocm-cmake
@ -22,6 +22,7 @@
, boost
, sqlite
, bzip2
, nlohmann_json
, texlive
, doxygen
, sphinx
@ -30,9 +31,13 @@
, buildDocs ? true
, buildTests ? false
# LFS isn't working, so we will manually fetch these
# This isn't strictly required, but is recommended
# This isn't strictly required, but is recommended to enable
# https://github.com/ROCmSoftwarePlatform/MIOpen/issues/1373
, fetchKDBs ? true
#
# MIOpen will produce a very large output due to KDBs fetched
# Also possibly in the future because of KDB generation
# This is disabled by default so we can cache on hydra
, fetchKDBs ? false
, useOpenCL ? false
}:
@ -57,7 +62,7 @@ let
};
in stdenv.mkDerivation (finalAttrs: {
pname = "miopen";
version = "5.3.3";
version = "5.4.0";
outputs = [
"out"
@ -71,7 +76,7 @@ in stdenv.mkDerivation (finalAttrs: {
owner = "ROCmSoftwarePlatform";
repo = "MIOpen";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-5/JitdGJ0afzK4pGOOywRLsB3/Thc6/71sRkKIxf2Lg=";
hash = "sha256-EOe3LUafOeVLzRoahPdS6DMZ/+6WWeVI7jG25zfPrx8=";
};
nativeBuildInputs = [
@ -97,6 +102,7 @@ in stdenv.mkDerivation (finalAttrs: {
boost
sqlite
bzip2
nlohmann_json
] ++ lib.optionals buildDocs [
latex
doxygen
@ -177,13 +183,11 @@ in stdenv.mkDerivation (finalAttrs: {
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
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "Machine intelligence library for ROCm";
@ -191,8 +195,5 @@ in stdenv.mkDerivation (finalAttrs: {
license = with licenses; [ mit ];
maintainers = teams.rocm.members;
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 = [ ];
};
})

View file

@ -1,7 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, writeScript
, rocmUpdateScript
, cmake
, rocm-cmake
, rocm-opencl-runtime
@ -32,7 +32,7 @@ let
};
in stdenv.mkDerivation (finalAttrs: {
pname = "miopengemm";
version = "5.3.3";
version = "5.4.0";
outputs = [
"out"
@ -110,13 +110,11 @@ in stdenv.mkDerivation (finalAttrs: {
patchelf --set-rpath ${lib.makeLibraryPath finalAttrs.buildInputs}:$out/lib $benchmark/bin/*
'';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "OpenCL general matrix multiplication API for ROCm";

View file

@ -1,7 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, writeScript
, rocmUpdateScript
, cmake
, rocm-cmake
, rocm-runtime
@ -16,7 +16,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rccl";
version = "5.3.3";
version = "5.4.0";
outputs = [
"out"
@ -28,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCmSoftwarePlatform";
repo = "rccl";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-whRXGD8oINDYhFs8+hEWKWoGNqacGlyy7xi8peA8Qsk=";
hash = "sha256-NbHzRmrUe4kJwkHZtZ+zHjIy2uk+dpN9caE0L5hUnbc=";
};
nativeBuildInputs = [
@ -72,13 +72,11 @@ stdenv.mkDerivation (finalAttrs: {
rmdir $out/bin
'';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "ROCm communication collectives library";

View file

@ -1,7 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, writeScript
, rocmUpdateScript
, fetchpatch
, cmake
, rocm-cmake
@ -30,13 +30,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocblas";
version = "5.3.3";
version = "5.4.0";
src = fetchFromGitHub {
owner = "ROCmSoftwarePlatform";
repo = "rocBLAS";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-z40WxF+suMeIZihBWJPRWyL20S2FUbeZb5JewmQWOJo=";
hash = "sha256-4art8/KwH2KDLwSYcyzn/m/xwdg5wQQvgHks73aB+60=";
};
# We currently need this patch due to faulty toolchain includes
@ -113,13 +113,11 @@ stdenv.mkDerivation (finalAttrs: {
--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
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "BLAS implementation for ROCm platform";

View file

@ -1,19 +1,19 @@
{ lib, stdenv
, fetchFromGitHub
, fetchpatch
, writeScript
, rocmUpdateScript
, rocm-comgr
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rocclr";
version = "5.3.3";
version = "5.4.0";
src = fetchFromGitHub {
owner = "ROCm-Developer-Tools";
repo = "ROCclr";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-dmL9krI/gHGQdOZ53+bQ7WjKcmJ+fZZP0lzF8ITLT4E=";
hash = "sha256-tYFoGafOsJYnRQaOLAaFix6tPD0QPTidOtOicPxP2Vk=";
};
patches = [
@ -42,12 +42,11 @@ stdenv.mkDerivation (finalAttrs: {
runHook postInstall
'';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "Source package of the Radeon Open Compute common language runtime";

View file

@ -1,7 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, writeScript
, rocmUpdateScript
, cmake
, rocm-cmake
, rocm-runtime
@ -21,7 +21,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocfft";
version = "5.3.3";
version = "5.4.0";
outputs = [
"out"
@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCmSoftwarePlatform";
repo = "rocFFT";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-jb2F1fRe+YLloYJ/KtzrptUDhmdBDBtddeW/g55owKM=";
hash = "sha256-XlpWT6PS+VpJjA4iG8yaiFRxE63kugNG1ZyQXoQVJL8=";
};
nativeBuildInputs = [
@ -98,13 +98,11 @@ stdenv.mkDerivation (finalAttrs: {
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
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "FFT implementation for ROCm ";

View file

@ -1,14 +1,22 @@
{ lib, stdenv, fetchFromGitHub, writeScript, cmake, clang, rocm-device-libs, llvm }:
{ lib
, stdenv
, fetchFromGitHub
, rocmUpdateScript
, cmake
, clang
, rocm-device-libs
, llvm
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rocm-comgr";
version = "5.3.3";
version = "5.4.0";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "ROCm-CompilerSupport";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-LQyMhqcWm8zqt6138fnT7EOq/F8bG3Iuf04PTemVQmg=";
hash = "sha256-qLsrBTeSop7lIQv8gZDwgpvGZJOAq90zsvMi1QpfbAs=";
};
sourceRoot = "source/lib/comgr";
@ -27,12 +35,11 @@ stdenv.mkDerivation (finalAttrs: {
patches = [ ./cmake.patch ];
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "APIs for compiling and inspecting AMDGPU code objects";

View file

@ -1,6 +1,6 @@
{ lib, stdenv
, fetchFromGitHub
, writeScript
, rocmUpdateScript
, cmake
, clang
, llvm
@ -8,13 +8,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocm-device-libs";
version = "5.3.3";
version = "5.4.0";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "ROCm-Device-Libs";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-rKMe0B/pkDek/ZU37trnJNa8aqvlwxobPb1+VTx/bJU=";
hash = "sha256-8gxvgy2GlROxM5qKtZVu5Lxa1FmTIVlBTpfp8rxhNhk=";
};
nativeBuildInputs = [ cmake ];
@ -29,12 +29,11 @@ stdenv.mkDerivation (finalAttrs: {
patches = [ ./cmake.patch ];
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "Set of AMD-specific device-side language runtime libraries";

View file

@ -1,7 +1,7 @@
{ stdenv
, lib
, fetchFromGitHub
, writeScript
, rocmUpdateScript
, addOpenGLRunpath
, cmake
, rocm-cmake
@ -22,13 +22,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocm-opencl-runtime";
version = "5.3.3";
version = "5.4.0";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "ROCm-OpenCL-Runtime";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-QvAF25Zfq9d1M/KIsr2S+Ggxzqw/MQ2OVcm9ZNfjTa8=";
hash = "sha256-E1+Y/fgp5b+7H1LN+O1fwVi0/XRCgvsiSxTY3u/q+8I=";
};
nativeBuildInputs = [ cmake rocm-cmake ];
@ -68,12 +68,11 @@ stdenv.mkDerivation (finalAttrs: {
--replace 'ICD_VENDOR_PATH' '"${addOpenGLRunpath.driverLink}/etc/OpenCL/vendors/"'
'';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "OpenCL runtime for AMD GPUs, part of the ROCm stack";

View file

@ -1,7 +1,7 @@
{ stdenv
, lib
, fetchFromGitHub
, writeScript
, rocmUpdateScript
, addOpenGLRunpath
, cmake
, pkg-config
@ -15,13 +15,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocm-runtime";
version = "5.3.3";
version = "5.4.0";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "ROCR-Runtime";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-26E7vA2JlC50zmpaQfDrFMlgjAqmfTdp9/A8g5caDqI=";
hash = "sha256-M9kv1Oe5ZZfd9H/+KUJUoK9L1EdyS2qRp2mJDK0dnPE=";
};
sourceRoot = "source/src";
@ -48,12 +48,11 @@ stdenv.mkDerivation (finalAttrs: {
rm -rf $out/hsa
'';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "Platform runtime for ROCm";

View file

@ -1,6 +1,7 @@
{ lib, stdenv
{ lib
, stdenv
, fetchFromGitHub
, writeScript
, rocmUpdateScript
, cmake
, pkg-config
, libdrm
@ -9,13 +10,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocm-thunk";
version = "5.3.3";
version = "5.4.0";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "ROCT-Thunk-Interface";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-cM78Bx6uYsxhvdqSVNgmqOUYQnUJVCA7mNpRNNSFv6k=";
hash = "sha256-EU5toaKzVeZpdm/YhaQ0bXq0eoYwYQ5qGLUJzxgZVjE=";
};
preConfigure = ''
@ -37,12 +38,11 @@ stdenv.mkDerivation (finalAttrs: {
cp -r $src/include $out
'';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "Radeon open compute thunk interface";

View file

@ -1,49 +1,57 @@
{ lib
, stdenv
, fetchFromGitHub
, writeScript
, rocmUpdateScript
, cmake
, hip
, clang
, git
, libxml2
, libedit
, python3
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rocmlir";
version = "5.3.3";
version = "5.4.0";
src = fetchFromGitHub {
owner = "ROCmSoftwarePlatform";
repo = "rocMLIR";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-s/5gAH5vh2tgATZemPP66juQFDg8BR2sipzX2Q6pOOQ=";
hash = "sha256-MokE7Ej8mLHTQeLYvKr7PPlsNG6ul91fqfXDlGu5JpI=";
};
nativeBuildInputs = [
cmake
hip
clang
];
buildInputs = [
git
libxml2
libedit
python3
];
cmakeFlags = [
"-DBUILD_FAT_LIBMLIRMIOPEN=ON"
"-DCMAKE_C_COMPILER=clang"
"-DCMAKE_CXX_COMPILER=clang++"
"-DBUILD_FAT_LIBROCKCOMPILER=ON"
];
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
page = "tags?per_page=2";
filter = ".[1].name | split(\"-\") | .[1]";
};
meta = with lib; {
description = "MLIR-based convolution and GEMM kernel generator";
homepage = "https://github.com/ROCmSoftwarePlatform/rocMLIR";
license = with licenses; [ asl20 ];
maintainers = teams.rocm.members;
broken = finalAttrs.version != hip.version;
broken = finalAttrs.version != clang.version;
};
})

View file

@ -1,7 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, writeScript
, rocmUpdateScript
, cmake
, rocm-cmake
, rocm-runtime
@ -16,7 +16,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocprim";
version = "5.3.3";
version = "5.4.0";
outputs = [
"out"
@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCmSoftwarePlatform";
repo = "rocPRIM";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-jfTuGEPyssARpdo0ZnfVJt0MBkoHnmBtf6Zg4xXNJ1U=";
hash = "sha256-VGTrMllQguIJKexdQNXC07KX7TxU/e5oT6VZdlSRcQY=";
};
nativeBuildInputs = [
@ -72,13 +72,11 @@ stdenv.mkDerivation (finalAttrs: {
rmdir $out/bin
'';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "ROCm parallel primitives";

View file

@ -1,7 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, writeScript
, rocmUpdateScript
, cmake
, rocm-cmake
, rocm-runtime
@ -16,7 +16,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocrand";
version = "5.3.3";
version = "5.4.0";
outputs = [
"out"
@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCmSoftwarePlatform";
repo = "rocRAND";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-awQLqPmhVxegrqqSoC8fiCQJ33bPKZlljSAXnHVcIZo=";
hash = "sha256-5kqVLUINYk8WjnRJ+LqUiCPjLIHcbvIL0Z6BRsj9hvY=";
fetchSubmodules = true; # For inline hipRAND
};
@ -75,13 +75,11 @@ stdenv.mkDerivation (finalAttrs: {
rmdir $out/bin
'';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "Generate pseudo-random and quasi-random numbers";

View file

@ -2,7 +2,7 @@
, stdenv
, fetchFromGitHub
, fetchzip
, writeScript
, rocmUpdateScript
, cmake
, rocm-cmake
, rocm-runtime
@ -21,7 +21,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocsparse";
version = "5.3.3";
version = "5.4.0";
outputs = [
"out"
@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCmSoftwarePlatform";
repo = "rocSPARSE";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-1069oBrIpZ4M9CAkzoQ9a5j3WlCXErirTbgTUZuT6b0=";
hash = "sha256-paibzXYvRnd+4yYvteLf7EYmqeqWDc7BoDByfSMrhYo=";
};
nativeBuildInputs = [
@ -134,13 +134,11 @@ stdenv.mkDerivation (finalAttrs: {
mirror2 = "https://www.cise.ufl.edu/research/sparse/MM";
};
updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
};
meta = with lib; {

View file

@ -1,7 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, writeScript
, rocmUpdateScript
, cmake
, rocm-cmake
, rocm-runtime
@ -16,7 +16,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocthrust";
version = "5.3.3";
version = "5.4.0";
# Comment out these outputs until tests/benchmarks are fixed (upstream?)
# outputs = [
@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCmSoftwarePlatform";
repo = "rocThrust";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-WODOeWWL0AOYu0djwDlVZuiJDxcchsAT7BFG9JKYScw=";
hash = "sha256-3OcJUL6T1HJz6TQb1//lumsTxqfwbWbQ4lGuZoKmqbY=";
};
nativeBuildInputs = [
@ -74,13 +74,11 @@ stdenv.mkDerivation (finalAttrs: {
# rmdir $out/bin
# '';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "ROCm parallel algorithm library";

View file

@ -1,7 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, writeScript
, rocmUpdateScript
, cmake
, rocm-cmake
, hip
@ -34,7 +34,7 @@ let
};
in stdenv.mkDerivation (finalAttrs: {
pname = "rocwmma";
version = "5.3.3";
version = "5.4.0";
outputs = [
"out"
@ -50,7 +50,7 @@ in stdenv.mkDerivation (finalAttrs: {
owner = "ROCmSoftwarePlatform";
repo = "rocWMMA";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-wU3R1XGTy7uFbceUyE0wy+XayicuyJIVfd1ih6pbTN0=";
hash = "sha256-HUJPb6IahBgl/v+W4kXludBTNAjRm8k6v0jxKAX+qZM=";
};
patches = lib.optionals buildTests [
@ -121,13 +121,11 @@ in stdenv.mkDerivation (finalAttrs: {
rmdir $out/bin
'';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "Mixed precision matrix multiplication and accumulation";

View file

@ -1,7 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, writeScript
, rocmUpdateScript
, buildPythonPackage
, pyyaml
, msgpack
@ -10,13 +10,13 @@
buildPythonPackage rec {
pname = "tensile";
version = "5.3.3";
version = "5.4.0";
src = fetchFromGitHub {
owner = "ROCmSoftwarePlatform";
repo = "Tensile";
rev = "rocm-${version}";
hash = "sha256-6A7REYdIw/ZmjrJh7B+wCXZMleh4bf04TFpRItPtctA=";
hash = "sha256-W6yr6mptfsiJSSzPCImgqI1EmsUv+l99SjqkoZsOjag=";
};
buildInputs = [
@ -25,13 +25,11 @@ buildPythonPackage rec {
pandas
];
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = pname;
owner = src.owner;
repo = src.repo;
};
meta = with lib; {
description = "GEMMs and tensor contractions";

View file

@ -0,0 +1,27 @@
{ runtimeShell
, writeScript
}:
{ name ? ""
, owner ? ""
, repo ? ""
, page ? "releases?per_page=1"
, filter ? ".[0].tag_name | split(\"-\") | .[1]"
}:
let
updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
version="$(curl ''${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \
-sL "https://api.github.com/repos/${owner}/${repo}/${page}" | jq '${filter}' --raw-output)"
IFS='.' read -a version_arr <<< "$version"
if [ "''${#version_arr[*]}" == 2 ]; then
version="''${version}.0"
fi
update-source-version ${name} "$version" --ignore-same-hash
'';
in [ updateScript ]

View file

@ -1,24 +1,28 @@
{ lib, stdenv, fetchFromGitHub, writeScript, cmake }:
{ lib
, stdenv
, fetchFromGitHub
, rocmUpdateScript
, cmake
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rocm-cmake";
version = "5.3.3";
version = "5.4.0";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "rocm-cmake";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-AOn3SLprHdeo2FwojQdhRAttUHuaWkO6WlymK8Q8lbc=";
hash = "sha256-JarQqiiZ36WV1d6vyQD546GN1EtoKLcdvcZsG3QWD2Y=";
};
nativeBuildInputs = [ cmake ];
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "CMake modules for common build tasks for the ROCm stack";

View file

@ -1,14 +1,27 @@
{ stdenv, lib, fetchFromGitHub, writeScript, fetchpatch, cmake, rocm-runtime, python3, rocm-cmake, busybox, gnugrep
{ stdenv
, lib
, fetchFromGitHub
, rocmUpdateScript
, fetchpatch
, cmake
, rocm-runtime
, python3
, rocm-cmake
, busybox
, gnugrep
# rocminfo requires that the calling user have a password and be in
# the video group. If we let rocm_agent_enumerator rely upon
# rocminfo's output, then it, too, has those requirements. Instead,
# we can specify the GPU targets for this system (e.g. "gfx803" for
# Polaris) such that no system call is needed for downstream
# compilers to determine the desired target.
, defaultTargets ? []}:
, defaultTargets ? []
}:
stdenv.mkDerivation (finalAttrs: {
version = "5.3.3";
version = "5.4.0";
pname = "rocminfo";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "rocminfo";
@ -19,6 +32,7 @@ stdenv.mkDerivation (finalAttrs: {
enableParallelBuilding = true;
nativeBuildInputs = [ cmake ];
buildInputs = [ rocm-cmake rocm-runtime ];
cmakeFlags = [
"-DROCM_DIR=${rocm-runtime}"
"-DROCRTST_BLD_TYPE=Release"
@ -37,12 +51,11 @@ stdenv.mkDerivation (finalAttrs: {
echo '${lib.concatStringsSep "\n" defaultTargets}' > $out/bin/target.lst
'';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "ROCm Application for Reporting System Info";

View file

@ -1,14 +1,20 @@
{ lib, stdenv, fetchFromGitHub, writeScript, cmake, wrapPython }:
{ lib
, stdenv
, fetchFromGitHub
, rocmUpdateScript
, cmake
, wrapPython
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rocm-smi";
version = "5.3.3";
version = "5.4.0";
src = fetchFromGitHub {
owner = "RadeonOpenCompute";
repo = "rocm_smi_lib";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-UbGbkH2vhQ9gv3sSoG+mXap+MdcrP61TN5DcP5F/5nQ=";
hash = "sha256-nkidiDNNU6MGhne9EbYClkODJZw/zZu3LWzlniJKyJE=";
};
nativeBuildInputs = [ cmake wrapPython ];
@ -19,12 +25,11 @@ stdenv.mkDerivation (finalAttrs: {
wrapPythonProgramsIn $out
'';
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
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
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
owner = finalAttrs.src.owner;
repo = finalAttrs.src.repo;
};
meta = with lib; {
description = "System management interface for AMD GPUs supported by ROCm";

View file

@ -15159,7 +15159,9 @@ with pkgs;
rocminfo = callPackage ../development/tools/rocminfo { };
rocmlir = callPackage ../development/libraries/rocmlir { };
rocmlir = callPackage ../development/libraries/rocmlir {
inherit (llvmPackages_rocm) clang;
};
rocprim = callPackage ../development/libraries/rocprim { };
@ -15198,6 +15200,8 @@ with pkgs;
useOpenCL = true;
};
rocmUpdateScript = callPackage ../development/rocm-modules/update-script { };
rtags = callPackage ../development/tools/rtags {
inherit (darwin) apple_sdk;
};