rocmPackages: 7.0.2 -> 7.1.1 (#481349)

This commit is contained in:
Luna
2026-01-25 15:19:39 +00:00
committed by GitHub
50 changed files with 250 additions and 178 deletions
@@ -2,7 +2,6 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
rocmUpdateScript,
cmake,
pkg-config,
@@ -21,12 +20,12 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "amdsmi";
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "rocm";
repo = "amdsmi";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-1xQD68mrG1g9Bpw5/vxn+XxDM5HuAyEHyALyBixqR1s=";
hash = "sha256-BGe3+8YFwu41ZVAF+VtN5Cn9pfzGxmCg/Rpq8qWOEoM=";
};
postPatch = ''
@@ -43,11 +42,9 @@ stdenv.mkDerivation (finalAttrs: {
'';
patches = [
(fetchpatch {
name = "fix-build-with-gcc15.patch";
url = "https://github.com/ROCm/amdsmi/commit/902667db3cafe72e2009287cb96b160854ab9d81.patch";
hash = "sha256-MoOY5q6tQ7Q+bgm/600Etz+cxRk4L2ujkarnBjnfANw=";
})
# Fix error: redefinition of 'struct drm_color_ctm_3x4'
# https://github.com/ROCm/amdsmi/pull/165
./drm-struct-redefinition-fix.patch
];
nativeBuildInputs = [
@@ -0,0 +1,35 @@
From b8b4a6bcfe35ba9539a120cfd16573123ddd9241 Mon Sep 17 00:00:00 2001
From: "Sv. Lockal" <lockalsash@gmail.com>
Date: Mon, 15 Dec 2025 03:46:35 +0800
Subject: [PATCH] Fix compilation with libdrm-2.4.130
Fix error: redefinition of 'struct drm_color_ctm_3x4'.
drm_color_ctm_3x4 structure is now defined in https://github.com/torvalds/linux/commit/e5719e7f19009d4fbedf685fc22eec9cd8de154f#diff-4c51fb416ec7cc69566cd7b795ee57eb070aa1006ad65d6962081f039ffb2718
As this structure is unused and not a part of amdsmi public interface,
it is safe to remove it.
---
include/amd_smi/impl/amdgpu_drm.h | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/include/amd_smi/impl/amdgpu_drm.h b/include/amd_smi/impl/amdgpu_drm.h
index b56a5ac4b..0e483d13b 100644
--- a/include/amd_smi/impl/amdgpu_drm.h
+++ b/include/amd_smi/impl/amdgpu_drm.h
@@ -1625,15 +1625,6 @@ struct drm_amdgpu_info_uq_metadata {
#define AMDGPU_FAMILY_GC_11_5_0 150 /* GC 11.5.0 */
#define AMDGPU_FAMILY_GC_12_0_0 152 /* GC 12.0.0 */
-/* FIXME wrong namespace! */
-struct drm_color_ctm_3x4 {
- /*
- * Conversion matrix with 3x4 dimensions in S31.32 sign-magnitude
- * (not two's complement!) format.
- */
- __u64 matrix[12];
-};
-
#if defined(__cplusplus)
}
#endif
@@ -8,13 +8,13 @@
stdenv.mkDerivation {
pname = "aqlprofile";
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
repo = "aqlprofile";
tag = "rocm-7.0.2";
hash = "sha256-A17SAkEUf3yAGwvZUWSdL7Tn5YAXB0YlD3T1DLTjDSg=";
tag = "rocm-7.1.1";
hash = "sha256-MAZUHo52gb0aZSFnKugMlXxcDkmMwhy1AFF1RDRgRVk=";
};
env.CXXFLAGS = "-DROCP_LD_AQLPROFILE=1";
+7 -15
View File
@@ -70,7 +70,7 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "clr";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -84,7 +84,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "clr";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-zajb/iTtF/ECRScdcQ85HPgq8DdIGqSinJoVyyi89bw=";
hash = "sha256-ofsq1uqMixtum5C6cp/UgTDpgGPfj+rAd6PoDx5iLLw=";
};
nativeBuildInputs = [
@@ -147,14 +147,10 @@ stdenv.mkDerivation (finalAttrs: {
patches = [
./cmake-find-x11-libgl.patch
(fetchpatch {
# [PATCH] improve rocclr isa compatibility check
sha256 = "sha256-/QpB3Wqdhcq6lzyO/zOWzwQC0oYpesCICxnVx5CqbWg=";
url = "https://github.com/GZGavinZhao/clr/commit/733ee38ef8ad5c84926970981821f446dfcb00af.patch";
})
(fetchpatch {
# [PATCH] improve hipamd isa compatibility check
sha256 = "sha256-FvZInw8PqB68ePxAGu45cWT/whD1xmprIA5wZb5OLcE=";
url = "https://github.com/GZGavinZhao/clr/commit/1f0b54ee9b0de08f4dc8cd38b6728928b180048a.patch";
# [PATCH] rocclr: Extend HIP ISA compatibility checks
sha256 = "sha256-InUSIFI1MgkfocBEoZjO2BCgXNyfF10ehh9jkTtAPXs=";
url = "https://github.com/GZGavinZhao/rocm-systems/commit/937dcfdd316b589509c061809186fe5451d22431.patch";
relative = "projects/clr";
})
];
@@ -174,10 +170,6 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace opencl/khronos/icd/loader/icd_platform.h \
--replace-fail '#define ICD_VENDOR_PATH "/etc/OpenCL/vendors/";' \
'#define ICD_VENDOR_PATH "/run/opengl-driver/etc/OpenCL/vendors/";'
# new unbundler has better error messages, defaulting it on
substituteInPlace rocclr/utils/flags.hpp \
--replace-fail "HIP_ALWAYS_USE_NEW_COMGR_UNBUNDLING_ACTION, false" "HIP_ALWAYS_USE_NEW_COMGR_UNBUNDLING_ACTION, true"
'';
postInstall = ''
@@ -245,7 +237,7 @@ stdenv.mkDerivation (finalAttrs: {
"1100"
"1101"
"1102"
# 7.x "1150"
"1150" # Strix Point
"1151" # Strix Halo
# "12-generic"
"1200" # RX 9060
@@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: {
'';
pname = "composable_kernel_base";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -58,7 +58,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "composable_kernel";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-Wql7PD3kg85AFXn7UaTKxhURyDPfVe/OUbR+udrqDc8=";
hash = "sha256-exdkyTIK03dzlCXHm3j8ehEb9NxLOxPX9QyfMsiCgSs=";
};
nativeBuildInputs = [
@@ -333,6 +333,7 @@ outer
"gfx1100"
"gfx1101"
"gfx1102"
"gfx1150"
"gfx1151"
];
gfx12 = scopeForArches [
@@ -9,7 +9,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "half";
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
@@ -7,13 +7,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "hip-common";
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
repo = "HIP";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-9VQrCed5EKVXu41Qrnf2m2jXveWt5Y/SlSxlUmjZS0M=";
hash = "sha256-aI41HdyzyE5HtCbzFmTQYGMiFyQELM/MTVOAbQsg8So=";
};
dontConfigure = true;
@@ -8,13 +8,13 @@
}:
stdenv.mkDerivation (finalAttrs: {
pname = "hipblas-common";
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
repo = "hipBLAS-common";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-NXSMVtfjei4vIjU9y4o3Px/fplq7C7ziY1R8YqnY2LQ=";
hash = "sha256-sswqYIv3c5ArT6dQ3MRru7ZZVA0VxoKW/a0pYTBpjgE=";
};
nativeBuildInputs = [
@@ -24,7 +24,7 @@
# Can also use cuBLAS
stdenv.mkDerivation (finalAttrs: {
pname = "hipblas";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "hipBLAS";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-SoszZBbk8sM3yjgahs1UrPCsEbGmTYTpdOw+Ah/z8H8=";
hash = "sha256-2wDnYZapJ4fU/JZpy6qOf5+DYuatWmCw/hA8WO5x2T0=";
};
postPatch = ''
@@ -43,7 +43,7 @@ let
"gfx950"
"gfx1100"
"gfx1101"
# 7.x "gfx1150"
"gfx1150"
"gfx1151"
"gfx1200"
"gfx1201"
@@ -70,7 +70,7 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "hipblaslt${clr.gpuArchSuffix}";
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
@@ -17,7 +17,7 @@
# CUB can also be used as a backend instead of rocPRIM.
stdenv.mkDerivation (finalAttrs: {
pname = "hipcub";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -33,7 +33,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "hipCUB";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-Vx9h/DTZo7RfQrflVwXOCKiA7rt6dQQw/P/bllgtq8w=";
hash = "sha256-3/499pX7hFKJwbhSEH3/bMhNdyabK36jLv8s5TC2fuw=";
};
nativeBuildInputs = [
@@ -21,7 +21,7 @@
# Can also use cuFFT
stdenv.mkDerivation (finalAttrs: {
pname = "hipfft";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "hipFFT";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-cozwHUlqACq0IM3YToc/xFB694DJ3rPiEPUCTo0xuHY=";
hash = "sha256-6FyI9s6H/lHFhm8aUqB9+vvJ0CRIVWCFLNoJprvsI6o=";
fetchSubmodules = true;
};
@@ -11,13 +11,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "hipfort";
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
repo = "hipfort";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-s/VOaU5IKZYH0Vhtjl/UZTrnpLsJ7zWFTvAJY2x3AcA=";
hash = "sha256-IVLhp8rYtKhkt8K8Mc0qyrp670oKoK0QeclnJjO36pY=";
};
patches = [
@@ -12,13 +12,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "hipify";
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
repo = "HIPIFY";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-xcWUYfZvbTHs4BvDiXAOLONfLiCq9uEGOHSK/hOWg7c=";
hash = "sha256-NbFFHAAvMGpvIryhEbktN5w03Cpay9lEqelqkUT9dpQ=";
};
strictDeps = true;
@@ -14,7 +14,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "hiprand";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "hipRAND";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-yOLdFQ4/OGGfX75A/ElY1xD+4nkcqT8tZx2bQZgXTx4=";
hash = "sha256-yypKwJ5p2aSAqapEHre9eOjjaFAI8Q1dDYWhwfrrdhg=";
};
nativeBuildInputs = [
@@ -21,7 +21,7 @@
# Can also use cuSOLVER
stdenv.mkDerivation (finalAttrs: {
pname = "hipsolver";
version = "7.0.2";
version = "7.1.0";
outputs = [
"out"
@@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "hipSOLVER";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-IZAVdu+VpSrJ/EZXymOzvrGnRLBpxUgVeaj1U+ux02M=";
hash = "sha256-n0+Xy92mBhI2vjB7pFHGt2UgPIHo9rO2ZxGxkz30Otw=";
};
nativeBuildInputs = [
@@ -19,7 +19,7 @@
# This can also use cuSPARSE as a backend instead of rocSPARSE
stdenv.mkDerivation (finalAttrs: {
pname = "hipsparse";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "hipSPARSE";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-hfC+QsOfDNKIZROgTZZsGbAG0yghc27PyVwCDr8MEJ8=";
hash = "sha256-zaMAsLfUYkMUiA2vnGiK0//+vZwugqt5T6xJU4FBrRo=";
};
nativeBuildInputs = [
@@ -33,7 +33,7 @@
}:
let
version = "7.0.2";
version = "7.1.1";
# major version of this should be the clang version ROCm forked from
rocmLlvmVersion = "20.0.0-rocm";
# llvmPackages_base version should match rocmLlvmVersion
@@ -115,7 +115,7 @@ let
owner = "ROCm";
repo = "llvm-project";
rev = "rocm-${version}";
hash = "sha256-gJlDFbCRsiwHgRzmwm36C3WvGfWwgPrtBNUHYmZHTB8=";
hash = "sha256-CfknIRVeR1bCKh1xzXKl3ehVp0kWT0uGrI9C1HTSKVo=";
};
llvmMajorVersion = lib.versions.major rocmLlvmVersion;
# An llvmPackages (pkgs/development/compilers/llvm/) built from ROCm LLVM's source tree
@@ -2,7 +2,6 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
rocmUpdateScript,
pkg-config,
cmake,
@@ -59,7 +58,7 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "migraphx";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -75,13 +74,9 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "AMDMIGraphX";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-P3jiq6i7jpfpL9/S7mc1CiNRwAt8fzy3waHKhyuYIXI=";
hash = "sha256-s6w4bF7koK4wnf6leVKBzwIB4X2ROHa3EgX6XuJIAew=";
};
patches = [
./msgpack-6-compat.patch
];
nativeBuildInputs = [
pkg-config
cmake
@@ -147,7 +142,7 @@ stdenv.mkDerivation (finalAttrs: {
];
postPatch = ''
export CXXFLAGS+=" -w -isystem${rocmlir}/include/rocmlir -I${half}/include -I${lib.getInclude abseil-cpp}/include -I${hipblas-common}/include"
export CXXFLAGS+=" -w -isystem${rocmlir}/include/rocmlir -I${half}/include -I${lib.getInclude abseil-cpp}/include -I${hipblas-common}/include -I${lib.getInclude protobuf}/include"
patchShebangs tools
# `error: '__clang_hip_runtime_wrapper.h' file not found [clang-diagnostic-error]`
@@ -1,29 +0,0 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1dba2c8d..7795ba78 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -358,13 +358,19 @@ target_link_libraries(migraphx PRIVATE nlohmann_json::nlohmann_json)
find_package(SQLite3 REQUIRED)
target_link_libraries(migraphx PRIVATE SQLite::SQLite3)
-find_package(msgpackc-cxx QUIET)
-if(NOT msgpackc-cxx_FOUND)
- find_package(msgpack REQUIRED)
+# See: https://github.com/msgpack/msgpack-c/wiki/Q%26A#how-to-support-both-msgpack-c-c-version-5x-and-6x-
+# Prefer 6.x (msgpack-cxx)
+find_package(msgpack-cxx)
+if(msgpack-cxx_FOUND)
+ message(STATUS "Found msgpack-cxx (>=6.x)")
+else()
+ find_package(msgpackc-cxx REQUIRED NAMES msgpackc-cxx msgpack)
+ message(STATUS "Found msgpackc-cxx (<=5.x)")
+ add_library(msgpack-cxx ALIAS msgpackc-cxx)
endif()
-target_link_libraries(migraphx PRIVATE msgpackc-cxx)
+target_link_libraries(migraphx PRIVATE msgpack-cxx)
# Make this available to the tests
-target_link_libraries(migraphx INTERFACE $<BUILD_INTERFACE:msgpackc-cxx>)
+target_link_libraries(migraphx INTERFACE $<BUILD_INTERFACE:msgpack-cxx>)
add_library(migraphx_all_targets INTERFACE)
@@ -43,7 +43,7 @@
let
# FIXME: cmake files need patched to include this properly
cFlags = "-Wno-documentation-pedantic --offload-compress -I${hipblas-common}/include -I${hipblas}/include -I${roctracer}/include -I${nlohmann_json}/include -I${sqlite.dev}/include -I${rocrand}/include";
version = "7.0.2";
version = "7.1.1";
# Targets outside this list will get
# error: use of undeclared identifier 'CK_BUFFER_RESOURCE_3RD_DWORD'
@@ -69,7 +69,7 @@ let
owner = "ROCm";
repo = "MIOpen";
rev = "rocm-${version}";
hash = "sha256-PJj2LzU5naAku+FOnMl+Ymad2beYYSS81/K/CR+l2UA=";
hash = "sha256-g0AEpuUiwKCu/doiRh9mW34W04m4ynHoarSyl6tR/aE=";
fetchLFS = true;
fetchSubmodules = true;
# WORKAROUND: .lfsconfig is incorrectly set to exclude everything upstream
@@ -40,13 +40,13 @@ stdenv.mkDerivation (finalAttrs: {
"cpu"
);
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
repo = "MIVisionX";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-SO0rE86UmX9f574ALdnnBDFceKGKTvJDQ8Lf7iSlJtA=";
hash = "sha256-aC6GUPK6ZSOAx+PHHB4gLPNAG5U/kapqX7YWilusDw8=";
};
patches = [
@@ -40,7 +40,7 @@ in
# infiniband ib_peer_mem support isn't in the mainline kernel but is carried by some distros
stdenv.mkDerivation (finalAttrs: {
pname = "rccl${clr.gpuArchSuffix}";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -58,9 +58,11 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "rccl";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-ByKz6TNdGVbh65ZH5PtgUbAj4qNVmOBmZ9SrOjkTbWU=";
hash = "sha256-3u7D3Gre1n+4Lf+cK+RMfCUM9c46pXZjdhGOrwIKM0w=";
};
requiredSystemFeatures = [ "big-parallel" ]; # Very resource intensive LTO
nativeBuildInputs = [
cmake
rocm-cmake
@@ -49,7 +49,7 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "rdc";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -65,7 +65,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "rdc";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-ztInmK3oCbvnLe7XQ55/hUHRyhuZ2M2XVTG1NcVHtGs=";
hash = "sha256-oJS0fBeISpgjZkaMfFl/Yq7mPOsdaZDqiRjSPv7kT1Q=";
};
patches = [
@@ -22,7 +22,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocalution";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "rocALUTION";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-/Tcb11/63MWnUTyigDrL2slwqL8C553hG5OKRYZan7s=";
hash = "sha256-UkXbcbhaTulCqW1FZHwTyUZLFSnj7WmLYqlPqu5m6YM=";
};
nativeBuildInputs = [
@@ -40,13 +40,13 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "rocblas${clr.gpuArchSuffix}";
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
repo = "rocBLAS";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-528jAdhWtZbbw76dfUgpMr5px0T7q4Oj76jp0z0lh3A=";
hash = "sha256-obKypbYmnSeOtOr7g0pxOz02YfzZ0bGugTtznkeHz14=";
};
outputs = [ "out" ] ++ lib.optional buildBenchmarks "benchmark" ++ lib.optional buildTests "test";
@@ -92,7 +92,8 @@ stdenv.mkDerivation (finalAttrs: {
env.CXXFLAGS = "-fopenmp -I${lib.getDev boost}/include -I${hipblas-common}/include -I${roctracer}/include";
# Fails to link tests with undefined symbol: cblas_*
env.LDFLAGS = lib.optionalString (buildTests || buildBenchmarks) "-Wl,--as-needed -lcblas";
env.LDFLAGS =
"-Wl,--as-needed -lzstd" + lib.optionalString (buildTests || buildBenchmarks) " -lcblas";
env.TENSILE_ROCM_ASSEMBLER_PATH = "${stdenv.cc}/bin/clang++";
cmakeFlags = [
@@ -47,7 +47,7 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "rocdbgapi";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -56,11 +56,13 @@ stdenv.mkDerivation (finalAttrs: {
"doc"
];
buildFlags = lib.optionals buildDocs [ "doc" ];
src = fetchFromGitHub {
owner = "ROCm";
repo = "ROCdbgapi";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-adzHfTd4O59YKqkPL1oZnM8qiuGjlWefbl50MI2Z7co=";
hash = "sha256-RwYZJPwGhNtSSvmSgy0AsNTc98cav0/u9jH5f93sB9M=";
};
nativeBuildInputs = [
@@ -89,12 +91,8 @@ stdenv.mkDerivation (finalAttrs: {
"-DCMAKE_INSTALL_INCLUDEDIR=include"
];
# Unfortunately, it seems like we have to call make on this manually
postBuild = lib.optionalString buildDocs ''
make -j$NIX_BUILD_CORES doc
'';
postInstall = lib.optionalString buildDocs ''
mkdir -p $doc/share/doc/amd-dbgapi/
mv $out/share/html/amd-dbgapi $doc/share/doc/amd-dbgapi/html
rmdir $out/share/html
'';
@@ -106,7 +104,7 @@ stdenv.mkDerivation (finalAttrs: {
};
meta = {
description = "Debugger support for control of execution and inspection state";
description = "Debugger support for control of execution and inspection state of AMD's GPU architectures";
homepage = "https://github.com/ROCm/ROCdbgapi";
license = with lib.licenses; [ mit ];
teams = [ lib.teams.rocm ];
@@ -20,13 +20,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocfft${clr.gpuArchSuffix}";
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
repo = "rocFFT";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-VVRZSmMma/sjSj2obRrwP118v/FasS30ZU0nFsEp9rw=";
hash = "sha256-1Ho3b5NmnzfLhDnvH6FECigs6OgpbJrxw4EnqKyaHA0=";
};
nativeBuildInputs = [
@@ -23,13 +23,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocgdb";
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
repo = "ROCgdb";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-IYdhYYJGTXBIftTEpvi+lvdhtYgdFWSpdNbtTBh0l9s=";
hash = "sha256-LDVGO++voqwVMM6RcRtgbXTUvFLTyg/TFdSZanv5Xdc=";
};
nativeBuildInputs = [
@@ -9,13 +9,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocm-cmake";
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
repo = "rocm-cmake";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-Gu+w+2dXKXcJtdmpODByxQaZbYMkoAeX9/0tOcGy5Es=";
hash = "sha256-im6UO0crO0Jc27zkTsdvJYPHit8IGlw/vDPGrmP1XqY=";
};
nativeBuildInputs = [ cmake ];
@@ -17,13 +17,13 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "rocm-core";
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
repo = "rocm-core";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-TKHNtY3XoLznOi1aVHdxFk3bedtLKkrFy0NVm0ad6ZY=";
hash = "sha256-3WQPR7v7LRoo4ioCXzkUEqnJdXA3uxSgoZZQvEG5Gqg=";
};
patches = [
@@ -24,14 +24,14 @@
# FIXME: Move to rocmPackages_common
buildPythonPackage rec {
pname = "rocm-docs-core";
version = "1.23.0";
version = "1.31.3";
pyproject = true;
src = fetchFromGitHub {
owner = "ROCm";
repo = "rocm-docs-core";
rev = "v${version}";
hash = "sha256-5Qh83eJ9vju/uUb9gGA4B5Bh1WZCygIRbSnaEZzIdbw=";
hash = "sha256-N9wqu83fPQGgOSDdb4yXmfxfDxkevk6QA31vLl5sYHo=";
};
buildInputs = [ setuptools ];
@@ -16,13 +16,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocm-runtime";
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
repo = "ROCR-Runtime";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-oz2UCR4XEhNm1uDlCeDnDJrmysWKA6GKxlEuFu21es0=";
hash = "sha256-gqe1trGc/Cu1XFA4aYjOzFurUgebLbdTHEJi4iw2+kk=";
};
cmakeBuildType = "RelWithDebInfo";
@@ -53,21 +53,14 @@ stdenv.mkDerivation (finalAttrs: {
];
patches = [
# Vendored upstream PR for fix for segfault when queue allocation fails
# https://github.com/ROCm/rocm-systems/pull/2850
./queue-failure.patch
(fetchpatch {
# rocr: Extend HIP ISA compatibility check
# [PATCH] rocr: Extend HIP ISA compatibility check
sha256 = "sha256-8r2Lb5lBfFaZC3knCxfXGcnkzNv6JxOKyJn2rD5gus4=";
url = "https://github.com/GZGavinZhao/ROCR-Runtime/commit/7c63e7185d8fcf08537a278908946145f6231121.patch";
})
# Patches for UB at runtime https://github.com/ROCm/ROCR-Runtime/issues/272
(fetchpatch {
# [PATCH] queues: fix UB due to 1 << 31
url = "https://github.com/ROCm/ROCR-Runtime/commit/9b8a0f5dbee1903fa990a7d8accc1c5fbc549636.patch";
hash = "sha256-KlZWjfngH8yKly08iwC+Bzpvp/4dkaTpRIKdFYwRI+U=";
})
(fetchpatch {
# [PATCH] topology: fix UB due to 1 << 31
url = "https://github.com/ROCm/ROCR-Runtime/commit/d1d00bfee386d263e13c2b64fb6ffd1156deda7c.patch";
hash = "sha256-u70WEZaphQ7qTfgQPFATwdKWtHytu7CFH7Pzv1rOM8w=";
url = "https://github.com/GZGavinZhao/rocm-systems/commit/c13cd118fcc8e0bc9ae8de62897542dca7352b71.patch";
relative = "projects/rocr-runtime";
})
(fetchpatch {
# [PATCH] kfd_ioctl: fix UB due to 1 << 31
@@ -0,0 +1,71 @@
From b7717446c85d08b2d7c0c60ba3ac0eff11ee6120 Mon Sep 17 00:00:00 2001
From: Luna Nova <git@lunnova.dev>
Date: Tue, 20 Jan 2026 12:55:45 -0800
Subject: [PATCH 1/2] rocm-runtime: fix crash in QueueCreate due to trying to
free non allocated scratch
if (scratch.main_queue_base != nullptr) before calling ReleaseQueueMainScratch
because ReleaseQueueMainScratch is only valid if main_queue_base is set
and the scope guard can fire for an error allocating the queue.
---
.../runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp
index 01b01fe869..83db40dacc 100644
--- a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp
+++ b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp
@@ -1792,7 +1792,9 @@ hsa_status_t GpuAgent::QueueCreate(size_t size, hsa_queue_type32_t queue_type, u
scratch.main_queue_base = nullptr;
scratch.main_queue_process_offset = 0;
- MAKE_NAMED_SCOPE_GUARD(scratchGuard, [&]() { ReleaseQueueMainScratch(scratch); });
+ MAKE_NAMED_SCOPE_GUARD(scratchGuard, [&]() {
+ if (scratch.main_queue_base != nullptr) ReleaseQueueMainScratch(scratch);
+ });
if (scratch.main_size != 0) {
AcquireQueueMainScratch(scratch);
--
2.52.0
From 9c1746cd76a703e4d2321dc2ffe85fc61bfd2f21 Mon Sep 17 00:00:00 2001
From: Luna Nova <git@lunnova.dev>
Date: Tue, 20 Jan 2026 13:00:32 -0800
Subject: [PATCH 2/2] rocm-runtime: log for errors in QueueCreate
---
.../runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp
index 83db40dacc..ae68732eb5 100644
--- a/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp
+++ b/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp
@@ -1799,6 +1799,9 @@ hsa_status_t GpuAgent::QueueCreate(size_t size, hsa_queue_type32_t queue_type, u
if (scratch.main_size != 0) {
AcquireQueueMainScratch(scratch);
if (scratch.main_queue_base == nullptr) {
+ LogPrint(HSA_AMD_LOG_FLAG_INFO,
+ "Failed to allocate scratch memory for queue, size=%zu, node=%u",
+ scratch.main_size, node_id());
return HSA_STATUS_ERROR_OUT_OF_RESOURCES;
}
}
@@ -1827,7 +1830,11 @@ hsa_status_t GpuAgent::QueueCreate(size_t size, hsa_queue_type32_t queue_type, u
node_id()));
}
- if (!shared_queue) return HSA_STATUS_ERROR_OUT_OF_RESOURCES;
+ if (!shared_queue) {
+ LogPrint(HSA_AMD_LOG_FLAG_INFO,
+ "Failed to allocate shared queue descriptor memory, node=%u", node_id());
+ return HSA_STATUS_ERROR_OUT_OF_RESOURCES;
+ }
auto aql_queue = new AqlQueue(shared_queue, this, size, node_id(), scratch, event_callback, data,
flags);
--
2.52.0
@@ -11,13 +11,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocm-smi";
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
repo = "rocm_smi_lib";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-LzWKWiHmMDGO2ejvcT0BBg22HbYD9q0fxK/bq6JvcnQ=";
hash = "sha256-/3to1+45n+D8snwrFVhApSMWp/rIXmTFK+BiA0mcKZo=";
};
propagatedBuildInputs = [
@@ -12,14 +12,14 @@
}:
stdenv.mkDerivation (finalAttrs: {
version = "7.0.2";
version = "7.1.1";
pname = "rocminfo";
src = fetchFromGitHub {
owner = "ROCm";
repo = "rocminfo";
rev = "rocm-${finalAttrs.version}";
sha256 = "sha256-wE1/golRQm5uggXRQ1BucxV3laypSOUCvjTFx5N2yTE=";
sha256 = "sha256-SuW34m2ep69+dj1rb0vqfQcK83FBtjlMLqSMCUZltU4=";
};
strictDeps = true;
@@ -8,6 +8,9 @@
clr,
libxml2,
libedit,
rocm-comgr,
rocm-device-libs,
rocm-runtime,
zstd,
zlib,
ncurses,
@@ -39,7 +42,7 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "rocmlir${suffix}";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -52,10 +55,11 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "rocMLIR";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-0+vZ/Lkh1fC9oKyy83YjIX4xuMJEWErd8UpZZuaaXdI=";
hash = "sha256-A9vUvsEZrZlNEW4cscF66L48rJQ1zJYmIzwXQ2QzJ3s=";
};
nativeBuildInputs = [
clr
cmake
rocm-cmake
python3Packages.python
@@ -65,6 +69,9 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [
libxml2
libedit
rocm-comgr
rocm-runtime
rocm-device-libs
];
propagatedBuildInputs = [
@@ -74,23 +81,28 @@ stdenv.mkDerivation (finalAttrs: {
];
cmakeFlags = [
"-DLLVM_TARGETS_TO_BUILD=AMDGPU;${llvmNativeTarget}"
"-DCMAKE_BUILD_TYPE=Release"
"-DLLVM_USE_LINKER=lld"
"-DLLVM_ENABLE_ZSTD=FORCE_ON"
"-DLLVM_ENABLE_ZLIB=FORCE_ON"
"-DLLVM_ENABLE_LIBCXX=ON"
"-DLLVM_ENABLE_TERMINFO=ON"
"-DROCM_PATH=${clr}"
(lib.cmakeFeature "LLVM_TARGETS_TO_BUILD" "AMDGPU${
lib.optionalString (!buildRockCompiler) ";${llvmNativeTarget}"
}")
(lib.cmakeFeature "LLVM_USE_LINKER" "lld")
(lib.cmakeFeature "LLVM_ENABLE_ZSTD" "FORCE_ON")
(lib.cmakeFeature "LLVM_ENABLE_ZLIB" "FORCE_ON")
(lib.cmakeBool "LLVM_ENABLE_LIBCXX" true)
(lib.cmakeBool "LLVM_ENABLE_TERMINFO" true)
(lib.cmakeFeature "ROCM_PATH" "${clr}")
# Manually define CMAKE_INSTALL_<DIR>
# See: https://github.com/NixOS/nixpkgs/pull/197838
"-DCMAKE_INSTALL_BINDIR=bin"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
(lib.cmakeFeature "CMAKE_INSTALL_BINDIR" "bin")
(lib.cmakeFeature "CMAKE_INSTALL_LIBDIR" "lib")
(lib.cmakeFeature "CMAKE_INSTALL_INCLUDEDIR" "include")
(lib.cmakeBool "MLIR_ENABLE_ROCM_RUNNER" (!buildRockCompiler))
(lib.cmakeBool "BUILD_FAT_LIBROCKCOMPILER" buildRockCompiler)
]
++ lib.optionals buildRockCompiler [
(lib.cmakeBool "LLVM_INCLUDE_TESTS" false)
]
++ lib.optionals (!buildRockCompiler) [
"-DROCM_TEST_CHIPSET=gfx000"
(lib.cmakeFeature "ROCM_TEST_CHIPSET" "gfx900")
];
postPatch = ''
@@ -15,7 +15,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocprim";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "rocPRIM";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-uOlrN/FvEBBCHsPeJOWs9NNqVwrcxVExfs5wp03PH0U=";
hash = "sha256-/O6aEF23IaUSVzEDRqIlpYpxNCSTa/CwVDgXOhvTrQc=";
};
nativeBuildInputs = [
@@ -18,13 +18,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocprofiler-register";
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
repo = "rocprofiler-register";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-hK7k4tg7/5rYCSTFKsFRsRYfVevkCARcDyxlexrXbts=";
hash = "sha256-XlBz5rDMvnPxyCiqpEpIUWzbHJ1BbMzeCJTrP5kKf+w=";
fetchSubmodules = true;
};
@@ -44,13 +44,13 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "rocprofiler";
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
repo = "rocprofiler";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-p2VwMm9Ltx/SFDIFk42nY9Too0Rp/IrqfuH8cQnhoGA=";
hash = "sha256-V+E+6D/mBW/NVdHSBVUVMG5Z/QOF73vfZ5rryW2VBtI=";
fetchSubmodules = true;
};
@@ -12,13 +12,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocr-debug-agent";
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
repo = "rocr_debug_agent";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-twoihis1OrCQ4K3rjDgjSErq+qktqz2xwkLLxBJIJ90=";
hash = "sha256-zW92HyK4nGcDaJxmBaHeURAivs6dU059WxaywL6dAk4=";
};
nativeBuildInputs = [
@@ -15,7 +15,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocrand${clr.gpuArchSuffix}";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "rocRAND";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-O7YCQBtFSa0xiHbbAXX2FyE6uRywEaMaJyX85875Yd0=";
hash = "sha256-QhHxpjr3SqeSSMS4QmnDq8zIxEeUtrgwb9JG84jfJgY=";
};
nativeBuildInputs = [
@@ -27,6 +27,7 @@
"gfx1100"
"gfx1101"
"gfx1102"
"gfx1150"
"gfx1151"
"gfx1200"
"gfx1201"
@@ -36,7 +37,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocsolver${clr.gpuArchSuffix}";
version = "7.0.2";
version = "7.1.0";
outputs = [
"out"
@@ -52,7 +53,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "rocSOLVER";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-/JFGqNA4weVgFuVtszYAxq65/+oZjiKC8zSxwvp964M=";
hash = "sha256-U5RrV90UZiIUgLYleLJ6rFHWRFMQNyh3zezRusj7T0M=";
};
nativeBuildInputs = [
@@ -19,7 +19,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocsparse${clr.gpuArchSuffix}";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "rocSPARSE";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-0KFzrVGScCQDbOdlX016ymZ4lgCimd9XK4auK9V5p3k=";
hash = "sha256-ZNeFslIQZlFCNqWHmrpcxDuOvVu1cjiEd8b6ZNXcZzo=";
};
nativeBuildInputs = [
@@ -15,7 +15,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocthrust";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "rocThrust";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-tbGEZ8NXu7euPN8CaRYOjcmTmYq1SUP7LNKOjO0RICE=";
hash = "sha256-Gncy0wvN8M4JSmnjbxaED+M9rLo4A/7LCCq/6temiZU=";
};
nativeBuildInputs = [
@@ -19,7 +19,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "roctracer";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "roctracer";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-8DMwaMtzdBuAAV5KhQfqLfTtSyvPiwZxc1lAAoeXGus=";
hash = "sha256-LCtdPnE+rJU/ccI1PTFDMPNXxgl1GrRgc5z7LjOw3zA=";
};
nativeBuildInputs = [
@@ -19,7 +19,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "rocwmma";
version = "7.0.2";
version = "7.1.1";
outputs = [
"out"
@@ -38,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "ROCm";
repo = "rocWMMA";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-xCLoYvbKiAgAxDCbEopNxYBs3V3EJBmO3NpONiveXvE=";
hash = "sha256-6hvdq3J8UhldcyNqXxi9UEF+P0RgG8o5YdIZLzvpgXw=";
};
patches = lib.optionals (buildTests || buildBenchmarks) [
@@ -29,13 +29,13 @@ stdenv.mkDerivation (finalAttrs: {
"cpu"
);
version = "7.0.2";
version = "7.1.1";
src = fetchFromGitHub {
owner = "ROCm";
repo = "rpp";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-oysmF9TS1tm37x9DNoZ2KqHKP1wJDoFY+IuL1WkIz0o=";
hash = "sha256-ZlJRV57ybPsczvoWwd5vr2n7EKje0vj2GJYsvVY+qas=";
};
nativeBuildInputs = [
@@ -56,6 +56,9 @@ stdenv.mkDerivation (finalAttrs: {
cmakeFlags = [
"-DROCM_PATH=${clr}"
"-DCMAKE_INSTALL_BINDIR=bin"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
]
++ lib.optionals (gpuTargets != [ ]) [
"-DAMDGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}"
@@ -18,14 +18,14 @@
buildPythonPackage rec {
pname = "tensile";
version = "7.0.2";
version = "7.1.1";
pyproject = true;
src = fetchFromGitHub {
owner = "ROCm";
repo = "Tensile";
rev = "rocm-${version}";
hash = "sha256-1G6qp/VBJL67QW9t2VB5KK5lwn+PbY0hqHq8DzyK2fg=";
hash = "sha256-uYLlbtXrc8m8/RpMbP7WaS7VYGIUm2LHYzv00DZAzvE=";
};
# TODO: It should be possible to run asm caps test ONCE for all supported arches