From 58ec2660295ed761e9fbd0d164168af3528419a5 Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Fri, 26 Dec 2025 09:17:50 -0800 Subject: [PATCH 01/12] makeImpureTest: preserve NIXPKGS_ALLOW_UNFREE env var in sudo call --- pkgs/build-support/make-impure-test.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/make-impure-test.nix b/pkgs/build-support/make-impure-test.nix index 3a462964b3d2..10dd7ef1867e 100644 --- a/pkgs/build-support/make-impure-test.nix +++ b/pkgs/build-support/make-impure-test.nix @@ -92,7 +92,7 @@ let ${prepareRunCommands} - sudo nix-build --option extra-sandbox-paths '${sandboxPathsList}' ${lib.escapeShellArgs nixFlags} -A ${testPath} "$@" + sudo --preserve-env=NIXPKGS_ALLOW_UNFREE nix-build --option extra-sandbox-paths '${sandboxPathsList}' ${lib.escapeShellArgs nixFlags} -A ${testPath} "$@" ''; in # The main output is the run script, inject the derivation for the actual test From fc1f8110e84b7a874826eee147170aee85082390 Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Wed, 17 Sep 2025 17:24:38 -0700 Subject: [PATCH 02/12] rocmPackages: 6.4.3 -> 7.0.1 --- .../manual/release-notes/rl-2605.section.md | 2 + .../magma/magma-hipblas-v2-buildflags.patch | 26 +++ pkgs/by-name/ma/magma/package.nix | 47 ++++- .../avoid-extra-host-compile.patch | 40 ---- ...ra-definition-of-hipBinUtilPtr_-in-d.patch | 39 ---- .../6/rccl/enable-mscclpp-on-all-gfx9.diff | 13 -- .../6/rccl/fix-mainline-support-and-ub.diff | 172 ------------------ .../rocm-modules/6/rocm-smi/cmake.patch | 89 --------- .../rocm-modules/{6 => }/amdsmi/default.nix | 9 +- .../rocm-modules/{6 => }/aotriton/default.nix | 0 .../{6 => }/aqlprofile/default.nix | 2 +- .../{6 => }/clr/cmake-find-x11-libgl.patch | 0 .../rocm-modules/{6 => }/clr/default.nix | 25 +-- .../{6 => }/clr/test-opencl-example.nix | 2 +- .../{6 => }/clr/test-rocm-smi.nix | 2 +- .../{6 => }/composable_kernel/base.nix | 51 +++--- .../{6 => }/composable_kernel/ck4inductor.nix | 2 +- .../{6 => }/composable_kernel/default.nix | 35 +++- .../rocm-modules/{6 => }/default.nix | 1 + .../rocm-modules/{6 => }/half/default.nix | 4 +- .../{6 => }/hip-common/default.nix | 4 +- .../{6 => }/hipblas-common/default.nix | 4 +- .../rocm-modules/{6 => }/hipblas/default.nix | 15 +- .../{6 => }/hipblaslt/Tensile-interning.patch | 0 .../TensileCreateLibrary-refactor.patch | 0 .../{6 => }/hipblaslt/default.nix | 2 +- .../messagepack-compression-support.patch | 0 .../parallel-buildSourceCodeObjectFile.diff | 0 .../rocm-modules/{6 => }/hipcc/default.nix | 6 - .../rocm-modules/{6 => }/hipcub/default.nix | 4 +- .../rocm-modules/{6 => }/hipfft/default.nix | 4 +- .../rocm-modules/{6 => }/hipfort/default.nix | 4 +- .../rocm-modules/{6 => }/hipify/default.nix | 6 +- .../rocm-modules/{6 => }/hiprand/default.nix | 4 +- .../rocm-modules/{6 => }/hiprt/default.nix | 0 .../{6 => }/hipsolver/default.nix | 4 +- .../{6 => }/hipsparse/default.nix | 4 +- .../clang-bodge-ignore-systemwide-incls.diff | 0 .../{6 => }/llvm/clang-log-jobs.diff | 0 .../rocm-modules/{6 => }/llvm/default.nix | 72 ++------ .../opt-offload-compress-on-by-default.patch | 0 .../llvm/perf-increase-namestring-size.patch | 0 .../perf-shorten-gcclib-include-paths.patch | 0 .../rocm-modules/{6 => }/migraphx/default.nix | 10 +- .../{6 => }/migraphx/msgpack-6-compat.patch | 0 .../rocm-modules/{6 => }/miopen/default.nix | 6 +- .../{6 => }/miopen/skip-preexisting-dbs.patch | 0 .../test-frugally-deep-model-loading.cpp | 0 .../test-frugally-deep-model-loading.nix | 0 ...ONSTANT_MACROS-to-make-rocAL-compile.patch | 0 .../{6 => }/mivisionx/default.nix | 4 +- .../rocm-modules/{6 => }/mscclpp/default.nix | 0 .../rocm-modules/{6 => }/rccl/default.nix | 8 +- .../rccl/fix_hw_reg_hw_id_gt_gfx10.patch | 0 .../rccl/rccl-test-missing-iomanip.diff | 0 .../rocm-modules/{6 => }/rdc/default.nix | 4 +- .../{6 => }/release-attrPaths-gen.nix | 0 .../{6 => }/release-attrPaths-gen.sh | 0 .../{6 => }/release-attrPaths.json | 0 .../{6 => }/rocalution/default.nix | 4 +- .../rocm-modules/{6 => }/rocblas/default.nix | 24 ++- .../rocblas/hiplaslt-unstable-compat.patch | 0 .../{6 => }/rocdbgapi/default.nix | 4 +- .../rocm-modules/{6 => }/rocfft/default.nix | 4 +- .../{6 => }/rocfft/log-every-n-aot-jobs.patch | 0 .../rocm-modules/{6 => }/rocgdb/default.nix | 4 +- .../{6 => }/rocm-bandwidth-test/default.nix | 0 .../{6 => }/rocm-cmake/default.nix | 4 +- .../{6 => }/rocm-comgr/default.nix | 0 .../{6 => }/rocm-core/default.nix | 4 +- .../{6 => }/rocm-core/env-rocm-path.patch | 0 .../{6 => }/rocm-device-libs/cmake.patch | 0 .../{6 => }/rocm-device-libs/default.nix | 0 .../{6 => }/rocm-docs-core/default.nix | 0 .../{6 => }/rocm-runtime/default.nix | 15 +- .../remove-hsa-aqlprofile-dep.patch | 0 .../rocm-modules/{6 => }/rocm-smi/default.nix | 9 +- .../{6 => }/rocm-tests/default.nix | 0 .../rocm-modules/{6 => }/rocminfo/default.nix | 4 +- .../rocm-modules/{6 => }/rocmlir/default.nix | 4 +- .../rocm-modules/{6 => }/rocprim/default.nix | 4 +- .../{6 => }/rocprofiler-register/default.nix | 10 +- .../{6 => }/rocprofiler/default.nix | 4 +- .../{6 => }/rocr-debug-agent/default.nix | 6 +- .../rocm-modules/{6 => }/rocrand/default.nix | 4 +- .../{6 => }/rocsolver/default.nix | 4 +- .../{6 => }/rocsparse/default.nix | 4 +- .../rocm-modules/{6 => }/rocsparse/deps.nix | 0 .../{6 => }/rocthrust/default.nix | 4 +- .../{6 => }/roctracer/default.nix | 4 +- .../rocwmma/0000-dont-fetch-googletest.patch | 0 .../rocm-modules/{6 => }/rocwmma/default.nix | 4 +- .../rocm-modules/{6 => }/rpp/default.nix | 4 +- .../rocm-modules/{6 => }/tensile/default.nix | 8 +- ...ensile-create-library-dont-copy-twice.diff | 0 .../tensile-solutionstructs-perf-fix.diff | 0 .../rocm-modules/{6 => }/update.nix | 6 +- pkgs/top-level/all-packages.nix | 3 +- 98 files changed, 259 insertions(+), 616 deletions(-) create mode 100644 pkgs/by-name/ma/magma/magma-hipblas-v2-buildflags.patch delete mode 100644 pkgs/development/rocm-modules/6/composable_kernel/avoid-extra-host-compile.patch delete mode 100644 pkgs/development/rocm-modules/6/hipcc/0001-hipcc-Remove-extra-definition-of-hipBinUtilPtr_-in-d.patch delete mode 100644 pkgs/development/rocm-modules/6/rccl/enable-mscclpp-on-all-gfx9.diff delete mode 100644 pkgs/development/rocm-modules/6/rccl/fix-mainline-support-and-ub.diff delete mode 100644 pkgs/development/rocm-modules/6/rocm-smi/cmake.patch rename pkgs/development/rocm-modules/{6 => }/amdsmi/default.nix (88%) rename pkgs/development/rocm-modules/{6 => }/aotriton/default.nix (100%) rename pkgs/development/rocm-modules/{6 => }/aqlprofile/default.nix (96%) rename pkgs/development/rocm-modules/{6 => }/clr/cmake-find-x11-libgl.patch (100%) rename pkgs/development/rocm-modules/{6 => }/clr/default.nix (88%) rename pkgs/development/rocm-modules/{6 => }/clr/test-opencl-example.nix (97%) rename pkgs/development/rocm-modules/{6 => }/clr/test-rocm-smi.nix (91%) rename pkgs/development/rocm-modules/{6 => }/composable_kernel/base.nix (80%) rename pkgs/development/rocm-modules/{6 => }/composable_kernel/ck4inductor.nix (98%) rename pkgs/development/rocm-modules/{6 => }/composable_kernel/default.nix (90%) rename pkgs/development/rocm-modules/{6 => }/default.nix (99%) rename pkgs/development/rocm-modules/{6 => }/half/default.nix (89%) rename pkgs/development/rocm-modules/{6 => }/hip-common/default.nix (90%) rename pkgs/development/rocm-modules/{6 => }/hipblas-common/default.nix (90%) rename pkgs/development/rocm-modules/{6 => }/hipblas/default.nix (83%) rename pkgs/development/rocm-modules/{6 => }/hipblaslt/Tensile-interning.patch (100%) rename pkgs/development/rocm-modules/{6 => }/hipblaslt/TensileCreateLibrary-refactor.patch (100%) rename pkgs/development/rocm-modules/{6 => }/hipblaslt/default.nix (99%) rename pkgs/development/rocm-modules/{6 => }/hipblaslt/messagepack-compression-support.patch (100%) rename pkgs/development/rocm-modules/{6 => }/hipblaslt/parallel-buildSourceCodeObjectFile.diff (100%) rename pkgs/development/rocm-modules/{6 => }/hipcc/default.nix (84%) rename pkgs/development/rocm-modules/{6 => }/hipcub/default.nix (95%) rename pkgs/development/rocm-modules/{6 => }/hipfft/default.nix (96%) rename pkgs/development/rocm-modules/{6 => }/hipfort/default.nix (95%) rename pkgs/development/rocm-modules/{6 => }/hipify/default.nix (88%) rename pkgs/development/rocm-modules/{6 => }/hiprand/default.nix (94%) rename pkgs/development/rocm-modules/{6 => }/hiprt/default.nix (100%) rename pkgs/development/rocm-modules/{6 => }/hipsolver/default.nix (96%) rename pkgs/development/rocm-modules/{6 => }/hipsparse/default.nix (98%) rename pkgs/development/rocm-modules/{6 => }/llvm/clang-bodge-ignore-systemwide-incls.diff (100%) rename pkgs/development/rocm-modules/{6 => }/llvm/clang-log-jobs.diff (100%) rename pkgs/development/rocm-modules/{6 => }/llvm/default.nix (90%) rename pkgs/development/rocm-modules/{6 => }/llvm/opt-offload-compress-on-by-default.patch (100%) rename pkgs/development/rocm-modules/{6 => }/llvm/perf-increase-namestring-size.patch (100%) rename pkgs/development/rocm-modules/{6 => }/llvm/perf-shorten-gcclib-include-paths.patch (100%) rename pkgs/development/rocm-modules/{6 => }/migraphx/default.nix (92%) rename pkgs/development/rocm-modules/{6 => }/migraphx/msgpack-6-compat.patch (100%) rename pkgs/development/rocm-modules/{6 => }/miopen/default.nix (98%) rename pkgs/development/rocm-modules/{6 => }/miopen/skip-preexisting-dbs.patch (100%) rename pkgs/development/rocm-modules/{6 => }/miopen/test-frugally-deep-model-loading.cpp (100%) rename pkgs/development/rocm-modules/{6 => }/miopen/test-frugally-deep-model-loading.nix (100%) rename pkgs/development/rocm-modules/{6 => }/mivisionx/0001-set-__STDC_CONSTANT_MACROS-to-make-rocAL-compile.patch (100%) rename pkgs/development/rocm-modules/{6 => }/mivisionx/default.nix (97%) rename pkgs/development/rocm-modules/{6 => }/mscclpp/default.nix (100%) rename pkgs/development/rocm-modules/{6 => }/rccl/default.nix (96%) rename pkgs/development/rocm-modules/{6 => }/rccl/fix_hw_reg_hw_id_gt_gfx10.patch (100%) rename pkgs/development/rocm-modules/{6 => }/rccl/rccl-test-missing-iomanip.diff (100%) rename pkgs/development/rocm-modules/{6 => }/rdc/default.nix (97%) rename pkgs/development/rocm-modules/{6 => }/release-attrPaths-gen.nix (100%) rename pkgs/development/rocm-modules/{6 => }/release-attrPaths-gen.sh (100%) rename pkgs/development/rocm-modules/{6 => }/release-attrPaths.json (100%) rename pkgs/development/rocm-modules/{6 => }/rocalution/default.nix (96%) rename pkgs/development/rocm-modules/{6 => }/rocblas/default.nix (89%) rename pkgs/development/rocm-modules/{6 => }/rocblas/hiplaslt-unstable-compat.patch (100%) rename pkgs/development/rocm-modules/{6 => }/rocdbgapi/default.nix (96%) rename pkgs/development/rocm-modules/{6 => }/rocfft/default.nix (97%) rename pkgs/development/rocm-modules/{6 => }/rocfft/log-every-n-aot-jobs.patch (100%) rename pkgs/development/rocm-modules/{6 => }/rocgdb/default.nix (96%) rename pkgs/development/rocm-modules/{6 => }/rocm-bandwidth-test/default.nix (100%) rename pkgs/development/rocm-modules/{6 => }/rocm-cmake/default.nix (89%) rename pkgs/development/rocm-modules/{6 => }/rocm-comgr/default.nix (100%) rename pkgs/development/rocm-modules/{6 => }/rocm-core/default.nix (97%) rename pkgs/development/rocm-modules/{6 => }/rocm-core/env-rocm-path.patch (100%) rename pkgs/development/rocm-modules/{6 => }/rocm-device-libs/cmake.patch (100%) rename pkgs/development/rocm-modules/{6 => }/rocm-device-libs/default.nix (100%) rename pkgs/development/rocm-modules/{6 => }/rocm-docs-core/default.nix (100%) rename pkgs/development/rocm-modules/{6 => }/rocm-runtime/default.nix (83%) rename pkgs/development/rocm-modules/{6 => }/rocm-runtime/remove-hsa-aqlprofile-dep.patch (100%) rename pkgs/development/rocm-modules/{6 => }/rocm-smi/default.nix (93%) rename pkgs/development/rocm-modules/{6 => }/rocm-tests/default.nix (100%) rename pkgs/development/rocm-modules/{6 => }/rocminfo/default.nix (92%) rename pkgs/development/rocm-modules/{6 => }/rocmlir/default.nix (97%) rename pkgs/development/rocm-modules/{6 => }/rocprim/default.nix (95%) rename pkgs/development/rocm-modules/{6 => }/rocprofiler-register/default.nix (84%) rename pkgs/development/rocm-modules/{6 => }/rocprofiler/default.nix (97%) rename pkgs/development/rocm-modules/{6 => }/rocr-debug-agent/default.nix (85%) rename pkgs/development/rocm-modules/{6 => }/rocrand/default.nix (95%) rename pkgs/development/rocm-modules/{6 => }/rocsolver/default.nix (97%) rename pkgs/development/rocm-modules/{6 => }/rocsparse/default.nix (98%) rename pkgs/development/rocm-modules/{6 => }/rocsparse/deps.nix (100%) rename pkgs/development/rocm-modules/{6 => }/rocthrust/default.nix (95%) rename pkgs/development/rocm-modules/{6 => }/roctracer/default.nix (96%) rename pkgs/development/rocm-modules/{6 => }/rocwmma/0000-dont-fetch-googletest.patch (100%) rename pkgs/development/rocm-modules/{6 => }/rocwmma/default.nix (96%) rename pkgs/development/rocm-modules/{6 => }/rpp/default.nix (95%) rename pkgs/development/rocm-modules/{6 => }/tensile/default.nix (87%) rename pkgs/development/rocm-modules/{6 => }/tensile/tensile-create-library-dont-copy-twice.diff (100%) rename pkgs/development/rocm-modules/{6 => }/tensile/tensile-solutionstructs-perf-fix.diff (100%) rename pkgs/development/rocm-modules/{6 => }/update.nix (85%) diff --git a/nixos/doc/manual/release-notes/rl-2605.section.md b/nixos/doc/manual/release-notes/rl-2605.section.md index 534bc7a9a09a..fa13d6c7c4f6 100644 --- a/nixos/doc/manual/release-notes/rl-2605.section.md +++ b/nixos/doc/manual/release-notes/rl-2605.section.md @@ -67,6 +67,8 @@ of pulling the upstream container image from Docker Hub. If you want the old beh - `services.cgit` before always had the git-http-backend and its "export all" setting enabled, which sidestepped any access control configured in cgit's settings. Now you have to make a decision and either enable or disable `services.cgit.gitHttpBackend.checkExportOkFiles` (or disable the git-http-backend). +- `rocmPackages_6` has been removed. `rocmPackages` has been updated to ROCm 7.x. Out of tree packages may rely on obsolete hipblas APIs or compile time constant warp size and need to be updated. + - The Bash implementation of the `nixos-rebuild` program is removed. All switchable systems now use the Python rewrite. Any prior usage of `system.rebuild.enableNg` must now be removed. If you have any outstanding issues with the new implementation, please open an issue on GitHub. - `services.desktopManager.gnome` no longer installs the Geary e-mail client since it is not part of the GNOME [core applications](https://apps.gnome.org/) list. Geary's position in the default favorite apps section has been replaced by GNOME Text Editor. To keep it installed, add `programs.geary.enable = true;` to your configuration. diff --git a/pkgs/by-name/ma/magma/magma-hipblas-v2-buildflags.patch b/pkgs/by-name/ma/magma/magma-hipblas-v2-buildflags.patch new file mode 100644 index 000000000000..0fd6dc80997e --- /dev/null +++ b/pkgs/by-name/ma/magma/magma-hipblas-v2-buildflags.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fc61af7..b2b594e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -303,7 +303,7 @@ if (MAGMA_ENABLE_HIP) + set(GPU_ARCH_FLAGS ${DEVCCFLAGS}) + + #add_compile_options(${GPU_ARCH_FLAGS}) +- set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__HIP_PLATFORM_AMD__" ) ++ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__HIP_PLATFORM_AMD__ -DHIPBLAS_V2" ) + option(ROCM_CORE "Location of the rocm-core package") + execute_process(COMMAND "${CMAKE_SOURCE_DIR}/tools/get-rocm-version.sh" "${ROCM_CORE}" OUTPUT_VARIABLE ROCM_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) + message(STATUS "ROCM_VERSION=${ROCM_VERSION}") +diff --git a/Makefile b/Makefile +index 44880ab..afaab45 100644 +--- a/Makefile ++++ b/Makefile +@@ -846,7 +846,7 @@ ifeq ($(BACKEND),cuda) + d_ext := cu + else ifeq ($(BACKEND),hip) + d_ext := cpp +-CXXFLAGS += -D__HIP_PLATFORM_AMD__ ++CXXFLAGS += -D__HIP_PLATFORM_AMD__ -DHIPBLAS_V2 + CXXFLAGS += -DROCM_VERSION=$(shell ./tools/get-rocm-version.sh) + endif + diff --git a/pkgs/by-name/ma/magma/package.nix b/pkgs/by-name/ma/magma/package.nix index 8c1876cc75cd..9aac8699c4c9 100644 --- a/pkgs/by-name/ma/magma/package.nix +++ b/pkgs/by-name/ma/magma/package.nix @@ -4,8 +4,8 @@ cmake, cudaPackages, cudaSupport ? config.cudaSupport, + fetchFromGitHub, fetchpatch, - fetchurl, gfortran, gpuTargets ? [ ], # Non-CUDA targets, that is HIP rocmPackages, @@ -13,6 +13,7 @@ lib, libpthreadstubs, ninja, + perl, python3, config, # At least one back-end has to be enabled, @@ -115,9 +116,11 @@ stdenv.mkDerivation (finalAttrs: { pname = "magma"; version = "2.9.0"; - src = fetchurl { - url = "https://icl.cs.utk.edu/projectsfiles/magma/downloads/magma-${finalAttrs.version}.tar.gz"; - hash = "sha256-/3f9Nyaz3+w7+1V5CwZICqXMOEOWwts1xW/a5KgsZBw="; + src = fetchFromGitHub { + owner = "icl-utk-edu"; + repo = "magma"; + tag = "v${finalAttrs.version}"; + hash = "sha256-ZV50id9qiCrc1K87812Lvv1tmeU/6vhpxFCz8nj61wM="; }; # Magma doesn't have anything which could be run under doCheck, but it does build test suite executables. @@ -134,6 +137,24 @@ stdenv.mkDerivation (finalAttrs: { url = "https://github.com/icl-utk-edu/magma/commit/2fecaf3f0c811344363f713669c1fe30f6879acd.patch"; hash = "sha256-Dfzq2gqoLSByCLWV5xvY/lXZeVa/yQ67lDSoIAa9jUU="; }) + ] + ++ lib.optionals rocmSupport [ + # TODO: Drop both these patches on next magma release + (fetchpatch { + # ROCm 7.0 compat: use HIPBLAS_V2 types and APIs + # Requires building from git w/ make generate call. If applied to release tarball + # pre-generated hipified code will remain unpatched + name = "magma-ROCm-7.0-compat.patch"; + url = "https://github.com/icl-utk-edu/magma/commit/02ecee0ccc56cce85194fdda18c9e0614797b2f9.patch"; + hash = "sha256-vm58X30ZR02sOMsKrvxEcEF27tJYuuyZZrz+GGFNz5Q="; + excludes = [ + "testing/testing_ztrsv_batched.cpp" + "CMakeLists.txt" + "Makefile" + ]; + }) + # Vendored patch with CMakeLists.txt and Makefile hunks from above commit (context differs) + ./magma-hipblas-v2-buildflags.patch ]; postPatch = '' @@ -147,12 +168,25 @@ stdenv.mkDerivation (finalAttrs: { autoPatchelfHook cmake ninja + perl # for make generate gfortran ] ++ lists.optionals cudaSupport [ cudaPackages.cuda_nvcc ]; + # README Step 0: generate precision variants and CMake.src.{hip|cuda} when building from git + # GPU_TARGET is a dummy value; CMake vars control target selection and `make generate` + # does not use the target setting, but the main makefile errors without it + preConfigure = '' + cat > make.inc < -Date: Wed, 9 Jul 2025 03:12:39 +0000 -Subject: [PATCH] Avoid compile kernel in host pass - ---- - include/ck_tile/host/kernel_launch.hpp | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/include/ck_tile/host/kernel_launch.hpp b/include/ck_tile/host/kernel_launch.hpp -index 9770e99738..f6ccb6968b 100644 ---- a/include/ck_tile/host/kernel_launch.hpp -+++ b/include/ck_tile/host/kernel_launch.hpp -@@ -4,11 +4,12 @@ - #pragma once - - #include "ck_tile/core/config.hpp" --#include "ck_tile/host/stream_config.hpp" -+#include "ck_tile/core/utility/ignore.hpp" - #include "ck_tile/host/hip_check_error.hpp" -+#include "ck_tile/host/stream_config.hpp" - #include "ck_tile/host/timer.hpp" --#include - #include -+#include - - namespace ck_tile { - -@@ -24,7 +25,11 @@ __launch_bounds__(MaxThreadPerBlock, MinBlockPerCu) - #endif - __global__ void kentry(Args... args) - { -+#if defined(__HIP_DEVICE_COMPILE__) - Kernel{}(args...); -+#else -+ (..., (ignore = args, 0)); -+#endif - } - - // diff --git a/pkgs/development/rocm-modules/6/hipcc/0001-hipcc-Remove-extra-definition-of-hipBinUtilPtr_-in-d.patch b/pkgs/development/rocm-modules/6/hipcc/0001-hipcc-Remove-extra-definition-of-hipBinUtilPtr_-in-d.patch deleted file mode 100644 index bfc386c620cb..000000000000 --- a/pkgs/development/rocm-modules/6/hipcc/0001-hipcc-Remove-extra-definition-of-hipBinUtilPtr_-in-d.patch +++ /dev/null @@ -1,39 +0,0 @@ -From f259eca77c592813e11752a46c4e1f9a74c64091 Mon Sep 17 00:00:00 2001 -From: Luna Nova -Date: Fri, 11 Oct 2024 02:56:22 -0700 -Subject: [PATCH] [hipcc] Remove extra definition of hipBinUtilPtr_ in derived - platforms - -Fixes UB when hipBinUtilPtr_ is used. ---- - amd/hipcc/src/hipBin_amd.h | 1 - - amd/hipcc/src/hipBin_nvidia.h | 1 - - 2 files changed, 2 deletions(-) - -diff --git a/amd/hipcc/src/hipBin_amd.h b/amd/hipcc/src/hipBin_amd.h -index 0a782d1beab9..36cd625ae8bc 100644 ---- a/src/hipBin_amd.h -+++ b/src/hipBin_amd.h -@@ -42,7 +42,6 @@ THE SOFTWARE. - - class HipBinAmd : public HipBinBase { - private: -- HipBinUtil* hipBinUtilPtr_; - string hipClangPath_ = ""; - string roccmPathEnv_, hipRocclrPathEnv_, hsaPathEnv_; - PlatformInfo platformInfoAMD_; -diff --git a/amd/hipcc/src/hipBin_nvidia.h b/amd/hipcc/src/hipBin_nvidia.h -index ff142cc1cea2..09b7b80979c7 100644 ---- a/src/hipBin_nvidia.h -+++ b/src/hipBin_nvidia.h -@@ -31,7 +31,6 @@ THE SOFTWARE. - - class HipBinNvidia : public HipBinBase { - private: -- HipBinUtil* hipBinUtilPtr_; - string cudaPath_ = ""; - PlatformInfo platformInfoNV_; - string hipCFlags_, hipCXXFlags_, hipLdFlags_; --- -2.46.0 - diff --git a/pkgs/development/rocm-modules/6/rccl/enable-mscclpp-on-all-gfx9.diff b/pkgs/development/rocm-modules/6/rccl/enable-mscclpp-on-all-gfx9.diff deleted file mode 100644 index 6fc375921064..000000000000 --- a/pkgs/development/rocm-modules/6/rccl/enable-mscclpp-on-all-gfx9.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/init.cc b/src/init.cc -index 738f756..1b0e4fc 100644 ---- a/src/init.cc -+++ b/src/init.cc -@@ -2049,7 +2049,7 @@ static ncclResult_t ncclCommInitRankFunc(struct ncclAsyncJob* job_) { - if (mscclEnabled() && (comm->topo->mscclEnabled || mscclForceEnabled()) && mscclppCommCompatible(comm)) { - hipDeviceProp_t devProp; - CUDACHECK(hipGetDeviceProperties(&devProp, cudaDev)); -- comm->mscclppCompatible = IsArchMatch(devProp.gcnArchName, "gfx94"); -+ comm->mscclppCompatible = IsArchMatch(devProp.gcnArchName, "gfx9"); - if (comm->mscclppCompatible) { - bool mapContainsId = (mscclpp_uniqueIdMap.count(job->commId) > 0); - auto& mscclppUniqueId = mscclpp_uniqueIdMap[job->commId]; diff --git a/pkgs/development/rocm-modules/6/rccl/fix-mainline-support-and-ub.diff b/pkgs/development/rocm-modules/6/rccl/fix-mainline-support-and-ub.diff deleted file mode 100644 index e65b23940c4c..000000000000 --- a/pkgs/development/rocm-modules/6/rccl/fix-mainline-support-and-ub.diff +++ /dev/null @@ -1,172 +0,0 @@ -diff --git a/src/include/bootstrap.h b/src/include/bootstrap.h -index 8c5f081..9922b79 100644 ---- a/src/include/bootstrap.h -+++ b/src/include/bootstrap.h -@@ -10,11 +10,13 @@ - #include "nccl.h" - #include "comm.h" - -+// this is accessed through unaligned ptrs because ncclUniqueId is a typedef of char[128] - struct ncclBootstrapHandle { - uint64_t magic; - union ncclSocketAddress addr; - }; - static_assert(sizeof(struct ncclBootstrapHandle) <= sizeof(ncclUniqueId), "Bootstrap handle is too large to fit inside NCCL unique ID"); -+static_assert(alignof(struct ncclBootstrapHandle) == alignof(ncclUniqueId), "Bootstrap handle must have same alignment as NCCL unique ID to avoid UB"); - - ncclResult_t bootstrapNetInit(); - ncclResult_t bootstrapCreateRoot(struct ncclBootstrapHandle* handle, bool idFromEnv); -diff --git a/src/misc/rocmwrap.cc b/src/misc/rocmwrap.cc -index b3063d5..464b80d 100644 ---- a/src/misc/rocmwrap.cc -+++ b/src/misc/rocmwrap.cc -@@ -131,9 +131,12 @@ static void initOnceFunc() { - //format and store the kernel conf file location - snprintf(kernel_conf_file, sizeof(kernel_conf_file), "/boot/config-%s", utsname.release); - fp = fopen(kernel_conf_file, "r"); -- if (fp == NULL) INFO(NCCL_INIT,"Could not open kernel conf file"); -+ if (fp == NULL) { -+ INFO(NCCL_INIT,"Could not open kernel conf file, will assume CONFIG_DMABUF_MOVE_NOTIFY and CONFIG_PCI_P2PDMA are enabled"); -+ } - //look for kernel_opt1 and kernel_opt2 in the conf file and check -- while (fgets(buf, sizeof(buf), fp) != NULL) { -+ // FIXME: This check is broken, CONFIG_DMABUF_MOVE_NOTIFY could be across a buf boundary. -+ while (fp && fgets(buf, sizeof(buf), fp) != NULL) { - if (strstr(buf, kernel_opt1) != NULL) { - found_opt1 = 1; - INFO(NCCL_INIT,"CONFIG_DMABUF_MOVE_NOTIFY=y in /boot/config-%s", utsname.release); -@@ -143,11 +146,12 @@ static void initOnceFunc() { - INFO(NCCL_INIT,"CONFIG_PCI_P2PDMA=y in /boot/config-%s", utsname.release); - } - } -- if (!found_opt1 || !found_opt2) { -+ if (fp && (!found_opt1 || !found_opt2)) { - dmaBufSupport = 0; - INFO(NCCL_INIT, "CONFIG_DMABUF_MOVE_NOTIFY and CONFIG_PCI_P2PDMA should be set for DMA_BUF in /boot/config-%s", utsname.release); - INFO(NCCL_INIT, "DMA_BUF_SUPPORT Failed due to OS kernel support"); - } -+ if (fp) fclose(fp); - - if(dmaBufSupport) INFO(NCCL_INIT, "DMA_BUF Support Enabled"); - else goto error; -diff --git a/src/nccl.h.in b/src/nccl.h.in -index 1d127b0..6296073 100644 ---- a/src/nccl.h.in -+++ b/src/nccl.h.in -@@ -39,7 +39,7 @@ typedef struct ncclComm* ncclComm_t; - #define NCCL_UNIQUE_ID_BYTES 128 - /*! @brief Opaque unique id used to initialize communicators - @details The ncclUniqueId must be passed to all participating ranks */ --typedef struct { char internal[NCCL_UNIQUE_ID_BYTES]; /*!< Opaque array>*/} ncclUniqueId; -+typedef struct alignas(int64_t) { char internal[NCCL_UNIQUE_ID_BYTES]; /*!< Opaque array>*/} ncclUniqueId; - - /*! @defgroup rccl_result_code Result Codes - @details The various result codes that RCCL API calls may return -diff --git a/src/proxy.cc b/src/proxy.cc -index 50e5437..51bb401 100644 ---- a/src/proxy.cc -+++ b/src/proxy.cc -@@ -965,7 +965,11 @@ struct ncclProxyConnectionPool { - - static ncclResult_t ncclProxyNewConnection(struct ncclProxyConnectionPool* pool, int* id) { - if (pool->offset == NCCL_PROXY_CONN_POOL_SIZE) { -- NCCLCHECK(ncclRealloc(&pool->pools, pool->banks, pool->banks+1)); -+ if (pool->pools) { -+ NCCLCHECK(ncclRealloc(&pool->pools, pool->banks, pool->banks+1)); -+ } else { -+ NCCLCHECK(ncclCalloc(&pool->pools, pool->banks+1)); -+ } - NCCLCHECK(ncclCalloc(pool->pools+pool->banks, NCCL_PROXY_CONN_POOL_SIZE)); - pool->banks++; - pool->offset = 0; -diff --git a/src/transport/net_ib.cc b/src/transport/net_ib.cc -index 6d77784..49762d3 100644 ---- a/src/transport/net_ib.cc -+++ b/src/transport/net_ib.cc -@@ -573,7 +573,7 @@ ncclResult_t ncclIbGdrSupport() { - // Requires support from NIC driver modules - // Use ONLY for debugging! - moduleLoaded = 1; -- INFO(NCCL_INIT, "RCCL_FORCE_ENABLE_GDRDMA = 1, so explicitly setting moduleLoaded = 1"); -+ INFO(NCCL_INIT, "ncclIbGdrSupport: RCCL_FORCE_ENABLE_GDRDMA = 1, so explicitly setting moduleLoaded = 1"); - } - - if (moduleLoaded == -1) { -@@ -586,9 +586,9 @@ ncclResult_t ncclIbGdrSupport() { - int i = 0; - - while (memory_peers_paths[i]) { - if (access(memory_peers_paths[i], F_OK) == 0) { - moduleLoaded = 1; -- INFO(NCCL_INIT,"Found %s", memory_peers_paths[i]); -+ INFO(NCCL_INIT,"ncclIbGdrSupport: Found %s", memory_peers_paths[i]); - break; - } else { - moduleLoaded = 0; -@@ -612,22 +613,23 @@ ncclResult_t ncclIbGdrSupport() { - if (moduleLoaded == 0) { - // Check for `ib_register_peer_memory_client` symbol in `/proc/kallsyms` - // if your system uses native OS ib_peer module -- char buf[256]; -- FILE *fp = NULL; -- fp = fopen("/proc/kallsyms", "r"); -+ FILE *fp = fopen("/proc/kallsyms", "r"); -+ char *line = NULL; -+ size_t len = 0; - - if (fp == NULL) { -- INFO(NCCL_INIT,"Could not open /proc/kallsyms"); -+ INFO(NCCL_INIT,"ncclIbGdrSupport: Could not open /proc/kallsyms to check for ib_register_peer_memory_client"); - } else { -- while (fgets(buf, sizeof(buf), fp) != NULL) { -- if (strstr(buf, "t ib_register_peer_memory_client") != NULL || -- strstr(buf, "T ib_register_peer_memory_client") != NULL) { -+ while (getline(&line, &len, fp) > 0) { -+ if (line && strstr(line, "ib_register_peer_memory_client") != NULL) { - moduleLoaded = 1; -- INFO(NCCL_INIT,"Found ib_register_peer_memory_client in /proc/kallsyms"); -+ INFO(NCCL_INIT,"ncclIbGdrSupport: Found ib_register_peer_memory_client in /proc/kallsyms"); - break; - } - } - } -+ if (line) free(line); -+ if (fp) fclose(fp); - } - #else - // Check for the nv_peer_mem module being loaded -@@ -637,7 +639,7 @@ ncclResult_t ncclIbGdrSupport() { - #endif - } - if (moduleLoaded == 0) { -- INFO(NCCL_INIT,"GDRDMA not enabled. Could not find memory_peers directory or peer_memory symbol"); -+ INFO(NCCL_INIT,"ncclIbGdrSupport: GDRDMA not enabled. Could not find memory_peers directory or peer_memory symbol"); - return ncclSystemError; - } - return ncclSuccess; -diff --git a/tools/ib-test/include/nccl.h b/tools/ib-test/include/nccl.h -index 2c86c33..5801c61 100755 ---- a/tools/ib-test/include/nccl.h -+++ b/tools/ib-test/include/nccl.h -@@ -31,7 +31,7 @@ extern "C" { - typedef struct ncclComm* ncclComm_t; - - #define NCCL_UNIQUE_ID_BYTES 128 --typedef struct { char internal[NCCL_UNIQUE_ID_BYTES]; } ncclUniqueId; -+typedef struct alignas(int64_t) { char internal[NCCL_UNIQUE_ID_BYTES]; } ncclUniqueId; - - /* Error type */ - typedef enum { ncclSuccess = 0, -diff --git a/tools/topo_expl/include/nccl.h b/tools/topo_expl/include/nccl.h -index 729561b..4e4bdd9 100644 ---- a/tools/topo_expl/include/nccl.h -+++ b/tools/topo_expl/include/nccl.h -@@ -35,7 +35,7 @@ typedef struct ncclComm* ncclComm_t; - #define NCCL_COMM_NULL NULL - - #define NCCL_UNIQUE_ID_BYTES 128 --typedef struct { char internal[NCCL_UNIQUE_ID_BYTES]; } ncclUniqueId; -+typedef struct alignas(int64_t) { char internal[NCCL_UNIQUE_ID_BYTES]; } ncclUniqueId; - - /*! @brief Error type */ - typedef enum { ncclSuccess = 0, diff --git a/pkgs/development/rocm-modules/6/rocm-smi/cmake.patch b/pkgs/development/rocm-modules/6/rocm-smi/cmake.patch deleted file mode 100644 index 2634ea46a1f8..000000000000 --- a/pkgs/development/rocm-modules/6/rocm-smi/cmake.patch +++ /dev/null @@ -1,89 +0,0 @@ -diff --git a/rocm_smi-backward-compat.cmake b/rocm_smi-backward-compat.cmake -index aa8fd9c..59afce5 100644 ---- a/rocm_smi-backward-compat.cmake -+++ b/rocm_smi-backward-compat.cmake -@@ -72,7 +72,12 @@ function(generate_wrapper_header) - set(include_guard "${include_guard}COMGR_WRAPPER_INCLUDE_${INC_GAURD_NAME}_H") - #set #include statement - get_filename_component(file_name ${header_file} NAME) -- set(include_statements "${include_statements}#include \"../../../${CMAKE_INSTALL_INCLUDEDIR}/${ROCM_SMI}/${file_name}\"\n") -+ if(IS_ABSOLUTE ${CMAKE_INSTALL_INCLUDEDIR}) -+ set(include_dir "${CMAKE_INSTALL_INCLUDEDIR}") -+ else() -+ set(include_dir "../../../${CMAKE_INSTALL_INCLUDEDIR}") -+ endif() -+ set(include_statements "${include_statements}#include \"${include_dir}/${ROCM_SMI}/${file_name}\"\n") - configure_file(${RSMI_WRAPPER_DIR}/header.hpp.in ${RSMI_WRAPPER_INC_DIR}/${file_name}) - unset(include_guard) - unset(include_statements) -@@ -90,7 +95,12 @@ function(generate_wrapper_header) - set(include_guard "${include_guard}COMGR_WRAPPER_INCLUDE_${INC_GAURD_NAME}_H") - #set #include statement - get_filename_component(file_name ${header_file} NAME) -- set(include_statements "${include_statements}#include \"../../../${CMAKE_INSTALL_INCLUDEDIR}/${OAM_TARGET_NAME}/${file_name}\"\n") -+ if(IS_ABSOLUTE ${CMAKE_INSTALL_INCLUDEDIR}) -+ set(include_dir "${CMAKE_INSTALL_INCLUDEDIR}") -+ else() -+ set(include_dir "../../../${CMAKE_INSTALL_INCLUDEDIR}") -+ endif() -+ set(include_statements "${include_statements}#include \"${include_dir}/${OAM_TARGET_NAME}/${file_name}\"\n") - configure_file(${RSMI_WRAPPER_DIR}/header.hpp.in ${OAM_WRAPPER_INC_DIR}/${file_name}) - unset(include_guard) - unset(include_statements) -@@ -123,11 +133,16 @@ function(create_library_symlink) - set(library_files "${LIB_RSMI}") - endif() - -+ if(IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR}) -+ set(install_libdir "${CMAKE_INSTALL_LIBDIR}") -+ else() -+ set(install_libdir "../../${CMAKE_INSTALL_LIBDIR}") -+ endif() - foreach(file_name ${library_files}) - add_custom_target(link_${file_name} ALL - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMAND ${CMAKE_COMMAND} -E create_symlink -- ../../${CMAKE_INSTALL_LIBDIR}/${file_name} ${RSMI_WRAPPER_LIB_DIR}/${file_name}) -+ ${install_libdir}/${file_name} ${RSMI_WRAPPER_LIB_DIR}/${file_name}) - endforeach() - - file(MAKE_DIRECTORY ${OAM_WRAPPER_LIB_DIR}) -@@ -151,11 +166,16 @@ function(create_library_symlink) - set(library_files "${LIB_OAM}") - endif() - -+ if(IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR}) -+ set(install_libdir "${CMAKE_INSTALL_LIBDIR}") -+ else() -+ set(install_libdir "../../${CMAKE_INSTALL_LIBDIR}") -+ endif() - foreach(file_name ${library_files}) - add_custom_target(link_${file_name} ALL - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMAND ${CMAKE_COMMAND} -E create_symlink -- ../../${CMAKE_INSTALL_LIBDIR}/${file_name} ${OAM_WRAPPER_LIB_DIR}/${file_name}) -+ ${install_libdir}/${file_name} ${OAM_WRAPPER_LIB_DIR}/${file_name}) - endforeach() - - endfunction() -diff --git a/rocm_smi/CMakeLists.txt b/rocm_smi/CMakeLists.txt -index c594eeb..d3ed39d 100755 ---- a/rocm_smi/CMakeLists.txt -+++ b/rocm_smi/CMakeLists.txt -@@ -105,10 +105,15 @@ endif () - #file reorganization changes - #rocm_smi.py moved to libexec/rocm_smi. so creating rocm-smi symlink - file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) -+if(IS_ABSOLUTE ${CMAKE_INSTALL_LIBEXECDIR}) -+ set(install_libexecdir "${CMAKE_INSTALL_LIBEXECDIR}") -+else() -+ set(install_libexecdir "../${CMAKE_INSTALL_LIBEXECDIR}") -+endif() - add_custom_target(link-rocm-smi ALL - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - COMMAND ${CMAKE_COMMAND} -E create_symlink -- ../${CMAKE_INSTALL_LIBEXECDIR}/${ROCM_SMI}/rocm_smi.py ${CMAKE_CURRENT_BINARY_DIR}/bin/rocm-smi) -+ ${install_libexecdir}/${ROCM_SMI}/rocm_smi.py ${CMAKE_CURRENT_BINARY_DIR}/bin/rocm-smi) - - ## Add the install directives for the runtime library. - install(TARGETS ${ROCM_SMI_TARGET} diff --git a/pkgs/development/rocm-modules/6/amdsmi/default.nix b/pkgs/development/rocm-modules/amdsmi/default.nix similarity index 88% rename from pkgs/development/rocm-modules/6/amdsmi/default.nix rename to pkgs/development/rocm-modules/amdsmi/default.nix index df9125aa40c8..692aecccf620 100644 --- a/pkgs/development/rocm-modules/6/amdsmi/default.nix +++ b/pkgs/development/rocm-modules/amdsmi/default.nix @@ -21,12 +21,12 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "amdsmi"; - version = "6.4.3"; + version = "7.0.1"; src = fetchFromGitHub { owner = "rocm"; repo = "amdsmi"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-9O29O4HGkQxFDglAhHKv5KWA7p97RwMGG2x/fkOS2jE="; + hash = "sha256-66xcdMRcKYyseS+xOt4NPDa2cK4ASAlS6zB5/LUoq9A="; }; postPatch = '' @@ -43,11 +43,6 @@ stdenv.mkDerivation (finalAttrs: { ''; patches = [ - (fetchpatch { - name = "esmi-to-tag-4.2.patch"; - url = "https://github.com/ROCm/amdsmi/commit/49aa2af045a4bc688e6f3ee0545f12afc45c1efe.patch"; - hash = "sha256-5dH9N4m+2mJIGVEB86SvdK3uAYyGFTfbCBJ8e09iQ3w="; - }) (fetchpatch { name = "fix-build-with-gcc15.patch"; url = "https://github.com/ROCm/amdsmi/commit/902667db3cafe72e2009287cb96b160854ab9d81.patch"; diff --git a/pkgs/development/rocm-modules/6/aotriton/default.nix b/pkgs/development/rocm-modules/aotriton/default.nix similarity index 100% rename from pkgs/development/rocm-modules/6/aotriton/default.nix rename to pkgs/development/rocm-modules/aotriton/default.nix diff --git a/pkgs/development/rocm-modules/6/aqlprofile/default.nix b/pkgs/development/rocm-modules/aqlprofile/default.nix similarity index 96% rename from pkgs/development/rocm-modules/6/aqlprofile/default.nix rename to pkgs/development/rocm-modules/aqlprofile/default.nix index d44da400200f..f73fa4760473 100644 --- a/pkgs/development/rocm-modules/6/aqlprofile/default.nix +++ b/pkgs/development/rocm-modules/aqlprofile/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation { # pinned to oddly named tag for now owner = "ROCm"; repo = "aqlprofile"; - tag = "rocm-42"; + tag = "rocm-7.0.1"; hash = "sha256-avL78ZfB+rJ1TYaejSUzU6i5L9JeMawMwIxaTQINQdE="; }; diff --git a/pkgs/development/rocm-modules/6/clr/cmake-find-x11-libgl.patch b/pkgs/development/rocm-modules/clr/cmake-find-x11-libgl.patch similarity index 100% rename from pkgs/development/rocm-modules/6/clr/cmake-find-x11-libgl.patch rename to pkgs/development/rocm-modules/clr/cmake-find-x11-libgl.patch diff --git a/pkgs/development/rocm-modules/6/clr/default.nix b/pkgs/development/rocm-modules/clr/default.nix similarity index 88% rename from pkgs/development/rocm-modules/6/clr/default.nix rename to pkgs/development/rocm-modules/clr/default.nix index 4b0fad82e7ef..7fbf7710d3ed 100644 --- a/pkgs/development/rocm-modules/6/clr/default.nix +++ b/pkgs/development/rocm-modules/clr/default.nix @@ -70,7 +70,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "clr"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -84,7 +84,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "clr"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-DOAAuC9TN1//v56GXyUMJwQHgOuctC+WsC5agrgL+QM="; + hash = "sha256-z7qmL7c/0zlB5/rb7zporfeUPM9KIkS1iZf6GmYFxbo="; }; nativeBuildInputs = [ @@ -148,24 +148,13 @@ stdenv.mkDerivation (finalAttrs: { ./cmake-find-x11-libgl.patch (fetchpatch { # [PATCH] improve rocclr isa compatibility check - sha256 = "sha256-oj1loBEuqzuMihOKoN0wR92Wo25AshN5MpBuTq/9TMw="; - url = "https://github.com/GZGavinZhao/clr/commit/f675b9b46d9f7bb8e003f4f47f616fa86a0b7a5e.patch"; + sha256 = "sha256-/QpB3Wqdhcq6lzyO/zOWzwQC0oYpesCICxnVx5CqbWg="; + url = "https://github.com/GZGavinZhao/clr/commit/733ee38ef8ad5c84926970981821f446dfcb00af.patch"; }) (fetchpatch { # [PATCH] improve hipamd isa compatibility check - sha256 = "sha256-E3ERoVjUVWCiYHuE1GaVY5jMrAVx3B1cAVHM4/HPuaQ="; - url = "https://github.com/GZGavinZhao/clr/commit/aec0fc56ee2d10a2bc269c418fa847da2ee9969a.patch"; - }) - (fetchpatch { - # [PATCH] SWDEV-507104 - Removes alignment requirement for Semaphore class to resolve runtime misaligned memory issues - sha256 = "sha256-nStJ22B/CM0fzQTvYjbHDbQt0GlE8DXxVK+UDU9BAx4="; - url = "https://github.com/ROCm/clr/commit/21d764518363d74187deaef2e66c1a127bc5aa64.patch"; - }) - (fetchpatch { - # CMake 4 compat - # [PATCH] SWDEV-509213 - make cmake_minimum_required consistent across clr - url = "https://github.com/ROCm/clr/commit/fcaefe97b862afe12aaac0147f1004e6dc595fce.patch"; - hash = "sha256-hRZXbASbIOOETe+T4mDyyiRWLXd6RDKRieN2ns1w/rs="; + sha256 = "sha256-FvZInw8PqB68ePxAGu45cWT/whD1xmprIA5wZb5OLcE="; + url = "https://github.com/GZGavinZhao/clr/commit/1f0b54ee9b0de08f4dc8cd38b6728928b180048a.patch"; }) ]; @@ -198,7 +187,7 @@ stdenv.mkDerivation (finalAttrs: { cp ${amdclang}/bin/* $out/bin/ cp ${amdclangxx}/bin/* $out/bin/ - for prog in hip{cc,config}{,.pl}; do + for prog in hip{cc,config}; do wrapProgram $out/bin/$prog ${lib.concatStringsSep " " wrapperArgs} done diff --git a/pkgs/development/rocm-modules/6/clr/test-opencl-example.nix b/pkgs/development/rocm-modules/clr/test-opencl-example.nix similarity index 97% rename from pkgs/development/rocm-modules/6/clr/test-opencl-example.nix rename to pkgs/development/rocm-modules/clr/test-opencl-example.nix index c09093946c67..34b97755a7bf 100644 --- a/pkgs/development/rocm-modules/6/clr/test-opencl-example.nix +++ b/pkgs/development/rocm-modules/clr/test-opencl-example.nix @@ -61,7 +61,7 @@ let in makeImpureTest { name = "opencl-example"; - testedPackage = "rocmPackages_6.clr"; + testedPackage = "rocmPackages.clr"; sandboxPaths = [ "/sys" diff --git a/pkgs/development/rocm-modules/6/clr/test-rocm-smi.nix b/pkgs/development/rocm-modules/clr/test-rocm-smi.nix similarity index 91% rename from pkgs/development/rocm-modules/6/clr/test-rocm-smi.nix rename to pkgs/development/rocm-modules/clr/test-rocm-smi.nix index acdbc1928d35..e03655907c7b 100644 --- a/pkgs/development/rocm-modules/6/clr/test-rocm-smi.nix +++ b/pkgs/development/rocm-modules/clr/test-rocm-smi.nix @@ -8,7 +8,7 @@ makeImpureTest { name = "rocm-smi"; - testedPackage = "rocmPackages_6.clr"; + testedPackage = "rocmPackages.clr"; nativeBuildInputs = [ clinfo rocm-smi diff --git a/pkgs/development/rocm-modules/6/composable_kernel/base.nix b/pkgs/development/rocm-modules/composable_kernel/base.nix similarity index 80% rename from pkgs/development/rocm-modules/6/composable_kernel/base.nix rename to pkgs/development/rocm-modules/composable_kernel/base.nix index 60127e37eadc..6c9604be5b31 100644 --- a/pkgs/development/rocm-modules/6/composable_kernel/base.nix +++ b/pkgs/development/rocm-modules/composable_kernel/base.nix @@ -15,6 +15,11 @@ zstd, buildTests ? false, buildExamples ? false, + # limits prebuilt kernel selection to those needed for MIOPEN (currently "*conv*") + # Other kernels can still be used if treating CK as a header only library + # and building specific instances, as done with ck4inductor/torch + miOpenReqLibsOnly ? true, + withDeprecatedKernels ? false, gpuTargets ? ( clr.localGpuTargets or [ "gfx900" @@ -22,20 +27,14 @@ "gfx908" "gfx90a" "gfx942" - "gfx1030" - "gfx1100" - "gfx1101" - "gfx1102" - "gfx1200" - "gfx1201" + "gfx950" + "gfx10-3-generic" + "gfx11-generic" + "gfx12-generic" ] ), }: -# TODO: in 7.x CK is likely to gain support for -# a) miopen kernel only build (MIOPEN_REQ_LIBS_ONLY) -# b) header only build (useful for torch) https://github.com/ROCm/composable_kernel/issues/2030 -# that will likely allow us to get rid of this complicated split part build! stdenv.mkDerivation (finalAttrs: { preBuild = '' echo "This derivation isn't intended to be built directly and only exists to be overridden and built in chunks"; @@ -43,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: { ''; pname = "composable_kernel_base"; - version = "6.4-unstable-2025-05-22"; + version = "7.0.1"; outputs = [ "out" @@ -58,9 +57,8 @@ stdenv.mkDerivation (finalAttrs: { src = fetchFromGitHub { owner = "ROCm"; repo = "composable_kernel"; - # Using a dev snapshot, trying to get MIOpen to work - rev = "bc2551ac3b27edc31f20863e3a873508fb73aad2"; - hash = "sha256-bfmwbgR1ya+zkME3wOyaZX/e+1+ie0sSlugK/kozLsI="; + rev = "rocm-${finalAttrs.version}"; + hash = "sha256-Wql7PD3kg85AFXn7UaTKxhURyDPfVe/OUbR+udrqDc8="; }; nativeBuildInputs = [ @@ -87,10 +85,14 @@ stdenv.mkDerivation (finalAttrs: { env.ROCM_PATH = clr; cmakeFlags = [ + (lib.cmakeBool "MIOPEN_REQ_LIBS_ONLY" miOpenReqLibsOnly) + (lib.cmakeBool "BUILD_MHA_LIB" (!miOpenReqLibsOnly)) + (lib.cmakeBool "DISABLE_DL_KERNELS" true) + (lib.cmakeBool "DISABLE_DPP_KERNELS" true) + (lib.cmakeBool "CK_TIME_KERNEL" false) "-DCMAKE_MODULE_PATH=${clr}/hip/cmake" - "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_POLICY_DEFAULT_CMP0069=NEW" - # "-DDL_KERNELS=ON" # Not needed, slow to build + "-DDL_KERNELS=OFF" # CK_USE_CODEGEN Required for migraphx which uses device_gemm_multiple_d.hpp # but migraphx requires an incompatible fork of CK and fails anyway # "-DCK_USE_CODEGEN=ON" @@ -122,11 +124,6 @@ stdenv.mkDerivation (finalAttrs: { "-DGOOGLETEST_DIR=${gtest.src}" # Custom linker names ]; - patches = [ - # Significant build performance improvement - ./avoid-extra-host-compile.patch - ]; - # No flags to build selectively it seems... postPatch = # Reduce configure time by preventing thousands of clang-tidy targets being added @@ -139,12 +136,10 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail "add_subdirectory(profiler)" "" substituteInPlace cmake/EnableCompilerWarnings.cmake \ --replace-fail "-Werror" "" - - # Apply equivalent change to https://github.com/ROCm/composable_kernel/pull/2564 - # TODO: Remove after ROCm 7.1 - find include/ck/tensor_operation/ -type f -name "*.hpp" -exec sed -i \ - -e 's/!defined(__HIP_DEVICE_COMPILE__)/false/g' \ - {} + + '' + + lib.optionalString (!withDeprecatedKernels) '' + substituteInPlace include/ck/ck.hpp \ + --replace-fail "CK_BUILD_DEPRECATED 1" "CK_BUILD_DEPRECATED 0" '' # Optionally remove tests + lib.optionalString (!buildTests) '' @@ -170,7 +165,7 @@ stdenv.mkDerivation (finalAttrs: { ''; passthru = { - inherit gpuTargets; + inherit gpuTargets miOpenReqLibsOnly; updateScript = rocmUpdateScript { name = finalAttrs.pname; inherit (finalAttrs.src) owner; diff --git a/pkgs/development/rocm-modules/6/composable_kernel/ck4inductor.nix b/pkgs/development/rocm-modules/composable_kernel/ck4inductor.nix similarity index 98% rename from pkgs/development/rocm-modules/6/composable_kernel/ck4inductor.nix rename to pkgs/development/rocm-modules/composable_kernel/ck4inductor.nix index 8d12893d2b27..428daae27fa5 100644 --- a/pkgs/development/rocm-modules/6/composable_kernel/ck4inductor.nix +++ b/pkgs/development/rocm-modules/composable_kernel/ck4inductor.nix @@ -14,7 +14,7 @@ buildPythonPackage { setuptools setuptools-scm ]; - version = "6.4.3"; + version = "7.0"; inherit (composable_kernel) src; pythonImportsCheck = [ "ck4inductor" diff --git a/pkgs/development/rocm-modules/6/composable_kernel/default.nix b/pkgs/development/rocm-modules/composable_kernel/default.nix similarity index 90% rename from pkgs/development/rocm-modules/6/composable_kernel/default.nix rename to pkgs/development/rocm-modules/composable_kernel/default.nix index 42c634f0aa94..0a9dac5db87a 100644 --- a/pkgs/development/rocm-modules/6/composable_kernel/default.nix +++ b/pkgs/development/rocm-modules/composable_kernel/default.nix @@ -5,8 +5,10 @@ }: let + inherit (composable_kernel_base) miOpenReqLibsOnly; parts = { _mha = { + enabled = !miOpenReqLibsOnly; # mha takes ~3hrs on 64 cores on an EPYC milan system at ~2.5GHz # big-parallel builders are one gen newer and clocked ~30% higher but only 24 cores # Should be <10h timeout but might be cutting it close @@ -20,6 +22,7 @@ let extraCmakeFlags = [ "-DHIP_CLANG_NUM_PARALLEL_JOBS=2" ]; }; gemm_multiply_multiply = { + enabled = !miOpenReqLibsOnly; targets = [ "device_gemm_multiply_multiply_instance" ]; @@ -30,6 +33,7 @@ let ]; }; gemm_multiply_multiply_wp = { + enabled = !miOpenReqLibsOnly; targets = [ "device_gemm_multiply_multiply_wp_instance" ]; @@ -50,7 +54,8 @@ let targets = [ "device_grouped_conv1d_fwd_instance" "device_grouped_conv2d_fwd_instance" - "device_grouped_conv2d_fwd_bias_relu_instance" + "device_grouped_conv2d_fwd_bias_clamp_instance" + "device_grouped_conv2d_fwd_clamp_instance" "device_grouped_conv2d_fwd_dynamic_op_instance" ]; }; @@ -71,7 +76,8 @@ let grouped_conv_fwd_3d1 = { targets = [ "device_grouped_conv3d_fwd_instance" - "device_grouped_conv3d_fwd_bias_relu_instance" + "device_grouped_conv3d_fwd_clamp_instance" + "device_grouped_conv3d_fwd_bias_clamp_instance" "device_grouped_conv3d_fwd_bilinear_instance" "device_grouped_conv3d_fwd_convinvscale_instance" "device_grouped_conv3d_fwd_convscale_instance" @@ -87,7 +93,13 @@ let "device_grouped_conv3d_fwd_scaleadd_scaleadd_relu_instance" ]; }; + grouped_conv_fwd_nd = { + targets = [ + "device_grouped_convnd_bwd_weight_instance" + ]; + }; batched_gemm1 = { + enabled = !miOpenReqLibsOnly; targets = [ "device_batched_gemm_instance" "device_batched_gemm_b_scale_instance" @@ -100,6 +112,7 @@ let ]; }; batched_gemm2 = { + enabled = !miOpenReqLibsOnly; targets = [ "device_batched_gemm_softmax_gemm_permute_instance" "device_grouped_gemm_instance" @@ -111,18 +124,21 @@ let ]; }; gemm_universal1 = { + enabled = !miOpenReqLibsOnly; targets = [ "device_gemm_universal_instance" "device_gemm_universal_batched_instance" ]; }; gemm_universal2 = { + enabled = !miOpenReqLibsOnly; targets = [ "device_gemm_universal_reduce_instance" "device_gemm_universal_streamk_instance" ]; }; gemm_other1 = { + enabled = !miOpenReqLibsOnly; targets = [ "device_gemm_instance" "device_gemm_b_scale_instance" @@ -135,6 +151,7 @@ let ]; }; gemm_other2 = { + enabled = !miOpenReqLibsOnly; targets = [ "device_gemm_add_relu_add_layernorm_instance" "device_gemm_add_silu_instance" @@ -159,6 +176,7 @@ let ]; }; pool = { + enabled = !miOpenReqLibsOnly; targets = [ "device_avg_pool2d_bwd_instance" "device_avg_pool3d_bwd_instance" @@ -167,7 +185,13 @@ let "device_max_pool_bwd_instance" ]; }; + other0 = { + targets = [ + "device_quantization_instance" + ]; + }; other1 = { + enabled = !miOpenReqLibsOnly; targets = [ "device_batchnorm_instance" "device_contraction_bilinear_instance" @@ -177,15 +201,16 @@ let ]; }; other2 = { + enabled = !miOpenReqLibsOnly; targets = [ "device_column_to_image_instance" "device_image_to_column_instance" "device_permute_scale_instance" - "device_quantization_instance" "device_reduce_instance" ]; }; other3 = { + enabled = !miOpenReqLibsOnly; targets = [ "device_normalization_bwd_data_instance" "device_normalization_bwd_gamma_beta_instance" @@ -201,11 +226,13 @@ let targets, extraCmakeFlags ? [ ], requiredSystemFeatures ? [ "big-parallel" ], + enabled ? true, onlyFor ? [ ], }: let supported = - onlyFor == [ ] || (lib.lists.intersectLists composable_kernel_base.gpuTargets onlyFor) != [ ]; + enabled + && (onlyFor == [ ] || (lib.lists.intersectLists composable_kernel_base.gpuTargets onlyFor) != [ ]); in if supported then (composable_kernel_base.overrideAttrs (old: { diff --git a/pkgs/development/rocm-modules/6/default.nix b/pkgs/development/rocm-modules/default.nix similarity index 99% rename from pkgs/development/rocm-modules/6/default.nix rename to pkgs/development/rocm-modules/default.nix index 44454b36958a..cf9e9815eb83 100644 --- a/pkgs/development/rocm-modules/6/default.nix +++ b/pkgs/development/rocm-modules/default.nix @@ -213,6 +213,7 @@ let ucx = prev.ucx.override { enableCuda = false; enableRocm = true; + rocmPackages = self; }; in { diff --git a/pkgs/development/rocm-modules/6/half/default.nix b/pkgs/development/rocm-modules/half/default.nix similarity index 89% rename from pkgs/development/rocm-modules/6/half/default.nix rename to pkgs/development/rocm-modules/half/default.nix index ca3a3ab58f17..204fd730105e 100644 --- a/pkgs/development/rocm-modules/6/half/default.nix +++ b/pkgs/development/rocm-modules/half/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "half"; - version = "6.4.3"; + version = "7.0.1"; src = fetchFromGitHub { owner = "ROCm"; repo = "half"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-H8Ogm4nxaxDB0WHx+KhRjUO3vzp3AwCqrIQ6k8R+xkc="; + hash = "sha256-If9O5BEeymsLN+C0drZsPSxEWXpJTxeDBGNHNXSumm4="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/hip-common/default.nix b/pkgs/development/rocm-modules/hip-common/default.nix similarity index 90% rename from pkgs/development/rocm-modules/6/hip-common/default.nix rename to pkgs/development/rocm-modules/hip-common/default.nix index b915e0b93827..59abcd935032 100644 --- a/pkgs/development/rocm-modules/6/hip-common/default.nix +++ b/pkgs/development/rocm-modules/hip-common/default.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "hip-common"; - version = "6.4.3"; + version = "7.0.1"; src = fetchFromGitHub { owner = "ROCm"; repo = "HIP"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-B4Gc119iff3ak9tmpz3rUJBtCk5T1AA8z67K9PshTLQ="; + hash = "sha256-aKR87SZftt5sLuj/TOgwcdg+CZON0Jr2BpPvqA02lw4="; }; dontConfigure = true; diff --git a/pkgs/development/rocm-modules/6/hipblas-common/default.nix b/pkgs/development/rocm-modules/hipblas-common/default.nix similarity index 90% rename from pkgs/development/rocm-modules/6/hipblas-common/default.nix rename to pkgs/development/rocm-modules/hipblas-common/default.nix index 20dc26075c5d..e04581b0f831 100644 --- a/pkgs/development/rocm-modules/6/hipblas-common/default.nix +++ b/pkgs/development/rocm-modules/hipblas-common/default.nix @@ -8,13 +8,13 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "hipblas-common"; - version = "6.4.3"; + version = "7.0.1"; src = fetchFromGitHub { owner = "ROCm"; repo = "hipBLAS-common"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-eTwoAXH2HGdSAOLTZHJUFHF+c2wWHixqeMqr60KxJrc="; + hash = "sha256-NXSMVtfjei4vIjU9y4o3Px/fplq7C7ziY1R8YqnY2LQ="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/hipblas/default.nix b/pkgs/development/rocm-modules/hipblas/default.nix similarity index 83% rename from pkgs/development/rocm-modules/6/hipblas/default.nix rename to pkgs/development/rocm-modules/hipblas/default.nix index e27185ef5b4b..0374630ae61c 100644 --- a/pkgs/development/rocm-modules/6/hipblas/default.nix +++ b/pkgs/development/rocm-modules/hipblas/default.nix @@ -2,7 +2,6 @@ lib, stdenv, fetchFromGitHub, - fetchpatch, rocmUpdateScript, cmake, rocm-cmake, @@ -25,7 +24,7 @@ # Can also use cuBLAS stdenv.mkDerivation (finalAttrs: { pname = "hipblas"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -44,19 +43,9 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "hipBLAS"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-lQv8Ik6+0ldqyeJ05CSGB0309nIpzlRL3CRYeQxVfd0="; + hash = "sha256-4y+VPhYikPytY1pXRrhbARh33yEmQDZfVET70Be8e4Q="; }; - patches = [ - (fetchpatch { - # Subject: [PATCH] Add gfx1150, gfx1150, gfx1200, gfx1201 support (#1055) - # This was merged to release/rocm-rel-6.4 but AMD forgot to tag it for 6.4.3 - name = "release-6.4-arch-extra.patch"; - url = "https://github.com/ROCm/hipBLAS/commit/0100b32ccff9a0f12134694315b4e44884e25a8e.patch"; - hash = "sha256-BmktlLJpYaTcogHzEKpZdCnksIIysEO47WMezXoxvCs="; - }) - ]; - postPatch = '' substituteInPlace library/CMakeLists.txt \ --replace-fail "find_package(Git REQUIRED)" "" diff --git a/pkgs/development/rocm-modules/6/hipblaslt/Tensile-interning.patch b/pkgs/development/rocm-modules/hipblaslt/Tensile-interning.patch similarity index 100% rename from pkgs/development/rocm-modules/6/hipblaslt/Tensile-interning.patch rename to pkgs/development/rocm-modules/hipblaslt/Tensile-interning.patch diff --git a/pkgs/development/rocm-modules/6/hipblaslt/TensileCreateLibrary-refactor.patch b/pkgs/development/rocm-modules/hipblaslt/TensileCreateLibrary-refactor.patch similarity index 100% rename from pkgs/development/rocm-modules/6/hipblaslt/TensileCreateLibrary-refactor.patch rename to pkgs/development/rocm-modules/hipblaslt/TensileCreateLibrary-refactor.patch diff --git a/pkgs/development/rocm-modules/6/hipblaslt/default.nix b/pkgs/development/rocm-modules/hipblaslt/default.nix similarity index 99% rename from pkgs/development/rocm-modules/6/hipblaslt/default.nix rename to pkgs/development/rocm-modules/hipblaslt/default.nix index 2c6c5679f817..44a0028a4b3e 100644 --- a/pkgs/development/rocm-modules/6/hipblaslt/default.nix +++ b/pkgs/development/rocm-modules/hipblaslt/default.nix @@ -70,7 +70,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "hipblaslt${clr.gpuArchSuffix}"; - version = "6.5-unstable-2025-08-21"; + version = "7.0-unstable-2025-08-21"; src = fetchFromGitHub { owner = "ROCm"; diff --git a/pkgs/development/rocm-modules/6/hipblaslt/messagepack-compression-support.patch b/pkgs/development/rocm-modules/hipblaslt/messagepack-compression-support.patch similarity index 100% rename from pkgs/development/rocm-modules/6/hipblaslt/messagepack-compression-support.patch rename to pkgs/development/rocm-modules/hipblaslt/messagepack-compression-support.patch diff --git a/pkgs/development/rocm-modules/6/hipblaslt/parallel-buildSourceCodeObjectFile.diff b/pkgs/development/rocm-modules/hipblaslt/parallel-buildSourceCodeObjectFile.diff similarity index 100% rename from pkgs/development/rocm-modules/6/hipblaslt/parallel-buildSourceCodeObjectFile.diff rename to pkgs/development/rocm-modules/hipblaslt/parallel-buildSourceCodeObjectFile.diff diff --git a/pkgs/development/rocm-modules/6/hipcc/default.nix b/pkgs/development/rocm-modules/hipcc/default.nix similarity index 84% rename from pkgs/development/rocm-modules/6/hipcc/default.nix rename to pkgs/development/rocm-modules/hipcc/default.nix index 1ed7dd6f4271..ac8ab20eb637 100644 --- a/pkgs/development/rocm-modules/6/hipcc/default.nix +++ b/pkgs/development/rocm-modules/hipcc/default.nix @@ -23,12 +23,6 @@ stdenv.mkDerivation (finalAttrs: { llvm.clang-unwrapped ]; - patches = [ - # https://github.com/ROCm/llvm-project/pull/183 - # Fixes always-invoked UB in hipcc - ./0001-hipcc-Remove-extra-definition-of-hipBinUtilPtr_-in-d.patch - ]; - postPatch = '' substituteInPlace src/hipBin_amd.h \ --replace-fail "/usr/bin/lsb_release" "${lsb-release}/bin/lsb_release" diff --git a/pkgs/development/rocm-modules/6/hipcub/default.nix b/pkgs/development/rocm-modules/hipcub/default.nix similarity index 95% rename from pkgs/development/rocm-modules/6/hipcub/default.nix rename to pkgs/development/rocm-modules/hipcub/default.nix index 6348947d8433..00f45df98bdf 100644 --- a/pkgs/development/rocm-modules/6/hipcub/default.nix +++ b/pkgs/development/rocm-modules/hipcub/default.nix @@ -17,7 +17,7 @@ # CUB can also be used as a backend instead of rocPRIM. stdenv.mkDerivation (finalAttrs: { pname = "hipcub"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -33,7 +33,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "hipCUB"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-yRJxhYFZYiKNR2xrn5fif/+vjHKKcKdn0JKPi972g+0="; + hash = "sha256-Vx9h/DTZo7RfQrflVwXOCKiA7rt6dQQw/P/bllgtq8w="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/hipfft/default.nix b/pkgs/development/rocm-modules/hipfft/default.nix similarity index 96% rename from pkgs/development/rocm-modules/6/hipfft/default.nix rename to pkgs/development/rocm-modules/hipfft/default.nix index 449c9e7c1dc6..e7a4a0a7b7b5 100644 --- a/pkgs/development/rocm-modules/6/hipfft/default.nix +++ b/pkgs/development/rocm-modules/hipfft/default.nix @@ -21,7 +21,7 @@ # Can also use cuFFT stdenv.mkDerivation (finalAttrs: { pname = "hipfft"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "hipFFT"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-4W93OOKTqNteoQ4GKycr06cjvGy5NF7RR08F+rfn+0o="; + hash = "sha256-dbmCPzvz+xnvAWn610HCvmGzzLEq1IPhX78lJgY87bg="; fetchSubmodules = true; }; diff --git a/pkgs/development/rocm-modules/6/hipfort/default.nix b/pkgs/development/rocm-modules/hipfort/default.nix similarity index 95% rename from pkgs/development/rocm-modules/6/hipfort/default.nix rename to pkgs/development/rocm-modules/hipfort/default.nix index 7e86a1b0ef12..fe87494b2e48 100644 --- a/pkgs/development/rocm-modules/6/hipfort/default.nix +++ b/pkgs/development/rocm-modules/hipfort/default.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "hipfort"; - version = "6.4.3"; + version = "7.0.1"; src = fetchFromGitHub { owner = "ROCm"; repo = "hipfort"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-Nks1+0X8bLtZ9HqZXJOtrAWQlJquMH+feuu1stf/9Vo="; + hash = "sha256-s/VOaU5IKZYH0Vhtjl/UZTrnpLsJ7zWFTvAJY2x3AcA="; }; patches = [ diff --git a/pkgs/development/rocm-modules/6/hipify/default.nix b/pkgs/development/rocm-modules/hipify/default.nix similarity index 88% rename from pkgs/development/rocm-modules/6/hipify/default.nix rename to pkgs/development/rocm-modules/hipify/default.nix index 15a436814ef0..e27714f20f77 100644 --- a/pkgs/development/rocm-modules/6/hipify/default.nix +++ b/pkgs/development/rocm-modules/hipify/default.nix @@ -12,13 +12,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "hipify"; - version = "6.4.3"; + version = "7.0.1"; src = fetchFromGitHub { owner = "ROCm"; repo = "HIPIFY"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-uj25WmGCpwouS1yzW9Oil5Vyrbyj5yRITvWF9WaGozM="; + hash = "sha256-xcWUYfZvbTHs4BvDiXAOLONfLiCq9uEGOHSK/hOWg7c="; }; strictDeps = true; @@ -52,10 +52,12 @@ stdenv.mkDerivation (finalAttrs: { }; postInstall = '' + rm $out/bin/hipify-perl chmod +x $out/bin/* chmod +x $out/libexec/* patchShebangs $out/bin/ patchShebangs $out/libexec/ + ln -s $out/{libexec/hipify,bin}/hipify-perl ''; meta = { diff --git a/pkgs/development/rocm-modules/6/hiprand/default.nix b/pkgs/development/rocm-modules/hiprand/default.nix similarity index 94% rename from pkgs/development/rocm-modules/6/hiprand/default.nix rename to pkgs/development/rocm-modules/hiprand/default.nix index d72e86b5ef08..49f0ddb41d6c 100644 --- a/pkgs/development/rocm-modules/6/hiprand/default.nix +++ b/pkgs/development/rocm-modules/hiprand/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "hiprand"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "hipRAND"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-f/AWDV7vkjt8BnjhLwT2m1Y6dlZy054+z6J0UW9Glg8="; + hash = "sha256-yOLdFQ4/OGGfX75A/ElY1xD+4nkcqT8tZx2bQZgXTx4="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/hiprt/default.nix b/pkgs/development/rocm-modules/hiprt/default.nix similarity index 100% rename from pkgs/development/rocm-modules/6/hiprt/default.nix rename to pkgs/development/rocm-modules/hiprt/default.nix diff --git a/pkgs/development/rocm-modules/6/hipsolver/default.nix b/pkgs/development/rocm-modules/hipsolver/default.nix similarity index 96% rename from pkgs/development/rocm-modules/6/hipsolver/default.nix rename to pkgs/development/rocm-modules/hipsolver/default.nix index b5f8395be608..028f7e2f5f79 100644 --- a/pkgs/development/rocm-modules/6/hipsolver/default.nix +++ b/pkgs/development/rocm-modules/hipsolver/default.nix @@ -21,7 +21,7 @@ # Can also use cuSOLVER stdenv.mkDerivation (finalAttrs: { pname = "hipsolver"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "hipSOLVER"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-YP88fSM27Do0/tZ676Pvv2tr+lnlQa4vr3UnVNaVpLA="; + hash = "sha256-IZAVdu+VpSrJ/EZXymOzvrGnRLBpxUgVeaj1U+ux02M="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/hipsparse/default.nix b/pkgs/development/rocm-modules/hipsparse/default.nix similarity index 98% rename from pkgs/development/rocm-modules/6/hipsparse/default.nix rename to pkgs/development/rocm-modules/hipsparse/default.nix index cf96ecfd234e..61ec88a48f5d 100644 --- a/pkgs/development/rocm-modules/6/hipsparse/default.nix +++ b/pkgs/development/rocm-modules/hipsparse/default.nix @@ -19,7 +19,7 @@ # This can also use cuSPARSE as a backend instead of rocSPARSE stdenv.mkDerivation (finalAttrs: { pname = "hipsparse"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "hipSPARSE"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-fbh9fKlzxuIBTeCV/bEQbUS3lO6O3KoGF7/tTqRaCpE="; + hash = "sha256-hfC+QsOfDNKIZROgTZZsGbAG0yghc27PyVwCDr8MEJ8="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/llvm/clang-bodge-ignore-systemwide-incls.diff b/pkgs/development/rocm-modules/llvm/clang-bodge-ignore-systemwide-incls.diff similarity index 100% rename from pkgs/development/rocm-modules/6/llvm/clang-bodge-ignore-systemwide-incls.diff rename to pkgs/development/rocm-modules/llvm/clang-bodge-ignore-systemwide-incls.diff diff --git a/pkgs/development/rocm-modules/6/llvm/clang-log-jobs.diff b/pkgs/development/rocm-modules/llvm/clang-log-jobs.diff similarity index 100% rename from pkgs/development/rocm-modules/6/llvm/clang-log-jobs.diff rename to pkgs/development/rocm-modules/llvm/clang-log-jobs.diff diff --git a/pkgs/development/rocm-modules/6/llvm/default.nix b/pkgs/development/rocm-modules/llvm/default.nix similarity index 90% rename from pkgs/development/rocm-modules/6/llvm/default.nix rename to pkgs/development/rocm-modules/llvm/default.nix index c4ee2ce75d10..744b343f6ecf 100644 --- a/pkgs/development/rocm-modules/6/llvm/default.nix +++ b/pkgs/development/rocm-modules/llvm/default.nix @@ -2,7 +2,7 @@ lib, stdenv, # LLVM version closest to ROCm fork to override - llvmPackages_19, + llvmPackages_20, overrideCC, lndir, rocm-device-libs, @@ -11,7 +11,6 @@ symlinkJoin, rdfind, zstd, - zlib, gcc-unwrapped, glibc, replaceVars, @@ -34,12 +33,12 @@ }: let - version = "6.4.3"; + version = "7.0.1"; # major version of this should be the clang version ROCm forked from - rocmLlvmVersion = "19.0.0-rocm"; + rocmLlvmVersion = "20.0.0-rocm"; # llvmPackages_base version should match rocmLlvmVersion # so libllvm's bitcode is compatible with the built toolchain - llvmPackages_base = llvmPackages_19; + llvmPackages_base = llvmPackages_20; llvmPackagesNoBintools = llvmPackages_base.override { bootBintools = null; bootBintoolsNoLibc = null; @@ -116,7 +115,7 @@ let owner = "ROCm"; repo = "llvm-project"; rev = "rocm-${version}"; - hash = "sha256-12ftH5fMPAsbcEBmhADwW1YY/Yxo/MAK1FafKczITMg="; + hash = "sha256-C6QTDKqjeqExxgBtlCEZmgsEir1uFijgmvKCA/32+/A="; }; llvmMajorVersion = lib.versions.major rocmLlvmVersion; # An llvmPackages (pkgs/development/compilers/llvm/) built from ROCm LLVM's source tree @@ -229,9 +228,8 @@ let commonCmakeFlags = [ llvmTargetsFlag # Compression support is required for compressed offload kernels - # Set FORCE_ON so that failure to find the compression libs will be a build error + # Set FORCE_ON so that failure to find the compression lib will be a build error (lib.cmakeFeature "LLVM_ENABLE_ZSTD" "FORCE_ON") - (lib.cmakeFeature "LLVM_ENABLE_ZLIB" "FORCE_ON") # required for threaded ThinLTO to work (lib.cmakeBool "LLVM_ENABLE_THREADS" true) # LLVM tries to call git to embed VCS info if FORCE_VC_ aren't set @@ -271,6 +269,7 @@ let "-g1" ] ); + inherit (llvmPackagesRocm) libcxx; in overrideLlvmPackagesRocm (s: { libllvm = (s.prev.libllvm.override { }).overrideAttrs (old: { @@ -282,13 +281,6 @@ overrideLlvmPackagesRocm (s: { hash = "sha256-yly93PvGIXOnFeDGZ2W+W6SyhdWFM6iwA+qOeaptrh0="; relative = "llvm"; }) - (fetchpatch { - # fix tools/llvm-exegesis/X86/latency/ failing with glibc 2.4+ - name = "exegesis-latency-glibc-fix.patch"; - sha256 = "sha256-CjKxQlYwHXTM0mVnv8k/ssg5OXuKpJxRvBZGXjrFZAg="; - url = "https://github.com/llvm/llvm-project/commit/1e8df9e85a1ff213e5868bd822877695f27504ad.patch"; - relative = "llvm"; - }) ./perf-increase-namestring-size.patch # TODO: consider reapplying "Don't include aliases in RegisterClassInfo::IgnoreCSRForAllocOrder" # it was reverted as it's a pessimization for non-GPU archs, but this compiler @@ -299,7 +291,6 @@ overrideLlvmPackagesRocm (s: { nativeBuildInputs = old.nativeBuildInputs ++ [ removeReferencesTo ]; buildInputs = old.buildInputs ++ [ zstd - zlib ]; preFixup = '' moveToOutput "lib/lib*.a" "$dev" @@ -329,7 +320,6 @@ overrideLlvmPackagesRocm (s: { ]; buildInputs = old.buildInputs ++ [ zstd - zlib ]; env = (old.env or { }) // { NIX_CFLAGS_COMPILE = "${(old.env or { }).NIX_CFLAGS_COMPILE or ""} ${llvmExtraCflags}"; @@ -351,25 +341,7 @@ overrideLlvmPackagesRocm (s: { passthru = old.passthru // { inherit gcc-prefix; }; - patches = [ - (fetchpatch { - # [PATCH] [clang] Install scan-build-py into plain "lib" directory - # Backported so 19/clang/gnu-install-dirs patch applies to AMD's LLVM fork - hash = "sha256-bOqAjBwRKcERpQkiBpuojGs6ddd5Ht3zL5l3TuJK2w8="; - url = "https://github.com/llvm/llvm-project/commit/816fde1cbb700ebcc8b3df81fb93d675c04c12cd.patch"; - relative = "clang"; - }) - (fetchpatch { - # [PATCH] Reapply "[CUDA][HIP] Add a __device__ version of std::__glibcxx_assert_fail()" - # Fix errors with gcc15 - # https://github.com/ROCm/composable_kernel/issues/2887 - hash = "sha256-liowyS6FTsDhH8mJYXsanK7GEIlXFhd68GRDf/7Y6gg="; - url = "https://github.com/llvm/llvm-project/commit/8ec0552a7f1f50986dda6d13eae310d121d7e3ba.patch"; - relative = "clang"; - }) - ] - ++ old.patches - ++ [ + patches = old.patches ++ [ # Never add FHS include paths ./clang-bodge-ignore-systemwide-incls.diff # Prevents builds timing out if a single compiler invocation is very slow but @@ -383,6 +355,14 @@ overrideLlvmPackagesRocm (s: { url = "https://github.com/GZGavinZhao/rocm-llvm-project/commit/6d296f879b0fed830c54b2a9d26240da86c8bb3a.patch"; relative = "clang"; }) + (fetchpatch { + # [PATCH] Reapply "[CUDA][HIP] Add a __device__ version of std::__glibcxx_assert_fail()" + # Fix errors with gcc15 + # https://github.com/ROCm/composable_kernel/issues/2887 + hash = "sha256-liowyS6FTsDhH8mJYXsanK7GEIlXFhd68GRDf/7Y6gg="; + url = "https://github.com/llvm/llvm-project/commit/8ec0552a7f1f50986dda6d13eae310d121d7e3ba.patch"; + relative = "clang"; + }) ]; hardeningDisable = [ "all" ]; nativeBuildInputs = old.nativeBuildInputs ++ [ @@ -390,7 +370,6 @@ overrideLlvmPackagesRocm (s: { ]; buildInputs = old.buildInputs ++ [ zstd - zlib ]; env = (old.env or { }) // { NIX_CFLAGS_COMPILE = "${(old.env or { }).NIX_CFLAGS_COMPILE or ""} ${llvmExtraCflags}"; @@ -465,20 +444,6 @@ overrideLlvmPackagesRocm (s: { isGNU = false; }; compiler-rt-libc = s.prev.compiler-rt-libc.overrideAttrs (old: { - patches = old.patches ++ [ - (fetchpatch { - name = "Fix-missing-main-function-in-float16-bfloat16-support-checks.patch"; - url = "https://github.com/ROCm/llvm-project/commit/68d8b3846ab1e6550910f2a9a685690eee558af2.patch"; - hash = "sha256-Db+L1HFMWVj4CrofsGbn5lnMoCzEcU+7q12KKFb17/g="; - relative = "compiler-rt"; - }) - (fetchpatch { - # Fixes fortify hardening compile error related to openat usage - hash = "sha256-pgpN1q1vIQrPXHPxNSZ6zfgV2EflHO5Amzl+2BDjXbs="; - url = "https://github.com/llvm/llvm-project/commit/155b7a12820ec45095988b6aa6e057afaf2bc892.patch"; - relative = "compiler-rt"; - }) - ]; meta = old.meta // llvmMeta; }); compiler-rt = s.final.compiler-rt-libc; @@ -509,11 +474,14 @@ overrideLlvmPackagesRocm (s: { ]; buildInputs = old.buildInputs ++ [ clang-unwrapped - zlib zstd libxml2 libffi ]; + postFixup = '' + ${old.postFixup or ""} + ln -s $out/lib/libomp.so $dev/lib/libomp.so + ''; }); # AMD has a separate MLIR impl which we package under rocmPackages.rocmlir # It would be an error to rely on the original mlir package from this scope diff --git a/pkgs/development/rocm-modules/6/llvm/opt-offload-compress-on-by-default.patch b/pkgs/development/rocm-modules/llvm/opt-offload-compress-on-by-default.patch similarity index 100% rename from pkgs/development/rocm-modules/6/llvm/opt-offload-compress-on-by-default.patch rename to pkgs/development/rocm-modules/llvm/opt-offload-compress-on-by-default.patch diff --git a/pkgs/development/rocm-modules/6/llvm/perf-increase-namestring-size.patch b/pkgs/development/rocm-modules/llvm/perf-increase-namestring-size.patch similarity index 100% rename from pkgs/development/rocm-modules/6/llvm/perf-increase-namestring-size.patch rename to pkgs/development/rocm-modules/llvm/perf-increase-namestring-size.patch diff --git a/pkgs/development/rocm-modules/6/llvm/perf-shorten-gcclib-include-paths.patch b/pkgs/development/rocm-modules/llvm/perf-shorten-gcclib-include-paths.patch similarity index 100% rename from pkgs/development/rocm-modules/6/llvm/perf-shorten-gcclib-include-paths.patch rename to pkgs/development/rocm-modules/llvm/perf-shorten-gcclib-include-paths.patch diff --git a/pkgs/development/rocm-modules/6/migraphx/default.nix b/pkgs/development/rocm-modules/migraphx/default.nix similarity index 92% rename from pkgs/development/rocm-modules/6/migraphx/default.nix rename to pkgs/development/rocm-modules/migraphx/default.nix index 98ebed7c916c..e29766663ef3 100644 --- a/pkgs/development/rocm-modules/6/migraphx/default.nix +++ b/pkgs/development/rocm-modules/migraphx/default.nix @@ -59,7 +59,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "migraphx"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -75,17 +75,11 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "AMDMIGraphX"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-8iOBoRBygTvn9eX5f9cG0kBHKgKSeflqHkV6Qwh/ruA="; + hash = "sha256-P2qbj2yocmYDDgujlUVEdyqv3b+yF0RemA+Nt76KCdQ="; }; patches = [ ./msgpack-6-compat.patch - # Backport "Add quantize_bf16 to C api output" - # Required for onnxruntime 1.23+ - (fetchpatch { - url = "https://github.com/ROCm/AMDMIGraphX/commit/f33afac654dfc4558f4d9867c2d28a2d98cf49b4.patch"; - hash = "sha256-5O4UanmyhQ9Te830SISaquM4TdG/gEY3wfWSaU/cS30="; - }) ]; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/migraphx/msgpack-6-compat.patch b/pkgs/development/rocm-modules/migraphx/msgpack-6-compat.patch similarity index 100% rename from pkgs/development/rocm-modules/6/migraphx/msgpack-6-compat.patch rename to pkgs/development/rocm-modules/migraphx/msgpack-6-compat.patch diff --git a/pkgs/development/rocm-modules/6/miopen/default.nix b/pkgs/development/rocm-modules/miopen/default.nix similarity index 98% rename from pkgs/development/rocm-modules/6/miopen/default.nix rename to pkgs/development/rocm-modules/miopen/default.nix index a4b00cc2a744..0a484fdd50a2 100644 --- a/pkgs/development/rocm-modules/6/miopen/default.nix +++ b/pkgs/development/rocm-modules/miopen/default.nix @@ -37,13 +37,13 @@ gpuTargets ? clr.localGpuTargets or clr.gpuTargets, buildDocs ? false, # Needs internet because of rocm-docs-core buildTests ? false, - withComposableKernel ? composable_kernel.anyMfmaTarget, + withComposableKernel ? true, }: 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 = "6.4.3"; + version = "7.0.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-DEcVj2vOwIYYyNKEKFqZ0fb9o+/QRpwiSksxwnmgEMc="; + hash = "sha256-PJj2LzU5naAku+FOnMl+Ymad2beYYSS81/K/CR+l2UA="; fetchLFS = true; fetchSubmodules = true; # WORKAROUND: .lfsconfig is incorrectly set to exclude everything upstream diff --git a/pkgs/development/rocm-modules/6/miopen/skip-preexisting-dbs.patch b/pkgs/development/rocm-modules/miopen/skip-preexisting-dbs.patch similarity index 100% rename from pkgs/development/rocm-modules/6/miopen/skip-preexisting-dbs.patch rename to pkgs/development/rocm-modules/miopen/skip-preexisting-dbs.patch diff --git a/pkgs/development/rocm-modules/6/miopen/test-frugally-deep-model-loading.cpp b/pkgs/development/rocm-modules/miopen/test-frugally-deep-model-loading.cpp similarity index 100% rename from pkgs/development/rocm-modules/6/miopen/test-frugally-deep-model-loading.cpp rename to pkgs/development/rocm-modules/miopen/test-frugally-deep-model-loading.cpp diff --git a/pkgs/development/rocm-modules/6/miopen/test-frugally-deep-model-loading.nix b/pkgs/development/rocm-modules/miopen/test-frugally-deep-model-loading.nix similarity index 100% rename from pkgs/development/rocm-modules/6/miopen/test-frugally-deep-model-loading.nix rename to pkgs/development/rocm-modules/miopen/test-frugally-deep-model-loading.nix diff --git a/pkgs/development/rocm-modules/6/mivisionx/0001-set-__STDC_CONSTANT_MACROS-to-make-rocAL-compile.patch b/pkgs/development/rocm-modules/mivisionx/0001-set-__STDC_CONSTANT_MACROS-to-make-rocAL-compile.patch similarity index 100% rename from pkgs/development/rocm-modules/6/mivisionx/0001-set-__STDC_CONSTANT_MACROS-to-make-rocAL-compile.patch rename to pkgs/development/rocm-modules/mivisionx/0001-set-__STDC_CONSTANT_MACROS-to-make-rocAL-compile.patch diff --git a/pkgs/development/rocm-modules/6/mivisionx/default.nix b/pkgs/development/rocm-modules/mivisionx/default.nix similarity index 97% rename from pkgs/development/rocm-modules/6/mivisionx/default.nix rename to pkgs/development/rocm-modules/mivisionx/default.nix index fd0f16ec05f6..20f6e31007df 100644 --- a/pkgs/development/rocm-modules/6/mivisionx/default.nix +++ b/pkgs/development/rocm-modules/mivisionx/default.nix @@ -40,13 +40,13 @@ stdenv.mkDerivation (finalAttrs: { "cpu" ); - version = "6.4.3"; + version = "7.0.1"; src = fetchFromGitHub { owner = "ROCm"; repo = "MIVisionX"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-07MivgCYmKLnhGDjOYsFBfwIxEoQLYNoRbOo3MPpVzE="; + hash = "sha256-SO0rE86UmX9f574ALdnnBDFceKGKTvJDQ8Lf7iSlJtA="; }; patches = [ diff --git a/pkgs/development/rocm-modules/6/mscclpp/default.nix b/pkgs/development/rocm-modules/mscclpp/default.nix similarity index 100% rename from pkgs/development/rocm-modules/6/mscclpp/default.nix rename to pkgs/development/rocm-modules/mscclpp/default.nix diff --git a/pkgs/development/rocm-modules/6/rccl/default.nix b/pkgs/development/rocm-modules/rccl/default.nix similarity index 96% rename from pkgs/development/rocm-modules/6/rccl/default.nix rename to pkgs/development/rocm-modules/rccl/default.nix index af55ded29c50..f7a0a7951104 100644 --- a/pkgs/development/rocm-modules/6/rccl/default.nix +++ b/pkgs/development/rocm-modules/rccl/default.nix @@ -13,6 +13,7 @@ perl, hipify, python3, + fmt, gtest, chrpath, roctracer, @@ -39,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 = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -49,8 +50,6 @@ stdenv.mkDerivation (finalAttrs: { ]; patches = [ - ./fix-mainline-support-and-ub.diff - ./enable-mscclpp-on-all-gfx9.diff ./rccl-test-missing-iomanip.diff ./fix_hw_reg_hw_id_gt_gfx10.patch ]; @@ -59,7 +58,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "rccl"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-XpD+UjgdbAoGYK5UvvTX3f8rny4tiEDH/vYoCdZhtjo="; + hash = "sha256-ASU+RB0Fhb1E8zZR3wLzbnLoigXWH3aNWirViRDdkw0="; }; nativeBuildInputs = [ @@ -75,6 +74,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ rocm-smi + fmt gtest roctracer rocprofiler diff --git a/pkgs/development/rocm-modules/6/rccl/fix_hw_reg_hw_id_gt_gfx10.patch b/pkgs/development/rocm-modules/rccl/fix_hw_reg_hw_id_gt_gfx10.patch similarity index 100% rename from pkgs/development/rocm-modules/6/rccl/fix_hw_reg_hw_id_gt_gfx10.patch rename to pkgs/development/rocm-modules/rccl/fix_hw_reg_hw_id_gt_gfx10.patch diff --git a/pkgs/development/rocm-modules/6/rccl/rccl-test-missing-iomanip.diff b/pkgs/development/rocm-modules/rccl/rccl-test-missing-iomanip.diff similarity index 100% rename from pkgs/development/rocm-modules/6/rccl/rccl-test-missing-iomanip.diff rename to pkgs/development/rocm-modules/rccl/rccl-test-missing-iomanip.diff diff --git a/pkgs/development/rocm-modules/6/rdc/default.nix b/pkgs/development/rocm-modules/rdc/default.nix similarity index 97% rename from pkgs/development/rocm-modules/6/rdc/default.nix rename to pkgs/development/rocm-modules/rdc/default.nix index 48fa4c203661..a8d661d27045 100644 --- a/pkgs/development/rocm-modules/6/rdc/default.nix +++ b/pkgs/development/rocm-modules/rdc/default.nix @@ -48,7 +48,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "rdc"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "rdc"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-zILZPW9Lx5T+cMDqTg/zWy3ro+Nypzc9bDNTupZjt4s="; + hash = "sha256-ztInmK3oCbvnLe7XQ55/hUHRyhuZ2M2XVTG1NcVHtGs="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/release-attrPaths-gen.nix b/pkgs/development/rocm-modules/release-attrPaths-gen.nix similarity index 100% rename from pkgs/development/rocm-modules/6/release-attrPaths-gen.nix rename to pkgs/development/rocm-modules/release-attrPaths-gen.nix diff --git a/pkgs/development/rocm-modules/6/release-attrPaths-gen.sh b/pkgs/development/rocm-modules/release-attrPaths-gen.sh similarity index 100% rename from pkgs/development/rocm-modules/6/release-attrPaths-gen.sh rename to pkgs/development/rocm-modules/release-attrPaths-gen.sh diff --git a/pkgs/development/rocm-modules/6/release-attrPaths.json b/pkgs/development/rocm-modules/release-attrPaths.json similarity index 100% rename from pkgs/development/rocm-modules/6/release-attrPaths.json rename to pkgs/development/rocm-modules/release-attrPaths.json diff --git a/pkgs/development/rocm-modules/6/rocalution/default.nix b/pkgs/development/rocm-modules/rocalution/default.nix similarity index 96% rename from pkgs/development/rocm-modules/6/rocalution/default.nix rename to pkgs/development/rocm-modules/rocalution/default.nix index b83aed0a86ce..a8d700d93ec4 100644 --- a/pkgs/development/rocm-modules/6/rocalution/default.nix +++ b/pkgs/development/rocm-modules/rocalution/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocalution"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "rocALUTION"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-bZx1Cc2jcIfysohKCKzj5mowM3IeCelRhVaBU73KnTo="; + hash = "sha256-/Tcb11/63MWnUTyigDrL2slwqL8C553hG5OKRYZan7s="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/rocblas/default.nix b/pkgs/development/rocm-modules/rocblas/default.nix similarity index 89% rename from pkgs/development/rocm-modules/6/rocblas/default.nix rename to pkgs/development/rocm-modules/rocblas/default.nix index c7523b883d7f..8cbe639f7622 100644 --- a/pkgs/development/rocm-modules/6/rocblas/default.nix +++ b/pkgs/development/rocm-modules/rocblas/default.nix @@ -40,13 +40,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "rocblas${clr.gpuArchSuffix}"; - version = "6.4.3"; + version = "7.0.1"; src = fetchFromGitHub { owner = "ROCm"; repo = "rocBLAS"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-FCzo/BOk4xLEFkdOdqcCXh4a9t3/OIIBEy8oz6oOMWg="; + hash = "sha256-iWSeJWPJ1/kMuw5lOijpI/PLGehAElqX6EKe+sqZDfQ="; }; outputs = [ "out" ] ++ lib.optional buildBenchmarks "benchmark" ++ lib.optional buildTests "test"; @@ -122,7 +122,7 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals buildTensile [ "-DCPACK_SET_DESTDIR=OFF" "-DLINK_BLIS=ON" - "-DBLIS_LIB=${amd-blis}/lib/libblis-mt.so" + "-DBLAS_LIBRARY=${amd-blis}/lib/libblis-mt.so" "-DBLIS_INCLUDE_DIR=${amd-blis}/include/blis/" "-DBLA_PREFER_PKGCONFIG=ON" "-DTensile_CODE_OBJECT_VERSION=default" @@ -136,23 +136,27 @@ stdenv.mkDerivation (finalAttrs: { patches = [ (fetchpatch { name = "Extend-rocBLAS-HIP-ISA-compatibility.patch"; - url = "https://github.com/GZGavinZhao/rocBLAS/commit/89b75ff9cc731f71f370fad90517395e117b03bb.patch"; - hash = "sha256-W/ohOOyNCcYYLOiQlPzsrTlNtCBdJpKVxO8s+4G7sjo="; + url = "https://github.com/GZGavinZhao/rocm-libraries/commit/2850f22f80f90c9e498f520608a82989a4932ec3.patch"; + hash = "sha256-SPsdEwGe+r8bQudkChRzBDAgu3tPQWFweZCgzh+4nOE="; + stripLen = 2; }) - ./hiplaslt-unstable-compat.patch ]; # Pass $NIX_BUILD_CORES to Tensile postPatch = '' substituteInPlace cmake/build-options.cmake \ --replace-fail 'Tensile_CPU_THREADS ""' 'Tensile_CPU_THREADS "$ENV{NIX_BUILD_CORES}"' - substituteInPlace CMakeLists.txt \ - --replace-fail "4.43.0" "4.44.0" \ - --replace-fail '0.10' '1.0' + '' + # Workaround: libblis detection uses broken absolute paths + # TODO: upstream a proper fix + + '' + substituteInPlace clients/CMakeLists.txt \ + --replace-fail "if ( NOT WIN32 )" "if(OFF)" \ + --replace-fail "else() # WIN32" "elseif(OFF)" '' # Fixes sh: line 1: /usr/bin/diff: No such file or directory # /build/source/clients/gtest/../include/testing_logging.hpp:1117: Failure - + lib.optionals buildTests '' + + lib.optionalString buildTests '' substituteInPlace clients/include/testing_logging.hpp \ --replace-fail "/usr/bin/diff" "${lib.getExe' diffutils "diff"}" ''; diff --git a/pkgs/development/rocm-modules/6/rocblas/hiplaslt-unstable-compat.patch b/pkgs/development/rocm-modules/rocblas/hiplaslt-unstable-compat.patch similarity index 100% rename from pkgs/development/rocm-modules/6/rocblas/hiplaslt-unstable-compat.patch rename to pkgs/development/rocm-modules/rocblas/hiplaslt-unstable-compat.patch diff --git a/pkgs/development/rocm-modules/6/rocdbgapi/default.nix b/pkgs/development/rocm-modules/rocdbgapi/default.nix similarity index 96% rename from pkgs/development/rocm-modules/6/rocdbgapi/default.nix rename to pkgs/development/rocm-modules/rocdbgapi/default.nix index ca760ec933a0..afaa4b301b0d 100644 --- a/pkgs/development/rocm-modules/6/rocdbgapi/default.nix +++ b/pkgs/development/rocm-modules/rocdbgapi/default.nix @@ -47,7 +47,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "rocdbgapi"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -60,7 +60,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "ROCdbgapi"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-Rr8+SNeFps0rjk4Jn2+rFmtRJfL42l0tNOz13oZQy+I="; + hash = "sha256-08ixnumXizPuO65Y1vRVDfiZetyuS9pQ7ZqE0m3rRhQ="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/rocfft/default.nix b/pkgs/development/rocm-modules/rocfft/default.nix similarity index 97% rename from pkgs/development/rocm-modules/6/rocfft/default.nix rename to pkgs/development/rocm-modules/rocfft/default.nix index 4b5cae75a206..91b1dcb3e7c5 100644 --- a/pkgs/development/rocm-modules/6/rocfft/default.nix +++ b/pkgs/development/rocm-modules/rocfft/default.nix @@ -20,13 +20,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocfft${clr.gpuArchSuffix}"; - version = "6.4.3"; + version = "7.0.1"; src = fetchFromGitHub { owner = "ROCm"; repo = "rocFFT"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-yaOjBF2aJkCBlxkydyOsrfT4lNZ0BVkS2jJC0fEiBug="; + hash = "sha256-z2FNJAfEcIZq7tuxcD1n9qob5PpAMV2zMQi99br3XjQ="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/rocfft/log-every-n-aot-jobs.patch b/pkgs/development/rocm-modules/rocfft/log-every-n-aot-jobs.patch similarity index 100% rename from pkgs/development/rocm-modules/6/rocfft/log-every-n-aot-jobs.patch rename to pkgs/development/rocm-modules/rocfft/log-every-n-aot-jobs.patch diff --git a/pkgs/development/rocm-modules/6/rocgdb/default.nix b/pkgs/development/rocm-modules/rocgdb/default.nix similarity index 96% rename from pkgs/development/rocm-modules/6/rocgdb/default.nix rename to pkgs/development/rocm-modules/rocgdb/default.nix index 9453e6292fc3..b729a37c841d 100644 --- a/pkgs/development/rocm-modules/6/rocgdb/default.nix +++ b/pkgs/development/rocm-modules/rocgdb/default.nix @@ -23,13 +23,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocgdb"; - version = "6.4.3"; + version = "7.0.1"; src = fetchFromGitHub { owner = "ROCm"; repo = "ROCgdb"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-evDWg2w2FHv6OU5BQOCAXTlDm7JpwdJ3Wh5a2i5r1gQ="; + hash = "sha256-OsEzhdLE+L6x6BsIbQXRK8OpEucRmdSBaZJNrLmzz+M="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/rocm-bandwidth-test/default.nix b/pkgs/development/rocm-modules/rocm-bandwidth-test/default.nix similarity index 100% rename from pkgs/development/rocm-modules/6/rocm-bandwidth-test/default.nix rename to pkgs/development/rocm-modules/rocm-bandwidth-test/default.nix diff --git a/pkgs/development/rocm-modules/6/rocm-cmake/default.nix b/pkgs/development/rocm-modules/rocm-cmake/default.nix similarity index 89% rename from pkgs/development/rocm-modules/6/rocm-cmake/default.nix rename to pkgs/development/rocm-modules/rocm-cmake/default.nix index c8dfc1539076..dacef47f514b 100644 --- a/pkgs/development/rocm-modules/6/rocm-cmake/default.nix +++ b/pkgs/development/rocm-modules/rocm-cmake/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocm-cmake"; - version = "6.4.3"; + version = "7.0.1"; src = fetchFromGitHub { owner = "ROCm"; repo = "rocm-cmake"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-wAipNWAB66YNf7exLSNPAzg3NgkGD9LPKfKiulL5yak="; + hash = "sha256-Gu+w+2dXKXcJtdmpODByxQaZbYMkoAeX9/0tOcGy5Es="; }; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/rocm-modules/6/rocm-comgr/default.nix b/pkgs/development/rocm-modules/rocm-comgr/default.nix similarity index 100% rename from pkgs/development/rocm-modules/6/rocm-comgr/default.nix rename to pkgs/development/rocm-modules/rocm-comgr/default.nix diff --git a/pkgs/development/rocm-modules/6/rocm-core/default.nix b/pkgs/development/rocm-modules/rocm-core/default.nix similarity index 97% rename from pkgs/development/rocm-modules/6/rocm-core/default.nix rename to pkgs/development/rocm-modules/rocm-core/default.nix index 54955d0064d2..1c412c9c4e17 100644 --- a/pkgs/development/rocm-modules/6/rocm-core/default.nix +++ b/pkgs/development/rocm-modules/rocm-core/default.nix @@ -17,13 +17,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "rocm-core"; - version = "6.4.3"; + version = "7.0.1"; src = fetchFromGitHub { owner = "ROCm"; repo = "rocm-core"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-Z21k+0vi/P35WTHGAdfUAX7/jVv+d9g5YBo+HTi1Mpk="; + hash = "sha256-TKHNtY3XoLznOi1aVHdxFk3bedtLKkrFy0NVm0ad6ZY="; }; patches = [ diff --git a/pkgs/development/rocm-modules/6/rocm-core/env-rocm-path.patch b/pkgs/development/rocm-modules/rocm-core/env-rocm-path.patch similarity index 100% rename from pkgs/development/rocm-modules/6/rocm-core/env-rocm-path.patch rename to pkgs/development/rocm-modules/rocm-core/env-rocm-path.patch diff --git a/pkgs/development/rocm-modules/6/rocm-device-libs/cmake.patch b/pkgs/development/rocm-modules/rocm-device-libs/cmake.patch similarity index 100% rename from pkgs/development/rocm-modules/6/rocm-device-libs/cmake.patch rename to pkgs/development/rocm-modules/rocm-device-libs/cmake.patch diff --git a/pkgs/development/rocm-modules/6/rocm-device-libs/default.nix b/pkgs/development/rocm-modules/rocm-device-libs/default.nix similarity index 100% rename from pkgs/development/rocm-modules/6/rocm-device-libs/default.nix rename to pkgs/development/rocm-modules/rocm-device-libs/default.nix diff --git a/pkgs/development/rocm-modules/6/rocm-docs-core/default.nix b/pkgs/development/rocm-modules/rocm-docs-core/default.nix similarity index 100% rename from pkgs/development/rocm-modules/6/rocm-docs-core/default.nix rename to pkgs/development/rocm-modules/rocm-docs-core/default.nix diff --git a/pkgs/development/rocm-modules/6/rocm-runtime/default.nix b/pkgs/development/rocm-modules/rocm-runtime/default.nix similarity index 83% rename from pkgs/development/rocm-modules/6/rocm-runtime/default.nix rename to pkgs/development/rocm-modules/rocm-runtime/default.nix index 809a094e2752..533a493c71be 100644 --- a/pkgs/development/rocm-modules/6/rocm-runtime/default.nix +++ b/pkgs/development/rocm-modules/rocm-runtime/default.nix @@ -16,13 +16,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocm-runtime"; - version = "6.4.3"; + version = "7.0.1"; src = fetchFromGitHub { owner = "ROCm"; repo = "ROCR-Runtime"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-zs0nydwYUY+8uiPyJxgTfAiV7spUMbESb0jUUvFf+AU="; + hash = "sha256-APFcC17JxTxTkJvaAeKezN70wXjWLTDpeIDj8e/mwhQ="; }; cmakeBuildType = "RelWithDebInfo"; @@ -59,11 +59,6 @@ stdenv.mkDerivation (finalAttrs: { 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] hsa-runtime: set underlying type of hsa_region_info_t and hsa_amd_region_info_t to int - url = "https://github.com/ROCm/ROCR-Runtime/commit/39a6a168fa07e289a10f6e20e6ead4e303e99ba0.patch"; - hash = "sha256-CshJJDvII1nNyNmt+YjwMwfBHUTlrdsxkhwfgBwO+WE="; - }) (fetchpatch { # [PATCH] queues: fix UB due to 1 << 31 url = "https://github.com/ROCm/ROCR-Runtime/commit/9b8a0f5dbee1903fa990a7d8accc1c5fbc549636.patch"; @@ -79,12 +74,6 @@ stdenv.mkDerivation (finalAttrs: { url = "https://github.com/ROCm/ROCR-Runtime/commit/41bfc66aef437a5b349f71105fa4b907cc7e17d5.patch"; hash = "sha256-A7VhPR3eSsmjq2cTBSjBIz9i//WiNjoXm0EsRKtF+ns="; }) - # Fix build with gcc15 - (fetchpatch { - # [PATCH] rocr:Add missing cstdint include - url = "https://github.com/ROCm/ROCR-Runtime/commit/5cc61b714d5b59ed5405639a37a582d839e6ebe9.patch"; - hash = "sha256-IPxDShpoFB0PjCG+zwFbnW9IBTCG3G2o9sfITGs+bN4="; - }) # This causes a circular dependency, aqlprofile relies on hsa-runtime64 # which is part of rocm-runtime # Worked around by having rocprofiler load aqlprofile directly diff --git a/pkgs/development/rocm-modules/6/rocm-runtime/remove-hsa-aqlprofile-dep.patch b/pkgs/development/rocm-modules/rocm-runtime/remove-hsa-aqlprofile-dep.patch similarity index 100% rename from pkgs/development/rocm-modules/6/rocm-runtime/remove-hsa-aqlprofile-dep.patch rename to pkgs/development/rocm-modules/rocm-runtime/remove-hsa-aqlprofile-dep.patch diff --git a/pkgs/development/rocm-modules/6/rocm-smi/default.nix b/pkgs/development/rocm-modules/rocm-smi/default.nix similarity index 93% rename from pkgs/development/rocm-modules/6/rocm-smi/default.nix rename to pkgs/development/rocm-modules/rocm-smi/default.nix index 26107f9de3f6..beedc4cb2d06 100644 --- a/pkgs/development/rocm-modules/6/rocm-smi/default.nix +++ b/pkgs/development/rocm-modules/rocm-smi/default.nix @@ -11,19 +11,15 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocm-smi"; - version = "6.4.3"; + version = "7.0.1"; src = fetchFromGitHub { owner = "ROCm"; repo = "rocm_smi_lib"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-yJ3Bf+tM39JWbY+A0NlpHNkvythdAdz6ZVp1AvLcXhk="; + hash = "sha256-jhjdx3xF6hu+p99dFAGgUwQ2fIhNf5WzeZqeWW1fKc4="; }; - patches = [ - ./cmake.patch - ]; - propagatedBuildInputs = [ libdrm ]; @@ -39,6 +35,7 @@ stdenv.mkDerivation (finalAttrs: { # See: https://github.com/NixOS/nixpkgs/pull/197838 "-DCMAKE_INSTALL_BINDIR=bin" "-DCMAKE_INSTALL_LIBDIR=lib" + "-DCMAKE_INSTALL_LIBEXECDIR=libexec" "-DCMAKE_INSTALL_INCLUDEDIR=include" ]; diff --git a/pkgs/development/rocm-modules/6/rocm-tests/default.nix b/pkgs/development/rocm-modules/rocm-tests/default.nix similarity index 100% rename from pkgs/development/rocm-modules/6/rocm-tests/default.nix rename to pkgs/development/rocm-modules/rocm-tests/default.nix diff --git a/pkgs/development/rocm-modules/6/rocminfo/default.nix b/pkgs/development/rocm-modules/rocminfo/default.nix similarity index 92% rename from pkgs/development/rocm-modules/6/rocminfo/default.nix rename to pkgs/development/rocm-modules/rocminfo/default.nix index 9a149e58a9b2..6197e1f42dc2 100644 --- a/pkgs/development/rocm-modules/6/rocminfo/default.nix +++ b/pkgs/development/rocm-modules/rocminfo/default.nix @@ -12,14 +12,14 @@ }: stdenv.mkDerivation (finalAttrs: { - version = "6.4.3"; + version = "7.0.1"; pname = "rocminfo"; src = fetchFromGitHub { owner = "ROCm"; repo = "rocminfo"; rev = "rocm-${finalAttrs.version}"; - sha256 = "sha256-YscZ5sFsLOVBg98w2X6vTzniTvl9NfCkIE+HAH6vv5Y="; + sha256 = "sha256-wE1/golRQm5uggXRQ1BucxV3laypSOUCvjTFx5N2yTE="; }; strictDeps = true; diff --git a/pkgs/development/rocm-modules/6/rocmlir/default.nix b/pkgs/development/rocm-modules/rocmlir/default.nix similarity index 97% rename from pkgs/development/rocm-modules/6/rocmlir/default.nix rename to pkgs/development/rocm-modules/rocmlir/default.nix index 487c3b460a96..c9a5ab561f88 100644 --- a/pkgs/development/rocm-modules/6/rocmlir/default.nix +++ b/pkgs/development/rocm-modules/rocmlir/default.nix @@ -39,7 +39,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "rocmlir${suffix}"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "rocMLIR"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-p/gvr1Z6yZtO5N+ecSouXiCrf520jt1HMOy/tohUHfI="; + hash = "sha256-W5CFmUd2f33nlVGyeygYQ0IY9X5QM7/Wkt1XHOZBl4Q="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/rocprim/default.nix b/pkgs/development/rocm-modules/rocprim/default.nix similarity index 95% rename from pkgs/development/rocm-modules/6/rocprim/default.nix rename to pkgs/development/rocm-modules/rocprim/default.nix index 690f1415df34..71388c8d93d2 100644 --- a/pkgs/development/rocm-modules/6/rocprim/default.nix +++ b/pkgs/development/rocm-modules/rocprim/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocprim"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "rocPRIM"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-lH4MlBEkVJocq1VliGBtb7VvWfS6p/uIKWR239fSjRY="; + hash = "sha256-wj1H5JE7C5XJ8wwjzCA8ByO6cUC/V0ZI7bRaHmfugLc="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/rocprofiler-register/default.nix b/pkgs/development/rocm-modules/rocprofiler-register/default.nix similarity index 84% rename from pkgs/development/rocm-modules/6/rocprofiler-register/default.nix rename to pkgs/development/rocm-modules/rocprofiler-register/default.nix index 97de42a61e61..698a65747566 100644 --- a/pkgs/development/rocm-modules/6/rocprofiler-register/default.nix +++ b/pkgs/development/rocm-modules/rocprofiler-register/default.nix @@ -18,22 +18,16 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocprofiler-register"; - version = "6.4.3"; + version = "7.0.1"; src = fetchFromGitHub { owner = "ROCm"; repo = "rocprofiler-register"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-HaN4XMHuCRDfKOpfuZ2SkOEQfAZKouh6luqbtATUYm0="; + hash = "sha256-2uAS/9gHinVLCMa/fX+6T+0RyHCLToyxDeobolZoD+g="; fetchSubmodules = true; }; - # vendored glog is too old and breaks on CMake 4, gets bumped in ROCm 7.0 - postPatch = '' - substituteInPlace external/glog/cmake/GetCacheVariables.cmake \ - --replace-fail "(VERSION 3.3)" "(VERSION 3.5)" - ''; - nativeBuildInputs = [ cmake clang diff --git a/pkgs/development/rocm-modules/6/rocprofiler/default.nix b/pkgs/development/rocm-modules/rocprofiler/default.nix similarity index 97% rename from pkgs/development/rocm-modules/6/rocprofiler/default.nix rename to pkgs/development/rocm-modules/rocprofiler/default.nix index 82d974d990aa..9b3ad99ccee7 100644 --- a/pkgs/development/rocm-modules/6/rocprofiler/default.nix +++ b/pkgs/development/rocm-modules/rocprofiler/default.nix @@ -44,13 +44,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "rocprofiler"; - version = "6.4.3"; + version = "7.0.1"; src = fetchFromGitHub { owner = "ROCm"; repo = "rocprofiler"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-CgW8foM4W3K19kUK/l8IsH2Q9DHi/z88viXTxhNqlHQ="; + hash = "sha256-p2VwMm9Ltx/SFDIFk42nY9Too0Rp/IrqfuH8cQnhoGA="; fetchSubmodules = true; }; diff --git a/pkgs/development/rocm-modules/6/rocr-debug-agent/default.nix b/pkgs/development/rocm-modules/rocr-debug-agent/default.nix similarity index 85% rename from pkgs/development/rocm-modules/6/rocr-debug-agent/default.nix rename to pkgs/development/rocm-modules/rocr-debug-agent/default.nix index 6a76b9c7e5b9..49ba3089cbe0 100644 --- a/pkgs/development/rocm-modules/6/rocr-debug-agent/default.nix +++ b/pkgs/development/rocm-modules/rocr-debug-agent/default.nix @@ -4,6 +4,7 @@ fetchFromGitHub, rocmUpdateScript, cmake, + python3, clr, rocdbgapi, elfutils, @@ -11,18 +12,19 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocr-debug-agent"; - version = "6.4.3"; + version = "7.0.1"; src = fetchFromGitHub { owner = "ROCm"; repo = "rocr_debug_agent"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-otoxZ2NHkPDIFhvn4/nvaQ/W4LF38Nx9MZ9IYEf1DyY="; + hash = "sha256-twoihis1OrCQ4K3rjDgjSErq+qktqz2xwkLLxBJIJ90="; }; nativeBuildInputs = [ cmake clr + python3 # TODO: check for scripts that need patchShebangs in output ]; buildInputs = [ diff --git a/pkgs/development/rocm-modules/6/rocrand/default.nix b/pkgs/development/rocm-modules/rocrand/default.nix similarity index 95% rename from pkgs/development/rocm-modules/6/rocrand/default.nix rename to pkgs/development/rocm-modules/rocrand/default.nix index b691ca6db264..28b410370797 100644 --- a/pkgs/development/rocm-modules/6/rocrand/default.nix +++ b/pkgs/development/rocm-modules/rocrand/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocrand${clr.gpuArchSuffix}"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "rocRAND"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-pZAwmsWup0byGxJ5ADbztco8svBpIjBWITjs+OgKvQc="; + hash = "sha256-O7YCQBtFSa0xiHbbAXX2FyE6uRywEaMaJyX85875Yd0="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/rocsolver/default.nix b/pkgs/development/rocm-modules/rocsolver/default.nix similarity index 97% rename from pkgs/development/rocm-modules/6/rocsolver/default.nix rename to pkgs/development/rocm-modules/rocsolver/default.nix index a47da7a68a2a..6268bdc257f9 100644 --- a/pkgs/development/rocm-modules/6/rocsolver/default.nix +++ b/pkgs/development/rocm-modules/rocsolver/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocsolver${clr.gpuArchSuffix}"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "rocSOLVER"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-JthNY5rkrrm9bf1fgkO9HnARdX6H0kiF9EW1jMbBmj4="; + hash = "sha256-MVPffQGKsF5gyb5eTEgj6H+ikLrQTPlRB7Eg/GYYvGI="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/rocsparse/default.nix b/pkgs/development/rocm-modules/rocsparse/default.nix similarity index 98% rename from pkgs/development/rocm-modules/6/rocsparse/default.nix rename to pkgs/development/rocm-modules/rocsparse/default.nix index dc7ca260d293..232afb68179a 100644 --- a/pkgs/development/rocm-modules/6/rocsparse/default.nix +++ b/pkgs/development/rocm-modules/rocsparse/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocsparse${clr.gpuArchSuffix}"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "rocSPARSE"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-PrLyqHMAJYACkBMz97iBfwCaQ9Kf1IBL7IEf1IF1/m0="; + hash = "sha256-tLBfVAoviHL0LpwWslvz2w2b7wwW5xj6kKKqADTjC4s="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/rocsparse/deps.nix b/pkgs/development/rocm-modules/rocsparse/deps.nix similarity index 100% rename from pkgs/development/rocm-modules/6/rocsparse/deps.nix rename to pkgs/development/rocm-modules/rocsparse/deps.nix diff --git a/pkgs/development/rocm-modules/6/rocthrust/default.nix b/pkgs/development/rocm-modules/rocthrust/default.nix similarity index 95% rename from pkgs/development/rocm-modules/6/rocthrust/default.nix rename to pkgs/development/rocm-modules/rocthrust/default.nix index 298f2149e6a9..9eb25b017023 100644 --- a/pkgs/development/rocm-modules/6/rocthrust/default.nix +++ b/pkgs/development/rocm-modules/rocthrust/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocthrust"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "rocThrust"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-IfMBVISClD1dk7FnAakP2GIpyZFrCnAloFRTaNdSKyw="; + hash = "sha256-tbGEZ8NXu7euPN8CaRYOjcmTmYq1SUP7LNKOjO0RICE="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/roctracer/default.nix b/pkgs/development/rocm-modules/roctracer/default.nix similarity index 96% rename from pkgs/development/rocm-modules/6/roctracer/default.nix rename to pkgs/development/rocm-modules/roctracer/default.nix index 43e161df0f27..ce9baed22619 100644 --- a/pkgs/development/rocm-modules/6/roctracer/default.nix +++ b/pkgs/development/rocm-modules/roctracer/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "roctracer"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "roctracer"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-Dwk5cBZLysmsVA2kwpQM0FQt2KXOGcaZcAw/d8VUaXw="; + hash = "sha256-8DMwaMtzdBuAAV5KhQfqLfTtSyvPiwZxc1lAAoeXGus="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/rocwmma/0000-dont-fetch-googletest.patch b/pkgs/development/rocm-modules/rocwmma/0000-dont-fetch-googletest.patch similarity index 100% rename from pkgs/development/rocm-modules/6/rocwmma/0000-dont-fetch-googletest.patch rename to pkgs/development/rocm-modules/rocwmma/0000-dont-fetch-googletest.patch diff --git a/pkgs/development/rocm-modules/6/rocwmma/default.nix b/pkgs/development/rocm-modules/rocwmma/default.nix similarity index 96% rename from pkgs/development/rocm-modules/6/rocwmma/default.nix rename to pkgs/development/rocm-modules/rocwmma/default.nix index daffc4407560..ddff8d17598a 100644 --- a/pkgs/development/rocm-modules/6/rocwmma/default.nix +++ b/pkgs/development/rocm-modules/rocwmma/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocwmma"; - version = "6.4.3"; + version = "7.0.1"; outputs = [ "out" @@ -38,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "rocWMMA"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-fjyxMrzt74rE7Gf4v4WawYltuw1fvahwZUpauMIE3qc="; + hash = "sha256-EnQF3V8sk234JNZTqpVUcRv8pVFWpkFJYVgLLuxqm2E="; }; patches = lib.optionals (buildTests || buildBenchmarks) [ diff --git a/pkgs/development/rocm-modules/6/rpp/default.nix b/pkgs/development/rocm-modules/rpp/default.nix similarity index 95% rename from pkgs/development/rocm-modules/6/rpp/default.nix rename to pkgs/development/rocm-modules/rpp/default.nix index 65909ee616fb..e8a5c2c37350 100644 --- a/pkgs/development/rocm-modules/6/rpp/default.nix +++ b/pkgs/development/rocm-modules/rpp/default.nix @@ -29,13 +29,13 @@ stdenv.mkDerivation (finalAttrs: { "cpu" ); - version = "6.4.3"; + version = "7.0.1"; src = fetchFromGitHub { owner = "ROCm"; repo = "rpp"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-rccVjSrOVIe4ZDtloCoCCI3u9UIcUqdirHIzS7ffAas="; + hash = "sha256-oysmF9TS1tm37x9DNoZ2KqHKP1wJDoFY+IuL1WkIz0o="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/6/tensile/default.nix b/pkgs/development/rocm-modules/tensile/default.nix similarity index 87% rename from pkgs/development/rocm-modules/6/tensile/default.nix rename to pkgs/development/rocm-modules/tensile/default.nix index c8a7593d2698..a1fcab0f2379 100644 --- a/pkgs/development/rocm-modules/6/tensile/default.nix +++ b/pkgs/development/rocm-modules/tensile/default.nix @@ -18,16 +18,14 @@ buildPythonPackage rec { pname = "tensile"; - # Using a specific commit which has compression support from after the 6.4 release - # Without compression packages are too large for hydra - version = "6.4-unstable-2025-06-12"; + version = "7.0.0"; pyproject = true; src = fetchFromGitHub { owner = "ROCm"; repo = "Tensile"; - rev = "1ce87a9fe73610ffb962082f0a882360cd39b103"; - hash = "sha256-qIuoIbmridy1HQVV10qPTzbccuxNJPsOvePaQQnClZc="; + rev = "rocm-${version}"; + hash = "sha256-miNQzXfr/1qIqPJqun42zp6QGI6v6K1fKIXdCfkNKow="; }; # TODO: It should be possible to run asm caps test ONCE for all supported arches diff --git a/pkgs/development/rocm-modules/6/tensile/tensile-create-library-dont-copy-twice.diff b/pkgs/development/rocm-modules/tensile/tensile-create-library-dont-copy-twice.diff similarity index 100% rename from pkgs/development/rocm-modules/6/tensile/tensile-create-library-dont-copy-twice.diff rename to pkgs/development/rocm-modules/tensile/tensile-create-library-dont-copy-twice.diff diff --git a/pkgs/development/rocm-modules/6/tensile/tensile-solutionstructs-perf-fix.diff b/pkgs/development/rocm-modules/tensile/tensile-solutionstructs-perf-fix.diff similarity index 100% rename from pkgs/development/rocm-modules/6/tensile/tensile-solutionstructs-perf-fix.diff rename to pkgs/development/rocm-modules/tensile/tensile-solutionstructs-perf-fix.diff diff --git a/pkgs/development/rocm-modules/6/update.nix b/pkgs/development/rocm-modules/update.nix similarity index 85% rename from pkgs/development/rocm-modules/6/update.nix rename to pkgs/development/rocm-modules/update.nix index 69a45f9d4cd4..6e2068a8b112 100644 --- a/pkgs/development/rocm-modules/6/update.nix +++ b/pkgs/development/rocm-modules/update.nix @@ -51,12 +51,12 @@ let >&2 echo parsed version "$version_arr" from "$version" - if (( ''${version_arr[0]} > 6 )); then - echo "'rocmPackages_6.${pname}' is already at its maximum allowed version.''\nAny further upgrades should go into 'rocmPackages_X.${pname}'." >&2 + if (( ''${version_arr[0]} > 7 )); then + echo "'rocmPackages.${pname}' is already at its maximum allowed version.''\nAny further upgrades should go into 'rocmPackages_X.${pname}'." >&2 exit 1 fi - update-source-version rocmPackages_6.${pname} "$version" --ignore-same-hash + update-source-version rocmPackages.${pname} "$version" --ignore-same-hash ''; in [ updateScript ] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 566cb5480b7c..1b49fa2ec8d9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2429,8 +2429,7 @@ with pkgs; kramdown-asciidoc = callPackage ../tools/typesetting/kramdown-asciidoc { }; - rocmPackages = recurseIntoAttrs rocmPackages_6; - rocmPackages_6 = callPackage ../development/rocm-modules/6 { }; + rocmPackages = recurseIntoAttrs (callPackage ../development/rocm-modules { }); tsm-client-withGui = callPackage ../by-name/ts/tsm-client/package.nix { enableGui = true; }; From b280ad4aafe56678efdf366a8e8ab712d04443ff Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Sun, 21 Dec 2025 05:01:26 -0800 Subject: [PATCH 03/12] rocmPackages: 7.0.1 -> 7.0.2 --- pkgs/development/rocm-modules/amdsmi/default.nix | 4 ++-- pkgs/development/rocm-modules/aqlprofile/default.nix | 8 +++----- pkgs/development/rocm-modules/clr/default.nix | 4 ++-- .../rocm-modules/composable_kernel/base.nix | 2 +- .../rocm-modules/composable_kernel/ck4inductor.nix | 3 +-- pkgs/development/rocm-modules/half/default.nix | 2 +- pkgs/development/rocm-modules/hip-common/default.nix | 4 ++-- .../rocm-modules/hipblas-common/default.nix | 2 +- pkgs/development/rocm-modules/hipblas/default.nix | 4 ++-- pkgs/development/rocm-modules/hipblaslt/default.nix | 2 +- pkgs/development/rocm-modules/hipcub/default.nix | 2 +- pkgs/development/rocm-modules/hipfft/default.nix | 4 ++-- pkgs/development/rocm-modules/hipfort/default.nix | 2 +- pkgs/development/rocm-modules/hipify/default.nix | 2 +- pkgs/development/rocm-modules/hiprand/default.nix | 2 +- pkgs/development/rocm-modules/hipsolver/default.nix | 2 +- pkgs/development/rocm-modules/hipsparse/default.nix | 2 +- pkgs/development/rocm-modules/llvm/default.nix | 12 ++---------- pkgs/development/rocm-modules/migraphx/default.nix | 4 ++-- pkgs/development/rocm-modules/miopen/default.nix | 2 +- pkgs/development/rocm-modules/mivisionx/default.nix | 2 +- pkgs/development/rocm-modules/rccl/default.nix | 4 ++-- pkgs/development/rocm-modules/rdc/default.nix | 2 +- pkgs/development/rocm-modules/rocalution/default.nix | 2 +- pkgs/development/rocm-modules/rocblas/default.nix | 4 ++-- pkgs/development/rocm-modules/rocdbgapi/default.nix | 4 ++-- pkgs/development/rocm-modules/rocfft/default.nix | 4 ++-- pkgs/development/rocm-modules/rocgdb/default.nix | 4 ++-- pkgs/development/rocm-modules/rocm-cmake/default.nix | 2 +- pkgs/development/rocm-modules/rocm-core/default.nix | 2 +- .../rocm-modules/rocm-runtime/default.nix | 4 ++-- pkgs/development/rocm-modules/rocm-smi/default.nix | 4 ++-- pkgs/development/rocm-modules/rocminfo/default.nix | 2 +- pkgs/development/rocm-modules/rocmlir/default.nix | 4 ++-- pkgs/development/rocm-modules/rocprim/default.nix | 4 ++-- .../rocm-modules/rocprofiler-register/default.nix | 4 ++-- .../development/rocm-modules/rocprofiler/default.nix | 2 +- .../rocm-modules/rocr-debug-agent/default.nix | 2 +- pkgs/development/rocm-modules/rocrand/default.nix | 2 +- pkgs/development/rocm-modules/rocsolver/default.nix | 4 ++-- pkgs/development/rocm-modules/rocsparse/default.nix | 4 ++-- pkgs/development/rocm-modules/rocthrust/default.nix | 2 +- pkgs/development/rocm-modules/roctracer/default.nix | 2 +- pkgs/development/rocm-modules/rocwmma/default.nix | 4 ++-- pkgs/development/rocm-modules/rpp/default.nix | 2 +- pkgs/development/rocm-modules/tensile/default.nix | 4 ++-- 46 files changed, 69 insertions(+), 80 deletions(-) diff --git a/pkgs/development/rocm-modules/amdsmi/default.nix b/pkgs/development/rocm-modules/amdsmi/default.nix index 692aecccf620..eb33b7608604 100644 --- a/pkgs/development/rocm-modules/amdsmi/default.nix +++ b/pkgs/development/rocm-modules/amdsmi/default.nix @@ -21,12 +21,12 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "amdsmi"; - version = "7.0.1"; + version = "7.0.2"; src = fetchFromGitHub { owner = "rocm"; repo = "amdsmi"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-66xcdMRcKYyseS+xOt4NPDa2cK4ASAlS6zB5/LUoq9A="; + hash = "sha256-1xQD68mrG1g9Bpw5/vxn+XxDM5HuAyEHyALyBixqR1s="; }; postPatch = '' diff --git a/pkgs/development/rocm-modules/aqlprofile/default.nix b/pkgs/development/rocm-modules/aqlprofile/default.nix index f73fa4760473..97fa65abfd56 100644 --- a/pkgs/development/rocm-modules/aqlprofile/default.nix +++ b/pkgs/development/rocm-modules/aqlprofile/default.nix @@ -8,15 +8,13 @@ stdenv.mkDerivation { pname = "aqlprofile"; - version = "6.4.3"; + version = "7.0.2"; src = fetchFromGitHub { - # TODO: Will move to rocm-systems repo and have proper tags in 7.x - # pinned to oddly named tag for now owner = "ROCm"; repo = "aqlprofile"; - tag = "rocm-7.0.1"; - hash = "sha256-avL78ZfB+rJ1TYaejSUzU6i5L9JeMawMwIxaTQINQdE="; + tag = "rocm-7.0.2"; + hash = "sha256-A17SAkEUf3yAGwvZUWSdL7Tn5YAXB0YlD3T1DLTjDSg="; }; env.CXXFLAGS = "-DROCP_LD_AQLPROFILE=1"; diff --git a/pkgs/development/rocm-modules/clr/default.nix b/pkgs/development/rocm-modules/clr/default.nix index 7fbf7710d3ed..4861e59fb7e2 100644 --- a/pkgs/development/rocm-modules/clr/default.nix +++ b/pkgs/development/rocm-modules/clr/default.nix @@ -70,7 +70,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "clr"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" @@ -84,7 +84,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "clr"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-z7qmL7c/0zlB5/rb7zporfeUPM9KIkS1iZf6GmYFxbo="; + hash = "sha256-zajb/iTtF/ECRScdcQ85HPgq8DdIGqSinJoVyyi89bw="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/composable_kernel/base.nix b/pkgs/development/rocm-modules/composable_kernel/base.nix index 6c9604be5b31..5c51c4208d40 100644 --- a/pkgs/development/rocm-modules/composable_kernel/base.nix +++ b/pkgs/development/rocm-modules/composable_kernel/base.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: { ''; pname = "composable_kernel_base"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/composable_kernel/ck4inductor.nix b/pkgs/development/rocm-modules/composable_kernel/ck4inductor.nix index 428daae27fa5..ce3d9363e9d2 100644 --- a/pkgs/development/rocm-modules/composable_kernel/ck4inductor.nix +++ b/pkgs/development/rocm-modules/composable_kernel/ck4inductor.nix @@ -14,8 +14,7 @@ buildPythonPackage { setuptools setuptools-scm ]; - version = "7.0"; - inherit (composable_kernel) src; + inherit (composable_kernel) version src; pythonImportsCheck = [ "ck4inductor" "ck4inductor.universal_gemm.gen_instances" diff --git a/pkgs/development/rocm-modules/half/default.nix b/pkgs/development/rocm-modules/half/default.nix index 204fd730105e..54a2bdc7054e 100644 --- a/pkgs/development/rocm-modules/half/default.nix +++ b/pkgs/development/rocm-modules/half/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "half"; - version = "7.0.1"; + version = "7.0.2"; src = fetchFromGitHub { owner = "ROCm"; diff --git a/pkgs/development/rocm-modules/hip-common/default.nix b/pkgs/development/rocm-modules/hip-common/default.nix index 59abcd935032..365ffc146c82 100644 --- a/pkgs/development/rocm-modules/hip-common/default.nix +++ b/pkgs/development/rocm-modules/hip-common/default.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "hip-common"; - version = "7.0.1"; + version = "7.0.2"; src = fetchFromGitHub { owner = "ROCm"; repo = "HIP"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-aKR87SZftt5sLuj/TOgwcdg+CZON0Jr2BpPvqA02lw4="; + hash = "sha256-9VQrCed5EKVXu41Qrnf2m2jXveWt5Y/SlSxlUmjZS0M="; }; dontConfigure = true; diff --git a/pkgs/development/rocm-modules/hipblas-common/default.nix b/pkgs/development/rocm-modules/hipblas-common/default.nix index e04581b0f831..adf9c331de39 100644 --- a/pkgs/development/rocm-modules/hipblas-common/default.nix +++ b/pkgs/development/rocm-modules/hipblas-common/default.nix @@ -8,7 +8,7 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "hipblas-common"; - version = "7.0.1"; + version = "7.0.2"; src = fetchFromGitHub { owner = "ROCm"; diff --git a/pkgs/development/rocm-modules/hipblas/default.nix b/pkgs/development/rocm-modules/hipblas/default.nix index 0374630ae61c..6f1682110652 100644 --- a/pkgs/development/rocm-modules/hipblas/default.nix +++ b/pkgs/development/rocm-modules/hipblas/default.nix @@ -24,7 +24,7 @@ # Can also use cuBLAS stdenv.mkDerivation (finalAttrs: { pname = "hipblas"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" @@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "hipBLAS"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-4y+VPhYikPytY1pXRrhbARh33yEmQDZfVET70Be8e4Q="; + hash = "sha256-SoszZBbk8sM3yjgahs1UrPCsEbGmTYTpdOw+Ah/z8H8="; }; postPatch = '' diff --git a/pkgs/development/rocm-modules/hipblaslt/default.nix b/pkgs/development/rocm-modules/hipblaslt/default.nix index 44a0028a4b3e..f19734394f0e 100644 --- a/pkgs/development/rocm-modules/hipblaslt/default.nix +++ b/pkgs/development/rocm-modules/hipblaslt/default.nix @@ -70,7 +70,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "hipblaslt${clr.gpuArchSuffix}"; - version = "7.0-unstable-2025-08-21"; + version = "7.0.2"; src = fetchFromGitHub { owner = "ROCm"; diff --git a/pkgs/development/rocm-modules/hipcub/default.nix b/pkgs/development/rocm-modules/hipcub/default.nix index 00f45df98bdf..d0a7f7815bf4 100644 --- a/pkgs/development/rocm-modules/hipcub/default.nix +++ b/pkgs/development/rocm-modules/hipcub/default.nix @@ -17,7 +17,7 @@ # CUB can also be used as a backend instead of rocPRIM. stdenv.mkDerivation (finalAttrs: { pname = "hipcub"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/hipfft/default.nix b/pkgs/development/rocm-modules/hipfft/default.nix index e7a4a0a7b7b5..0439197337cd 100644 --- a/pkgs/development/rocm-modules/hipfft/default.nix +++ b/pkgs/development/rocm-modules/hipfft/default.nix @@ -21,7 +21,7 @@ # Can also use cuFFT stdenv.mkDerivation (finalAttrs: { pname = "hipfft"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" @@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "hipFFT"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-dbmCPzvz+xnvAWn610HCvmGzzLEq1IPhX78lJgY87bg="; + hash = "sha256-cozwHUlqACq0IM3YToc/xFB694DJ3rPiEPUCTo0xuHY="; fetchSubmodules = true; }; diff --git a/pkgs/development/rocm-modules/hipfort/default.nix b/pkgs/development/rocm-modules/hipfort/default.nix index fe87494b2e48..c13345965c2f 100644 --- a/pkgs/development/rocm-modules/hipfort/default.nix +++ b/pkgs/development/rocm-modules/hipfort/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "hipfort"; - version = "7.0.1"; + version = "7.0.2"; src = fetchFromGitHub { owner = "ROCm"; diff --git a/pkgs/development/rocm-modules/hipify/default.nix b/pkgs/development/rocm-modules/hipify/default.nix index e27714f20f77..22fd712c2983 100644 --- a/pkgs/development/rocm-modules/hipify/default.nix +++ b/pkgs/development/rocm-modules/hipify/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "hipify"; - version = "7.0.1"; + version = "7.0.2"; src = fetchFromGitHub { owner = "ROCm"; diff --git a/pkgs/development/rocm-modules/hiprand/default.nix b/pkgs/development/rocm-modules/hiprand/default.nix index 49f0ddb41d6c..8854b4dc4827 100644 --- a/pkgs/development/rocm-modules/hiprand/default.nix +++ b/pkgs/development/rocm-modules/hiprand/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "hiprand"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/hipsolver/default.nix b/pkgs/development/rocm-modules/hipsolver/default.nix index 028f7e2f5f79..48f1149d60f6 100644 --- a/pkgs/development/rocm-modules/hipsolver/default.nix +++ b/pkgs/development/rocm-modules/hipsolver/default.nix @@ -21,7 +21,7 @@ # Can also use cuSOLVER stdenv.mkDerivation (finalAttrs: { pname = "hipsolver"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/hipsparse/default.nix b/pkgs/development/rocm-modules/hipsparse/default.nix index 61ec88a48f5d..033250e16725 100644 --- a/pkgs/development/rocm-modules/hipsparse/default.nix +++ b/pkgs/development/rocm-modules/hipsparse/default.nix @@ -19,7 +19,7 @@ # This can also use cuSPARSE as a backend instead of rocSPARSE stdenv.mkDerivation (finalAttrs: { pname = "hipsparse"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/llvm/default.nix b/pkgs/development/rocm-modules/llvm/default.nix index 744b343f6ecf..3d5db0710d41 100644 --- a/pkgs/development/rocm-modules/llvm/default.nix +++ b/pkgs/development/rocm-modules/llvm/default.nix @@ -33,7 +33,7 @@ }: let - version = "7.0.1"; + version = "7.0.2"; # 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-C6QTDKqjeqExxgBtlCEZmgsEir1uFijgmvKCA/32+/A="; + hash = "sha256-gJlDFbCRsiwHgRzmwm36C3WvGfWwgPrtBNUHYmZHTB8="; }; llvmMajorVersion = lib.versions.major rocmLlvmVersion; # An llvmPackages (pkgs/development/compilers/llvm/) built from ROCm LLVM's source tree @@ -355,14 +355,6 @@ overrideLlvmPackagesRocm (s: { url = "https://github.com/GZGavinZhao/rocm-llvm-project/commit/6d296f879b0fed830c54b2a9d26240da86c8bb3a.patch"; relative = "clang"; }) - (fetchpatch { - # [PATCH] Reapply "[CUDA][HIP] Add a __device__ version of std::__glibcxx_assert_fail()" - # Fix errors with gcc15 - # https://github.com/ROCm/composable_kernel/issues/2887 - hash = "sha256-liowyS6FTsDhH8mJYXsanK7GEIlXFhd68GRDf/7Y6gg="; - url = "https://github.com/llvm/llvm-project/commit/8ec0552a7f1f50986dda6d13eae310d121d7e3ba.patch"; - relative = "clang"; - }) ]; hardeningDisable = [ "all" ]; nativeBuildInputs = old.nativeBuildInputs ++ [ diff --git a/pkgs/development/rocm-modules/migraphx/default.nix b/pkgs/development/rocm-modules/migraphx/default.nix index e29766663ef3..f2f0ddb74e8e 100644 --- a/pkgs/development/rocm-modules/migraphx/default.nix +++ b/pkgs/development/rocm-modules/migraphx/default.nix @@ -59,7 +59,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "migraphx"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" @@ -75,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "AMDMIGraphX"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-P2qbj2yocmYDDgujlUVEdyqv3b+yF0RemA+Nt76KCdQ="; + hash = "sha256-P3jiq6i7jpfpL9/S7mc1CiNRwAt8fzy3waHKhyuYIXI="; }; patches = [ diff --git a/pkgs/development/rocm-modules/miopen/default.nix b/pkgs/development/rocm-modules/miopen/default.nix index 0a484fdd50a2..512a24a85685 100644 --- a/pkgs/development/rocm-modules/miopen/default.nix +++ b/pkgs/development/rocm-modules/miopen/default.nix @@ -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.1"; + version = "7.0.2"; # Targets outside this list will get # error: use of undeclared identifier 'CK_BUFFER_RESOURCE_3RD_DWORD' diff --git a/pkgs/development/rocm-modules/mivisionx/default.nix b/pkgs/development/rocm-modules/mivisionx/default.nix index 20f6e31007df..40107372e408 100644 --- a/pkgs/development/rocm-modules/mivisionx/default.nix +++ b/pkgs/development/rocm-modules/mivisionx/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation (finalAttrs: { "cpu" ); - version = "7.0.1"; + version = "7.0.2"; src = fetchFromGitHub { owner = "ROCm"; diff --git a/pkgs/development/rocm-modules/rccl/default.nix b/pkgs/development/rocm-modules/rccl/default.nix index f7a0a7951104..757cffedc610 100644 --- a/pkgs/development/rocm-modules/rccl/default.nix +++ b/pkgs/development/rocm-modules/rccl/default.nix @@ -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.1"; + version = "7.0.2"; outputs = [ "out" @@ -58,7 +58,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "rccl"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-ASU+RB0Fhb1E8zZR3wLzbnLoigXWH3aNWirViRDdkw0="; + hash = "sha256-ByKz6TNdGVbh65ZH5PtgUbAj4qNVmOBmZ9SrOjkTbWU="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/rdc/default.nix b/pkgs/development/rocm-modules/rdc/default.nix index a8d661d27045..1177fedb87c8 100644 --- a/pkgs/development/rocm-modules/rdc/default.nix +++ b/pkgs/development/rocm-modules/rdc/default.nix @@ -48,7 +48,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "rdc"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/rocalution/default.nix b/pkgs/development/rocm-modules/rocalution/default.nix index a8d700d93ec4..e40b0598a856 100644 --- a/pkgs/development/rocm-modules/rocalution/default.nix +++ b/pkgs/development/rocm-modules/rocalution/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocalution"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/rocblas/default.nix b/pkgs/development/rocm-modules/rocblas/default.nix index 8cbe639f7622..309858960511 100644 --- a/pkgs/development/rocm-modules/rocblas/default.nix +++ b/pkgs/development/rocm-modules/rocblas/default.nix @@ -40,13 +40,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "rocblas${clr.gpuArchSuffix}"; - version = "7.0.1"; + version = "7.0.2"; src = fetchFromGitHub { owner = "ROCm"; repo = "rocBLAS"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-iWSeJWPJ1/kMuw5lOijpI/PLGehAElqX6EKe+sqZDfQ="; + hash = "sha256-528jAdhWtZbbw76dfUgpMr5px0T7q4Oj76jp0z0lh3A="; }; outputs = [ "out" ] ++ lib.optional buildBenchmarks "benchmark" ++ lib.optional buildTests "test"; diff --git a/pkgs/development/rocm-modules/rocdbgapi/default.nix b/pkgs/development/rocm-modules/rocdbgapi/default.nix index afaa4b301b0d..7103a988c146 100644 --- a/pkgs/development/rocm-modules/rocdbgapi/default.nix +++ b/pkgs/development/rocm-modules/rocdbgapi/default.nix @@ -47,7 +47,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "rocdbgapi"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" @@ -60,7 +60,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "ROCdbgapi"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-08ixnumXizPuO65Y1vRVDfiZetyuS9pQ7ZqE0m3rRhQ="; + hash = "sha256-adzHfTd4O59YKqkPL1oZnM8qiuGjlWefbl50MI2Z7co="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/rocfft/default.nix b/pkgs/development/rocm-modules/rocfft/default.nix index 91b1dcb3e7c5..c132b7952656 100644 --- a/pkgs/development/rocm-modules/rocfft/default.nix +++ b/pkgs/development/rocm-modules/rocfft/default.nix @@ -20,13 +20,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocfft${clr.gpuArchSuffix}"; - version = "7.0.1"; + version = "7.0.2"; src = fetchFromGitHub { owner = "ROCm"; repo = "rocFFT"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-z2FNJAfEcIZq7tuxcD1n9qob5PpAMV2zMQi99br3XjQ="; + hash = "sha256-VVRZSmMma/sjSj2obRrwP118v/FasS30ZU0nFsEp9rw="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/rocgdb/default.nix b/pkgs/development/rocm-modules/rocgdb/default.nix index b729a37c841d..3cc5a4a410a5 100644 --- a/pkgs/development/rocm-modules/rocgdb/default.nix +++ b/pkgs/development/rocm-modules/rocgdb/default.nix @@ -23,13 +23,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocgdb"; - version = "7.0.1"; + version = "7.0.2"; src = fetchFromGitHub { owner = "ROCm"; repo = "ROCgdb"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-OsEzhdLE+L6x6BsIbQXRK8OpEucRmdSBaZJNrLmzz+M="; + hash = "sha256-IYdhYYJGTXBIftTEpvi+lvdhtYgdFWSpdNbtTBh0l9s="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/rocm-cmake/default.nix b/pkgs/development/rocm-modules/rocm-cmake/default.nix index dacef47f514b..a30a34c74b03 100644 --- a/pkgs/development/rocm-modules/rocm-cmake/default.nix +++ b/pkgs/development/rocm-modules/rocm-cmake/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocm-cmake"; - version = "7.0.1"; + version = "7.0.2"; src = fetchFromGitHub { owner = "ROCm"; diff --git a/pkgs/development/rocm-modules/rocm-core/default.nix b/pkgs/development/rocm-modules/rocm-core/default.nix index 1c412c9c4e17..242c9bfa7d92 100644 --- a/pkgs/development/rocm-modules/rocm-core/default.nix +++ b/pkgs/development/rocm-modules/rocm-core/default.nix @@ -17,7 +17,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "rocm-core"; - version = "7.0.1"; + version = "7.0.2"; src = fetchFromGitHub { owner = "ROCm"; diff --git a/pkgs/development/rocm-modules/rocm-runtime/default.nix b/pkgs/development/rocm-modules/rocm-runtime/default.nix index 533a493c71be..98b2bded9d9e 100644 --- a/pkgs/development/rocm-modules/rocm-runtime/default.nix +++ b/pkgs/development/rocm-modules/rocm-runtime/default.nix @@ -16,13 +16,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocm-runtime"; - version = "7.0.1"; + version = "7.0.2"; src = fetchFromGitHub { owner = "ROCm"; repo = "ROCR-Runtime"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-APFcC17JxTxTkJvaAeKezN70wXjWLTDpeIDj8e/mwhQ="; + hash = "sha256-oz2UCR4XEhNm1uDlCeDnDJrmysWKA6GKxlEuFu21es0="; }; cmakeBuildType = "RelWithDebInfo"; diff --git a/pkgs/development/rocm-modules/rocm-smi/default.nix b/pkgs/development/rocm-modules/rocm-smi/default.nix index beedc4cb2d06..f10d5da21474 100644 --- a/pkgs/development/rocm-modules/rocm-smi/default.nix +++ b/pkgs/development/rocm-modules/rocm-smi/default.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocm-smi"; - version = "7.0.1"; + version = "7.0.2"; src = fetchFromGitHub { owner = "ROCm"; repo = "rocm_smi_lib"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-jhjdx3xF6hu+p99dFAGgUwQ2fIhNf5WzeZqeWW1fKc4="; + hash = "sha256-LzWKWiHmMDGO2ejvcT0BBg22HbYD9q0fxK/bq6JvcnQ="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/rocm-modules/rocminfo/default.nix b/pkgs/development/rocm-modules/rocminfo/default.nix index 6197e1f42dc2..620c63cb1ec6 100644 --- a/pkgs/development/rocm-modules/rocminfo/default.nix +++ b/pkgs/development/rocm-modules/rocminfo/default.nix @@ -12,7 +12,7 @@ }: stdenv.mkDerivation (finalAttrs: { - version = "7.0.1"; + version = "7.0.2"; pname = "rocminfo"; src = fetchFromGitHub { diff --git a/pkgs/development/rocm-modules/rocmlir/default.nix b/pkgs/development/rocm-modules/rocmlir/default.nix index c9a5ab561f88..5ed107d458db 100644 --- a/pkgs/development/rocm-modules/rocmlir/default.nix +++ b/pkgs/development/rocm-modules/rocmlir/default.nix @@ -39,7 +39,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "rocmlir${suffix}"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" @@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "rocMLIR"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-W5CFmUd2f33nlVGyeygYQ0IY9X5QM7/Wkt1XHOZBl4Q="; + hash = "sha256-0+vZ/Lkh1fC9oKyy83YjIX4xuMJEWErd8UpZZuaaXdI="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/rocprim/default.nix b/pkgs/development/rocm-modules/rocprim/default.nix index 71388c8d93d2..f1769f266292 100644 --- a/pkgs/development/rocm-modules/rocprim/default.nix +++ b/pkgs/development/rocm-modules/rocprim/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocprim"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" @@ -31,7 +31,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "rocPRIM"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-wj1H5JE7C5XJ8wwjzCA8ByO6cUC/V0ZI7bRaHmfugLc="; + hash = "sha256-uOlrN/FvEBBCHsPeJOWs9NNqVwrcxVExfs5wp03PH0U="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/rocprofiler-register/default.nix b/pkgs/development/rocm-modules/rocprofiler-register/default.nix index 698a65747566..5e23901f4c09 100644 --- a/pkgs/development/rocm-modules/rocprofiler-register/default.nix +++ b/pkgs/development/rocm-modules/rocprofiler-register/default.nix @@ -18,13 +18,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocprofiler-register"; - version = "7.0.1"; + version = "7.0.2"; src = fetchFromGitHub { owner = "ROCm"; repo = "rocprofiler-register"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-2uAS/9gHinVLCMa/fX+6T+0RyHCLToyxDeobolZoD+g="; + hash = "sha256-hK7k4tg7/5rYCSTFKsFRsRYfVevkCARcDyxlexrXbts="; fetchSubmodules = true; }; diff --git a/pkgs/development/rocm-modules/rocprofiler/default.nix b/pkgs/development/rocm-modules/rocprofiler/default.nix index 9b3ad99ccee7..a8aeefc12886 100644 --- a/pkgs/development/rocm-modules/rocprofiler/default.nix +++ b/pkgs/development/rocm-modules/rocprofiler/default.nix @@ -44,7 +44,7 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "rocprofiler"; - version = "7.0.1"; + version = "7.0.2"; src = fetchFromGitHub { owner = "ROCm"; diff --git a/pkgs/development/rocm-modules/rocr-debug-agent/default.nix b/pkgs/development/rocm-modules/rocr-debug-agent/default.nix index 49ba3089cbe0..aebee50302ba 100644 --- a/pkgs/development/rocm-modules/rocr-debug-agent/default.nix +++ b/pkgs/development/rocm-modules/rocr-debug-agent/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocr-debug-agent"; - version = "7.0.1"; + version = "7.0.2"; src = fetchFromGitHub { owner = "ROCm"; diff --git a/pkgs/development/rocm-modules/rocrand/default.nix b/pkgs/development/rocm-modules/rocrand/default.nix index 28b410370797..8d952d3e10b8 100644 --- a/pkgs/development/rocm-modules/rocrand/default.nix +++ b/pkgs/development/rocm-modules/rocrand/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocrand${clr.gpuArchSuffix}"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/rocsolver/default.nix b/pkgs/development/rocm-modules/rocsolver/default.nix index 6268bdc257f9..cbad72ab2328 100644 --- a/pkgs/development/rocm-modules/rocsolver/default.nix +++ b/pkgs/development/rocm-modules/rocsolver/default.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocsolver${clr.gpuArchSuffix}"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" @@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "rocSOLVER"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-MVPffQGKsF5gyb5eTEgj6H+ikLrQTPlRB7Eg/GYYvGI="; + hash = "sha256-/JFGqNA4weVgFuVtszYAxq65/+oZjiKC8zSxwvp964M="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/rocsparse/default.nix b/pkgs/development/rocm-modules/rocsparse/default.nix index 232afb68179a..df695fb09d6c 100644 --- a/pkgs/development/rocm-modules/rocsparse/default.nix +++ b/pkgs/development/rocm-modules/rocsparse/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocsparse${clr.gpuArchSuffix}"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "rocSPARSE"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-tLBfVAoviHL0LpwWslvz2w2b7wwW5xj6kKKqADTjC4s="; + hash = "sha256-0KFzrVGScCQDbOdlX016ymZ4lgCimd9XK4auK9V5p3k="; }; nativeBuildInputs = [ diff --git a/pkgs/development/rocm-modules/rocthrust/default.nix b/pkgs/development/rocm-modules/rocthrust/default.nix index 9eb25b017023..940bedc8fa83 100644 --- a/pkgs/development/rocm-modules/rocthrust/default.nix +++ b/pkgs/development/rocm-modules/rocthrust/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocthrust"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/roctracer/default.nix b/pkgs/development/rocm-modules/roctracer/default.nix index ce9baed22619..fd71442c4c58 100644 --- a/pkgs/development/rocm-modules/roctracer/default.nix +++ b/pkgs/development/rocm-modules/roctracer/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "roctracer"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" diff --git a/pkgs/development/rocm-modules/rocwmma/default.nix b/pkgs/development/rocm-modules/rocwmma/default.nix index ddff8d17598a..6b3800c83b12 100644 --- a/pkgs/development/rocm-modules/rocwmma/default.nix +++ b/pkgs/development/rocm-modules/rocwmma/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "rocwmma"; - version = "7.0.1"; + version = "7.0.2"; outputs = [ "out" @@ -38,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "ROCm"; repo = "rocWMMA"; rev = "rocm-${finalAttrs.version}"; - hash = "sha256-EnQF3V8sk234JNZTqpVUcRv8pVFWpkFJYVgLLuxqm2E="; + hash = "sha256-xCLoYvbKiAgAxDCbEopNxYBs3V3EJBmO3NpONiveXvE="; }; patches = lib.optionals (buildTests || buildBenchmarks) [ diff --git a/pkgs/development/rocm-modules/rpp/default.nix b/pkgs/development/rocm-modules/rpp/default.nix index e8a5c2c37350..bfa3849a3987 100644 --- a/pkgs/development/rocm-modules/rpp/default.nix +++ b/pkgs/development/rocm-modules/rpp/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: { "cpu" ); - version = "7.0.1"; + version = "7.0.2"; src = fetchFromGitHub { owner = "ROCm"; diff --git a/pkgs/development/rocm-modules/tensile/default.nix b/pkgs/development/rocm-modules/tensile/default.nix index a1fcab0f2379..b4d150b357f3 100644 --- a/pkgs/development/rocm-modules/tensile/default.nix +++ b/pkgs/development/rocm-modules/tensile/default.nix @@ -18,14 +18,14 @@ buildPythonPackage rec { pname = "tensile"; - version = "7.0.0"; + version = "7.0.2"; pyproject = true; src = fetchFromGitHub { owner = "ROCm"; repo = "Tensile"; rev = "rocm-${version}"; - hash = "sha256-miNQzXfr/1qIqPJqun42zp6QGI6v6K1fKIXdCfkNKow="; + hash = "sha256-1G6qp/VBJL67QW9t2VB5KK5lwn+PbY0hqHq8DzyK2fg="; }; # TODO: It should be possible to run asm caps test ONCE for all supported arches From 2ed265624cde67609ab5bfcb964972a9d0a9f287 Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Sun, 21 Dec 2025 08:35:41 -0800 Subject: [PATCH 04/12] rocmPackages.rdc: fix upstream CMake issues with build types and libcap include Applies: - fix(rdc): Fix CXXFLAGS clobbering and incompatibility with non-x64 architecture ROCm/rocm-systems#2423 - fix(rdc): use pkg-config to find libcap ROCm/rocm-systems#2424 --- pkgs/development/rocm-modules/rdc/default.nix | 15 +- .../rocm-modules/rdc/fix-cmake-cxxflags.patch | 217 ++++++++++++++++++ .../rdc/fix-libcap-pkgconfig.patch | 57 +++++ 3 files changed, 285 insertions(+), 4 deletions(-) create mode 100644 pkgs/development/rocm-modules/rdc/fix-cmake-cxxflags.patch create mode 100644 pkgs/development/rocm-modules/rdc/fix-libcap-pkgconfig.patch diff --git a/pkgs/development/rocm-modules/rdc/default.nix b/pkgs/development/rocm-modules/rdc/default.nix index 1177fedb87c8..8d25a239f168 100644 --- a/pkgs/development/rocm-modules/rdc/default.nix +++ b/pkgs/development/rocm-modules/rdc/default.nix @@ -4,6 +4,7 @@ fetchFromGitHub, rocmUpdateScript, cmake, + pkg-config, amdsmi, rocm-smi, rocm-runtime, @@ -67,8 +68,16 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-ztInmK3oCbvnLe7XQ55/hUHRyhuZ2M2XVTG1NcVHtGs="; }; + patches = [ + # https://github.com/ROCm/rocm-systems/pull/2423 + ./fix-cmake-cxxflags.patch + # https://github.com/ROCm/rocm-systems/pull/2424 + ./fix-libcap-pkgconfig.patch + ]; + nativeBuildInputs = [ cmake + pkg-config protobuf ] ++ lib.optionals buildDocs [ @@ -90,10 +99,8 @@ stdenv.mkDerivation (finalAttrs: { gtest ]; - CXXFLAGS = "-I${libcap.dev}/include"; - cmakeFlags = [ - "-DCMAKE_VERBOSE_MAKEFILE=OFF" + "-DCMAKE_VERBOSE_MAKEFILE=ON" "-DRDC_INSTALL_PREFIX=${placeholder "out"}" "-DBUILD_RVS=OFF" # TODO: Needs RVS package "-DBUILD_ROCRTEST=ON" @@ -114,7 +121,7 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' substituteInPlace CMakeLists.txt \ - --replace "file(STRINGS /etc/os-release LINUX_DISTRO LIMIT_COUNT 1 REGEX \"NAME=\")" "set(LINUX_DISTRO \"NixOS\")" + --replace-fail "file(STRINGS /etc/os-release LINUX_DISTRO LIMIT_COUNT 1 REGEX \"NAME=\")" "set(LINUX_DISTRO \"NixOS\")" ''; postInstall = '' diff --git a/pkgs/development/rocm-modules/rdc/fix-cmake-cxxflags.patch b/pkgs/development/rocm-modules/rdc/fix-cmake-cxxflags.patch new file mode 100644 index 000000000000..bf7f3dbb0eef --- /dev/null +++ b/pkgs/development/rocm-modules/rdc/fix-cmake-cxxflags.patch @@ -0,0 +1,217 @@ +From 92f25181dbf722cb749e445851580df4ea779299 Mon Sep 17 00:00:00 2001 +From: Luna Nova +Date: Sun, 21 Dec 2025 08:01:08 -0800 +Subject: [PATCH 1/2] fix(rdc): set CMAKE_CXX_FLAGS after project() to avoid + clobbering env + +CMAKE_CXX_FLAGS' initial value is set from $CXXFLAGS on project() call +so the previous location ignored CXXFLAGS from env or CMake toolchain +config. + +Ref: https://cmake.org/cmake/help/v4.2/variable/CMAKE_LANG_FLAGS_INIT.html +Fixes: 874a7b438f ("CMAKE - Fix build types") +--- + CMakeLists.txt | 48 +++++++++++++++++++------------------ + 1 file changed, 25 insertions(+), 23 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 907c9fbff42..8b386c7be3d 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -55,29 +55,6 @@ set_property( + PROPERTY STRINGS "Debug" "Release" "RelWithDebInfo" "MinSizeRel" + ) + +-# Set compile flags +-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -m64 -msse -msse2") +-set(CMAKE_CXX_FLAGS_DEBUG +- "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb -DDEBUG" +- CACHE STRING +- "Flags for Debug builds" +-) +-set(CMAKE_CXX_FLAGS_RELEASE +- "${CMAKE_CXX_FLAGS_RELEASE} -O2 -s -DNDEBUG" +- CACHE STRING +- "Flags for Release builds" +-) +-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO +- "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g -DNDEBUG" +- CACHE STRING +- "Flags for RelWithDebInfo builds" +-) +-set(CMAKE_CXX_FLAGS_MINSIZEREL +- "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -DNDEBUG" +- CACHE STRING +- "Flags for MinSizeRel builds" +-) +- + set(CMAKE_MODULE_PATH + "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/" + CACHE INTERNAL +@@ -155,6 +132,31 @@ project(${RDC} VERSION "${VERSION_STRING}" HOMEPAGE_URL "https://github.com/Rade + # this must go after project() + include(GNUInstallDirs) + ++# NB: CMAKE__FLAGS are initialized from environment (CXXFLAGS et al.) ++# during project(). Setting them before project() discards env and toolchain ++# defaults. Cf. CMAKE__FLAGS_INIT for toolchain overrides. ++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -m64 -msse -msse2") ++set(CMAKE_CXX_FLAGS_DEBUG ++ "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb -DDEBUG" ++ CACHE STRING ++ "Flags for Debug builds" ++) ++set(CMAKE_CXX_FLAGS_RELEASE ++ "${CMAKE_CXX_FLAGS_RELEASE} -O2 -s -DNDEBUG" ++ CACHE STRING ++ "Flags for Release builds" ++) ++set(CMAKE_CXX_FLAGS_RELWITHDEBINFO ++ "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g -DNDEBUG" ++ CACHE STRING ++ "Flags for RelWithDebInfo builds" ++) ++set(CMAKE_CXX_FLAGS_MINSIZEREL ++ "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -DNDEBUG" ++ CACHE STRING ++ "Flags for MinSizeRel builds" ++) ++ + set(COMMON_DIR "${CMAKE_CURRENT_SOURCE_DIR}/common") + + set(GRPC_ROOT_DEFAULT "/usr") + +From 0c8710c3570963b29c709b1cd1f78b15fd73a950 Mon Sep 17 00:00:00 2001 +From: Luna Nova +Date: Sun, 21 Dec 2025 08:13:04 -0800 +Subject: [PATCH 2/2] fix(rdc): don't reimplement CMake default build type flag + logic + +The previous approach was overly complicated and added nothing. CMake already defaults +similar flags for each of the default supported build types. +Additionally, the previous flags broke AArch64 as -m64 -msse are incompatible. +It's not necessary to explicitly set this with modern toolchains. + +Fixes: 874a7b438f ("CMAKE - Fix build types") +Fixes: bc7f01e992 ("Initial RDC commit") +--- + CMakeLists.txt | 25 +--------------------- + example/CMakeLists.txt | 26 ++--------------------- + tests/example/CMakeLists.txt | 24 +-------------------- + 3 files changed, 4 insertions(+), 71 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8b386c7be3d..251fcddd653 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -132,30 +132,7 @@ project(${RDC} VERSION "${VERSION_STRING}" HOMEPAGE_URL "https://github.com/Rade + # this must go after project() + include(GNUInstallDirs) + +-# NB: CMAKE__FLAGS are initialized from environment (CXXFLAGS et al.) +-# during project(). Setting them before project() discards env and toolchain +-# defaults. Cf. CMAKE__FLAGS_INIT for toolchain overrides. +-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -m64 -msse -msse2") +-set(CMAKE_CXX_FLAGS_DEBUG +- "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb -DDEBUG" +- CACHE STRING +- "Flags for Debug builds" +-) +-set(CMAKE_CXX_FLAGS_RELEASE +- "${CMAKE_CXX_FLAGS_RELEASE} -O2 -s -DNDEBUG" +- CACHE STRING +- "Flags for Release builds" +-) +-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO +- "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g -DNDEBUG" +- CACHE STRING +- "Flags for RelWithDebInfo builds" +-) +-set(CMAKE_CXX_FLAGS_MINSIZEREL +- "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -DNDEBUG" +- CACHE STRING +- "Flags for MinSizeRel builds" +-) ++add_compile_options(-Wall -Wextra) + + set(COMMON_DIR "${CMAKE_CURRENT_SOURCE_DIR}/common") + +diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt +index 378a2005818..7c51307ec38 100755 +--- a/example/CMakeLists.txt ++++ b/example/CMakeLists.txt +@@ -31,30 +31,6 @@ cmake_minimum_required(VERSION 3.15) + option(CMAKE_VERBOSE_MAKEFILE "Enable verbose output" ON) + option(CMAKE_EXPORT_COMPILE_COMMANDS "Export compile commands for linters and autocompleters" ON) + +-# Set compile flags +-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -m64 -msse -msse2") +-set(CMAKE_CXX_FLAGS_DEBUG +- "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb -DDEBUG" +- CACHE STRING +- "Flags for Debug builds" +-) +-# note: no '-s' here unlike other CMakeLists.txt +-set(CMAKE_CXX_FLAGS_RELEASE +- "${CMAKE_CXX_FLAGS_RELEASE} -O2 -DNDEBUG" +- CACHE STRING +- "Flags for Release builds" +-) +-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO +- "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g -DNDEBUG" +- CACHE STRING +- "Flags for RelWithDebInfo builds" +-) +-set(CMAKE_CXX_FLAGS_MINSIZEREL +- "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -DNDEBUG" +- CACHE STRING +- "Flags for MinSizeRel builds" +-) +- + set(CMAKE_CXX_STANDARD 17 CACHE STRING "The C++ standard to use") + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) +@@ -66,6 +42,8 @@ endif() + + project(RDC_example) + ++add_compile_options(-Wall -Wextra) ++ + # provides cmake_print_variables(VAR) + include(CMakePrintHelpers) + +diff --git a/tests/example/CMakeLists.txt b/tests/example/CMakeLists.txt +index d5614f387bd..13c2f3857a1 100755 +--- a/tests/example/CMakeLists.txt ++++ b/tests/example/CMakeLists.txt +@@ -22,29 +22,7 @@ message("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&") + message(" Cmake Example Lib ") + message("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&") + +-# Set compile flags +-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -m64 -msse -msse2") +-set(CMAKE_CXX_FLAGS_DEBUG +- "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb -DDEBUG" +- CACHE STRING +- "Flags for Debug builds" +-) +-# note: no '-s' here unlike other CMakeLists.txt +-set(CMAKE_CXX_FLAGS_RELEASE +- "${CMAKE_CXX_FLAGS_RELEASE} -O2 -DNDEBUG" +- CACHE STRING +- "Flags for Release builds" +-) +-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO +- "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -g -DNDEBUG" +- CACHE STRING +- "Flags for RelWithDebInfo builds" +-) +-set(CMAKE_CXX_FLAGS_MINSIZEREL +- "${CMAKE_CXX_FLAGS_MINSIZEREL} -Os -DNDEBUG" +- CACHE STRING +- "Flags for MinSizeRel builds" +-) ++add_compile_options(-Wall -Wextra) + + # Required Defines first: + diff --git a/pkgs/development/rocm-modules/rdc/fix-libcap-pkgconfig.patch b/pkgs/development/rocm-modules/rdc/fix-libcap-pkgconfig.patch new file mode 100644 index 000000000000..54e7303ce88f --- /dev/null +++ b/pkgs/development/rocm-modules/rdc/fix-libcap-pkgconfig.patch @@ -0,0 +1,57 @@ +From 299f2c770ff0abf07b8f394f154168d2aa78aa60 Mon Sep 17 00:00:00 2001 +From: Luna Nova +Date: Sun, 21 Dec 2025 08:23:01 -0800 +Subject: [PATCH] fix(rdc): use pkg-config to find libcap + +If libcap isn't available in system wide FHS include paths building would fail. +Fix this by using pkg-config to find libcap which provides both the library +to link and include dirs. +--- + CMakeLists.txt | 6 +++--- + rdc_libs/rdc/CMakeLists.txt | 2 +- + server/CMakeLists.txt | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 907c9fbff42..00e0a9dd87d 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -192,9 +192,9 @@ mark_as_advanced( + CPACK_GENERATOR + ) + +-# check if libcap exists +-# needed for sys/capabilities.h +-find_library(LIB_CAP NAMES cap REQUIRED) ++# needed for sys/capability.h ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(LIBCAP REQUIRED IMPORTED_TARGET libcap) + + if(BUILD_STANDALONE AND GRPC_ROOT STREQUAL GRPC_ROOT_DEFAULT) + message( +diff --git a/rdc_libs/rdc/CMakeLists.txt b/rdc_libs/rdc/CMakeLists.txt +index d4e368edca5..f9a3ac4c487 100644 +--- a/rdc_libs/rdc/CMakeLists.txt ++++ b/rdc_libs/rdc/CMakeLists.txt +@@ -71,7 +71,7 @@ set(RDC_LIB_INC_LIST + message("RDC_LIB_INC_LIST=${RDC_LIB_INC_LIST}") + + add_library(${RDC_LIB} SHARED ${RDC_LIB_SRC_LIST} ${RDC_LIB_INC_LIST}) +-target_link_libraries(${RDC_LIB} ${BOOTSTRAP_LIB} pthread amd_smi cap) ++target_link_libraries(${RDC_LIB} ${BOOTSTRAP_LIB} pthread amd_smi PkgConfig::LIBCAP) + target_include_directories( + ${RDC_LIB} + PRIVATE "${PROJECT_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}/include" "${AMD_SMI_INCLUDE_DIR}" +diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt +index baf0d851c86..0a6e71dda1c 100755 +--- a/server/CMakeLists.txt ++++ b/server/CMakeLists.txt +@@ -97,7 +97,7 @@ target_link_libraries( + pthread + rt + gRPC::grpc++ +- cap ++ PkgConfig::LIBCAP + dl + amd_smi + rdc_bootstrap From 3504249611cca4485c2b0fbd374345783e4fe750 Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Sun, 21 Dec 2025 15:50:49 -0800 Subject: [PATCH 05/12] rocmPackages.migraphx: fix unicode minus sign breaking CArrays embed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A comment in src/targets/gpu/kernels/include/migraphx/kernels/bit.hpp contains a Unicode MINUS SIGN instead of ASCII hyphen: // popcount(~(x | −x)) When EMBED_USE=CArrays, the cmake Embed.cmake mechanism reads source files as hex and generates char[] arrays. The UTF-8 encoding of U+2212 (0xe2 0x88 0x92) causes a compile error: constant expression evaluates to 226 which cannot be narrowed to type 'char' [-Wc++11-narrowing] --- pkgs/development/rocm-modules/migraphx/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/rocm-modules/migraphx/default.nix b/pkgs/development/rocm-modules/migraphx/default.nix index f2f0ddb74e8e..afce720b4f23 100644 --- a/pkgs/development/rocm-modules/migraphx/default.nix +++ b/pkgs/development/rocm-modules/migraphx/default.nix @@ -153,6 +153,12 @@ stdenv.mkDerivation (finalAttrs: { # `error: '__clang_hip_runtime_wrapper.h' file not found [clang-diagnostic-error]` substituteInPlace CMakeLists.txt \ --replace "set(MIGRAPHX_TIDY_ERRORS ALL)" "" + + # Fix Unicode minus sign (U+2212) in comment that breaks EMBED_USE=CArrays + # The embed mechanism generates char[] arrays that can't store unicode − + # which has values >127 + substituteInPlace src/targets/gpu/kernels/include/migraphx/kernels/bit.hpp \ + --replace-fail "// popcount(~(x | −x))" "// popcount(~(x | -x))" '' + lib.optionalString (!buildDocs) '' substituteInPlace CMakeLists.txt \ From d379fc21faa852b86f8cf8e61a2c24c13bebcde7 Mon Sep 17 00:00:00 2001 From: Gavin Zhao Date: Fri, 26 Dec 2025 09:16:08 -0800 Subject: [PATCH 06/12] rocmPackages.clr: add HIP impure tests for generic-arch and isa-compat Co-Authored-By: Luna Nova --- pkgs/development/rocm-modules/clr/default.nix | 27 +++++++ .../rocm-modules/clr/test-isa-compat.nix | 74 +++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 pkgs/development/rocm-modules/clr/test-isa-compat.nix diff --git a/pkgs/development/rocm-modules/clr/default.nix b/pkgs/development/rocm-modules/clr/default.nix index 4861e59fb7e2..79070cb3ffba 100644 --- a/pkgs/development/rocm-modules/clr/default.nix +++ b/pkgs/development/rocm-modules/clr/default.nix @@ -269,6 +269,33 @@ stdenv.mkDerivation (finalAttrs: { opencl-example = callPackage ./test-opencl-example.nix { clr = finalAttrs.finalPackage; }; + generic-arch = callPackage ./test-isa-compat.nix { + clr = finalAttrs.finalPackage; + name = "generic-arch"; + offloadArches = [ + "gfx9-generic" + "gfx10-1-generic" + "gfx10-3-generic" + "gfx11-generic" + "gfx12-generic" + ]; + }; + isa-compat = callPackage ./test-isa-compat.nix { + clr = finalAttrs.finalPackage; + name = "isa-compat"; + offloadArches = [ + "gfx900" + "gfx1010" + "gfx1030" + ]; + }; + spirv = callPackage ./test-isa-compat.nix { + clr = finalAttrs.finalPackage; + name = "spirv"; + offloadArches = [ + "amdgcnspirv" + ]; + }; }; selectGpuTargets = diff --git a/pkgs/development/rocm-modules/clr/test-isa-compat.nix b/pkgs/development/rocm-modules/clr/test-isa-compat.nix new file mode 100644 index 000000000000..2eca8edbff3d --- /dev/null +++ b/pkgs/development/rocm-modules/clr/test-isa-compat.nix @@ -0,0 +1,74 @@ +{ + lib, + stdenv, + makeImpureTest, + fetchFromGitHub, + clr, + rocm-smi, + name, + offloadArches, +}: + +let + # TODO: swap to another tiny test if this breaks; upstream is archived but fine for now + vectoradd = stdenv.mkDerivation { + pname = "rocm-hip-vectoradd"; + version = "2024-04-11"; + + src = fetchFromGitHub { + owner = "ROCm"; + repo = "HIP-Examples"; + rev = "cdf9d101acd9a3fc89ee750f73c1f1958cbd5cc3"; + hash = "sha256-/I1KmOBFbEZIjA1vRE+2tPTtEKtOgazjCbnZtr+87E0="; + }; + + nativeBuildInputs = [ + clr + ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + amdclang++ -x hip -o $out/bin/vectoradd \ + ${lib.concatMapStringsSep " " (arch: "--offload-arch=${arch}") offloadArches} \ + vectorAdd/vectoradd_hip.cpp + + runHook postInstall + ''; + + meta = { + description = "vectorAdd HIP example for ROCm"; + homepage = "https://github.com/ROCm/HIP-Examples"; + license = lib.licenses.unfree; + platforms = lib.platforms.linux; + teams = [ lib.teams.rocm ]; + }; + }; + +in +makeImpureTest { + inherit name; + testedPackage = "rocmPackages.clr"; + + sandboxPaths = [ + "/sys" + "/dev/dri" + "/dev/kfd" + ]; + + nativeBuildInputs = [ + vectoradd + rocm-smi + ]; + + testScript = '' + rocm-smi + + vectoradd + ''; + + meta = { + teams = [ lib.teams.rocm ]; + }; +} From 12f2544fccb7b43acb88df75e8536c7a6893b6c9 Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Sat, 27 Dec 2025 06:19:53 -0800 Subject: [PATCH 07/12] zluda: use finalAttrs --- pkgs/by-name/zl/zluda/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/zl/zluda/package.nix b/pkgs/by-name/zl/zluda/package.nix index 6dce56c92190..043367d8f421 100644 --- a/pkgs/by-name/zl/zluda/package.nix +++ b/pkgs/by-name/zl/zluda/package.nix @@ -14,7 +14,7 @@ stdenv, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "zluda"; version = "4-unstable-2025-01-28"; @@ -80,10 +80,10 @@ rustPlatform.buildRustPackage rec { meta = { description = "CUDA on non-Nvidia GPUs"; homepage = "https://github.com/vosen/ZLUDA"; - changelog = "https://github.com/vosen/ZLUDA/releases/tag/${src.rev}"; + changelog = "https://github.com/vosen/ZLUDA/releases/tag/${finalAttrs.src.rev}"; license = lib.licenses.mit; maintainers = [ lib.maintainers.errnoh ]; }; -} +}) From 6f09201211929a22feb3e446fd05bb9b30fd2d15 Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Sat, 27 Dec 2025 06:47:55 -0800 Subject: [PATCH 08/12] zluda: 4-unstable-2025-01-28 -> 6-preview.45 Bumping to a new unstable tag for ROCm 7.x support --- pkgs/by-name/zl/zluda/package.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/zl/zluda/package.nix b/pkgs/by-name/zl/zluda/package.nix index 043367d8f421..e8810be5aeed 100644 --- a/pkgs/by-name/zl/zluda/package.nix +++ b/pkgs/by-name/zl/zluda/package.nix @@ -16,14 +16,13 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "zluda"; - version = "4-unstable-2025-01-28"; + version = "6-preview.45"; src = fetchFromGitHub { owner = "vosen"; repo = "ZLUDA"; - # Cargo.lock introduced and major bug fixes in this commit - rev = "df5a96d935b014f88e30af4abc487882b0b54a76"; - hash = "sha256-T2pCZZzZbCLI01YSF0VguKtL3EDEdIoUyH4C9ccaCi8="; + rev = "v${finalAttrs.version}"; + hash = "sha256-796OuIM5a0saE0v1QHHAGRjUPT+YAIfUuEtAruMn8Mk="; fetchSubmodules = true; }; @@ -35,6 +34,7 @@ rustPlatform.buildRustPackage (finalAttrs: { rocmPackages.rocsolver rocmPackages.rocblas rocmPackages.hipblas + rocmPackages.hipblaslt rocmPackages.rocm-cmake rocmPackages.hipfft zlib @@ -50,7 +50,10 @@ rustPlatform.buildRustPackage (finalAttrs: { clang ]; - cargoHash = "sha256-hDQWjzkx7YdkgSmNKTzCa2VhBFvn6P9QANV9hJ7UiT8="; + cargoHash = "sha256-YNBeweZ/vfXGfM0lrZbAh71z6Rb0+B7nOuO8VL2BmCo="; + + # Tests require a GPU and segfault in the sandbox + doCheck = false; # xtask doesn't support passing --target, but nix hooks expect the folder structure from when it's set env.CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.cargoShortTarget; From fa7beaf3411399b5cb70b388f1d0fe6a59c2535c Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Fri, 2 Jan 2026 18:23:29 -0800 Subject: [PATCH 09/12] rocmPackages.aotriton: 0.10b -> 0.11.1b Diff: https://github.com/ROCm/aotriton/compare/0.10b...0.11.1b --- .../rocm-modules/aotriton/default.nix | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/pkgs/development/rocm-modules/aotriton/default.nix b/pkgs/development/rocm-modules/aotriton/default.nix index 99d0c1d46bda..03d6e3f6c30c 100644 --- a/pkgs/development/rocm-modules/aotriton/default.nix +++ b/pkgs/development/rocm-modules/aotriton/default.nix @@ -38,13 +38,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "aotriton${lib.optionalString (!anySupportedTargets) "-shim"}"; - version = "0.10b"; + version = "0.11.1b"; src = fetchFromGitHub { owner = "ROCm"; repo = "aotriton"; tag = finalAttrs.version; - hash = "sha256-stAHnsqChkNv69wjlhM/qUetrJpNwI1i7rGnPMwsNz0="; + hash = "sha256-F7JjyS+6gMdCpOFLldTsNJdVzzVwd6lwW7+V8ZOZfig="; leaveDotGit = true; # fetch all submodules except unused triton submodule that is ~500MB postFetch = '' @@ -65,9 +65,11 @@ stdenv.mkDerivation (finalAttrs: { requiredSystemFeatures = if anySupportedTargets then [ "big-parallel" ] else [ ]; env = { + AOTRITON_CI_SUPPLIED_SHA1 = finalAttrs.version; ROCM_PATH = "${clr}"; CFLAGS = "-w -g1 -gz -Wno-c++11-narrowing"; CXXFLAGS = finalAttrs.env.CFLAGS; + TRITON_STORE_BINARY_ONLY = 1; # reduce triton disk space usage }; nativeBuildInputs = [ @@ -97,14 +99,6 @@ stdenv.mkDerivation (finalAttrs: { triton ]); - patches = [ - # CMakeLists.txt: AOTRITON_INHERIT_SYSTEM_SITE_TRITON flag - (fetchpatch { - url = "https://github.com/ROCm/aotriton/commit/9734c3e999c412a07d2b35671998650942b26ed4.patch"; - hash = "sha256-tBmjjhRJmLv3K6F2+4OcMuwf8dH7efPPECMQjh6QdUA="; - }) - ]; - # Excerpt from README: # Note: do not run ninja separately, due to the limit of the current build system, # ninja install will run the whole build process unconditionally. @@ -126,8 +120,8 @@ stdenv.mkDerivation (finalAttrs: { # picked if nix-shell is used against this package preConfigure = '' cmakeFlagsArray+=( - "-DVENV_DIR=$(pwd)/aotriton-venv/" - "-DVENV_BIN_PYTHON=$(pwd)/aotriton-venv/bin/python" + "-DVENV_DIR=$(pwd)/build/venv/" + "-DVENV_BIN_PYTHON=$(pwd)/build/venv/bin/python" ) ''; @@ -136,6 +130,8 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "AOTRITON_NOIMAGE_MODE" (!anySupportedTargets)) # Use preinstalled triton from our python's site-packages (lib.cmakeBool "AOTRITON_INHERIT_SYSTEM_SITE_TRITON" true) + # Circular dependency + (lib.cmakeBool "AOTRITON_USE_TORCH" false) # FP32 kernels are optional, turn them off to speed up builds and save space # Perf sensitive code should be using BF16 or F16 (lib.cmakeBool "AOTRITON_ENABLE_FP32_INPUTS" false) From c01d90f7566621f855bb67a7964036660d518f09 Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Sun, 21 Dec 2025 07:21:57 -0800 Subject: [PATCH 10/12] rocmPackages.hiprt: 2.5.a21e075.3 -> 3.0.3.a1525e7 PR to drop encryption support was accepted upstream so we can simplify the build slightly. Changes from 2.5: - RDNA 4 support (compressed BVH8, triangle packets, intersectable instances, OBB) - new generic BVH2 import API - per-context logger - removed kernel encryption - various bug fixes for RDNA 2 - ROCm 7 support --- pkgs/development/rocm-modules/hiprt/default.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkgs/development/rocm-modules/hiprt/default.nix b/pkgs/development/rocm-modules/hiprt/default.nix index d856477a01cc..bd2a9f6f11fd 100644 --- a/pkgs/development/rocm-modules/hiprt/default.nix +++ b/pkgs/development/rocm-modules/hiprt/default.nix @@ -9,17 +9,16 @@ stdenv.mkDerivation (finalAttrs: { pname = "hiprt"; - version = "2.5.a21e075.3"; + version = "3.0.3.a1525e7"; src = fetchFromGitHub { owner = "GPUOpen-LibrariesAndSDKs"; repo = "HIPRT"; tag = finalAttrs.version; - sha256 = "sha256-3yGhwIsFHlFMCEzuYnXuXNzs99m7f2LTkYaTGs0GEcI="; + hash = "sha256-7r7KO+WuXOeQQhYLYpJRrD4ZqVsBOqaD2NGD15CWnoo="; }; postPatch = '' - rm -rf contrib/easy-encrypt # contains prebuilt easy-encrypt binaries, we disable encryption substituteInPlace contrib/Orochi/contrib/hipew/src/hipew.cpp --replace-fail '"/opt/rocm/hip/lib/' '"${clr}/lib' substituteInPlace hiprt/hiprt_libpath.h --replace-fail '"/opt/rocm/hip/lib/' '"${clr}/lib/' ''; @@ -40,8 +39,6 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "PRECOMPILE" true) # needs accelerator (lib.cmakeBool "NO_UNITTEST" true) - # we have no need to support baking encrypted kernels into object files - (lib.cmakeBool "NO_ENCRYPT" true) (lib.cmakeBool "FORCE_DISABLE_CUDA" true) ]; From c23f22dd5b96e2143de1b3ec5b15e6f9af629fa1 Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Sat, 3 Jan 2026 11:04:41 -0800 Subject: [PATCH 11/12] blender-hip: manual backport of hiprt 3 support Minimal backport that applies on current blender of https://projects.blender.org/blender/blender/pulls/144889 --- pkgs/by-name/bl/blender/hiprt-3-compat.patch | 72 ++++++++++++++++++++ pkgs/by-name/bl/blender/package.nix | 3 + 2 files changed, 75 insertions(+) create mode 100644 pkgs/by-name/bl/blender/hiprt-3-compat.patch diff --git a/pkgs/by-name/bl/blender/hiprt-3-compat.patch b/pkgs/by-name/bl/blender/hiprt-3-compat.patch new file mode 100644 index 000000000000..b3f410128507 --- /dev/null +++ b/pkgs/by-name/bl/blender/hiprt-3-compat.patch @@ -0,0 +1,72 @@ +diff --git a/extern/hipew/include/hiprtew.h b/extern/hipew/include/hiprtew.h +index d245cb76..952ed805 100644 +--- a/extern/hipew/include/hiprtew.h ++++ b/extern/hipew/include/hiprtew.h +@@ -157,7 +157,7 @@ typedef hiprtError (thiprtDestroyGlobalStackBuffer)( hiprtContext context, hiprt + + typedef hiprtError(thiprtDestroyFuncTable)(hiprtContext context, + hiprtFuncTable funcTable); +-typedef void(thiprtSetLogLevel)( hiprtLogLevel level ); ++typedef hiprtError(thiprtSetLogLevel)( hiprtContext context, hiprtLogLevel level ); + + /* Function declarations. */ + extern thiprtCreateContext *hiprtCreateContext; +diff --git a/extern/hipew/src/hipew.c b/extern/hipew/src/hipew.c +index e72ccde6..138e1efc 100644 +--- a/extern/hipew/src/hipew.c ++++ b/extern/hipew/src/hipew.c +@@ -241,13 +241,13 @@ static int hipewHipInit(void) { + /* ROCm 6 changes paths from /opt/rocm/hip/lib to /opt/rocm/lib, so + * search for libraries there. */ + +- const char* hip_paths[] = { "libamdhip64.so", ++ const char* hip_paths[] = { "libamdhip64.so.7", ++ "/opt/rocm/lib/libamdhip64.so.7", ++ "/opt/rocm/hip/lib/libamdhip64.so.7", + "libamdhip64.so.6", + "/opt/rocm/lib/libamdhip64.so.6", + "/opt/rocm/hip/lib/libamdhip64.so.6", +- "libamdhip64.so.7", +- "/opt/rocm/lib/libamdhip64.so.7", +- "/opt/rocm/hip/lib/libamdhip64.so.7", ++ "libamdhip64.so", + NULL }; + #endif + static int initialized = 0; +diff --git a/intern/cycles/device/hiprt/device_impl.cpp b/intern/cycles/device/hiprt/device_impl.cpp +index c251a8d0..b54bc36c 100644 +--- a/intern/cycles/device/hiprt/device_impl.cpp ++++ b/intern/cycles/device/hiprt/device_impl.cpp +@@ -104,10 +104,10 @@ HIPRTDevice::HIPRTDevice(const DeviceInfo &info, + } + + if (LOG_IS_ON(LOG_LEVEL_TRACE)) { +- hiprtSetLogLevel(hiprtLogLevelInfo | hiprtLogLevelWarn | hiprtLogLevelError); ++ hiprtSetLogLevel(hiprt_context, hiprtLogLevelInfo | hiprtLogLevelWarn | hiprtLogLevelError); + } + else { +- hiprtSetLogLevel(hiprtLogLevelNone); ++ hiprtSetLogLevel(hiprt_context, hiprtLogLevelNone); + } + } + +diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt +index bcaf4e16..aa6a3d17 100644 +--- a/intern/cycles/kernel/CMakeLists.txt ++++ b/intern/cycles/kernel/CMakeLists.txt +@@ -93,13 +93,13 @@ set(SRC_KERNEL_DEVICE_HIPRT_HEADERS + set(SRC_KERNEL_DEVICE_HIPRT_SDK + hiprt/impl/Aabb.h + hiprt/impl/BvhNode.h +- hiprt/impl/Geometry.h ++ hiprt/impl/Header.h + hiprt/impl/hiprt_device_impl.h + hiprt/impl/hiprt_kernels_bitcode.h + hiprt/impl/Instance.h ++ hiprt/impl/Obb.h + hiprt/impl/QrDecomposition.h + hiprt/impl/Quaternion.h +- hiprt/impl/Scene.h + hiprt/impl/Transform.h + hiprt/impl/Triangle.h + ) diff --git a/pkgs/by-name/bl/blender/package.nix b/pkgs/by-name/bl/blender/package.nix index f4cec841f317..33630f2a2b26 100644 --- a/pkgs/by-name/bl/blender/package.nix +++ b/pkgs/by-name/bl/blender/package.nix @@ -126,6 +126,9 @@ stdenv'.mkDerivation (finalAttrs: { hash = "sha256-fNnQRfGfNc7rbk8npkcYtoAqRjJc6MaV4mqtSJxd0EM="; }; + # Minimal backport of hiprt 3.x support from https://projects.blender.org/blender/blender/pulls/144889 + patches = lib.optional rocmSupport ./hiprt-3-compat.patch; + postPatch = (lib.optionalString stdenv.hostPlatform.isDarwin '' : > build_files/cmake/platform/platform_apple_xcode.cmake From cadf2c1f093f6d1ad094f7236f7ebb05110f8411 Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Sat, 3 Jan 2026 12:18:33 -0800 Subject: [PATCH 12/12] opensplat: add ROCm support --- pkgs/by-name/op/opensplat/package.nix | 57 +++++++++++++++++++++++++-- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 54 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/op/opensplat/package.nix b/pkgs/by-name/op/opensplat/package.nix index 45791b230c1b..a4c417c9be8e 100644 --- a/pkgs/by-name/op/opensplat/package.nix +++ b/pkgs/by-name/op/opensplat/package.nix @@ -12,15 +12,16 @@ cxxopts, nix-update-script, config, - # Upstream has rocm/hip support, too. anyone? cudaSupport ? config.cudaSupport, cudaPackages, + rocmSupport ? config.rocmSupport, + rocmPackages, autoAddDriverRunpath, fetchpatch2, }: let version = "1.1.4"; - torch = python3.pkgs.torch.override { inherit cudaSupport; }; + torch = python3.pkgs.torch.override { inherit cudaSupport rocmSupport; }; # Using a normal stdenv with cuda torch gives # ld: /nix/store/k1l7y96gv0nc685cg7i3g43i4icmddzk-python3.11-torch-2.2.1-lib/lib/libc10.so: undefined reference to `std::ios_base_library_init()@GLIBCXX_3.4.32' stdenv' = if cudaSupport then cudaPackages.backendStdenv else stdenv; @@ -43,10 +44,32 @@ stdenv'.mkDerivation { }) ]; + postPatch = lib.optionalString rocmSupport '' + # ROCm CMake targets must be available before find_package(Torch) + # because Torch's Caffe2Targets.cmake references them in torch_hip_library + substituteInPlace CMakeLists.txt \ + --replace-fail "find_package(Torch REQUIRED)" \ + "find_package(hip REQUIRED) + find_package(hiprtc REQUIRED) + find_package(hipblas REQUIRED) + find_package(hipfft REQUIRED) + find_package(hiprand REQUIRED) + find_package(hipsparse REQUIRED) + find_package(hipsolver REQUIRED) + find_package(hipblaslt REQUIRED) + find_package(rocblas REQUIRED) + find_package(rocsolver REQUIRED) + find_package(miopen REQUIRED) + find_package(Torch REQUIRED)" + ''; + nativeBuildInputs = [ cmake ninja ] + ++ lib.optionals rocmSupport [ + rocmPackages.clr + ] ++ lib.optionals cudaSupport [ cudaPackages.cuda_nvcc autoAddDriverRunpath @@ -61,16 +84,39 @@ stdenv'.mkDerivation { torch opencv ] + ++ lib.optionals rocmSupport [ + rocmPackages.clr + rocmPackages.hipblas + rocmPackages.hipfft + rocmPackages.hiprand + rocmPackages.hipsparse + rocmPackages.hipsolver + rocmPackages.hipblaslt + rocmPackages.rocblas + rocmPackages.rocsolver + rocmPackages.rocsolver + rocmPackages.miopen + ] ++ lib.optionals cudaSupport [ cudaPackages.cuda_cudart ]; - env.TORCH_CUDA_ARCH_LIST = "${lib.concatStringsSep ";" python3.pkgs.torch.cudaCapabilities}"; + env = + lib.optionalAttrs cudaSupport { + TORCH_CUDA_ARCH_LIST = "${lib.concatStringsSep ";" python3.pkgs.torch.cudaCapabilities}"; + NIX_LDFLAGS = "-L${lib.getOutput "stubs" cudaPackages.cuda_cudart}/lib/stubs"; # fixes -lcuda not found + } + // lib.optionalAttrs rocmSupport { + HIPFLAGS = "-I${lib.getInclude rocmPackages.rocthrust}/include -I${lib.getInclude rocmPackages.rocprim}/include"; + }; cmakeFlags = [ (lib.cmakeBool "CMAKE_SKIP_RPATH" true) (lib.cmakeFeature "FETCHCONTENT_TRY_FIND_PACKAGE_MODE" "ALWAYS") ] + ++ lib.optionals rocmSupport [ + (lib.cmakeFeature "GPU_RUNTIME" "HIP") + ] ++ lib.optionals cudaSupport [ (lib.cmakeFeature "GPU_RUNTIME" "CUDA") (lib.cmakeFeature "CUDA_TOOLKIT_ROOT_DIR" "${cudaPackages.cudatoolkit}/") @@ -87,7 +133,10 @@ stdenv'.mkDerivation { # vendored+modified gsplat lib.licenses.asl20 ]; - maintainers = [ lib.maintainers.jcaesar ]; + maintainers = [ + lib.maintainers.jcaesar + lib.maintainers.LunNova + ]; platforms = lib.platforms.linux ++ lib.optionals (!cudaSupport) lib.platforms.darwin; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1b49fa2ec8d9..fc41a46d7d04 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4104,6 +4104,7 @@ with pkgs; colmapWithCuda = colmap.override { cudaSupport = true; }; + opensplatWithRocm = opensplat.override { rocmSupport = true; }; opensplatWithCuda = opensplat.override { cudaSupport = true; }; chickenPackages_4 = recurseIntoAttrs (callPackage ../development/compilers/chicken/4 { });