diff --git a/pkgs/development/libraries/science/math/magma/generic.nix b/pkgs/development/libraries/science/math/magma/generic.nix index 394e249abc7e..3ce4d9a7bf66 100644 --- a/pkgs/development/libraries/science/math/magma/generic.nix +++ b/pkgs/development/libraries/science/math/magma/generic.nix @@ -42,20 +42,7 @@ let ; inherit (magmaRelease) version hash supportedGpuTargets; - # Per https://icl.utk.edu/magma/downloads, support for CUDA 12 wasn't added until 2.7.1. - # If we're building a version prior to that, use the latest release of the 11.x series. - effectiveCudaPackages = - if strings.versionOlder version "2.7.1" then cudaPackages_11 else cudaPackages; - - inherit (effectiveCudaPackages) cudaAtLeast flags cudaOlder; - - effectiveRocmPackages = - if strings.versionOlder version "2.8.0" then - throw '' - the required ROCm 5.7 version for magma ${version} has been removed - '' - else - rocmPackages; + inherit (cudaPackages) cudaAtLeast flags cudaOlder; # NOTE: The lists.subtractLists function is perhaps a bit unintuitive. It subtracts the elements # of the first list *from* the second list. That means: @@ -65,7 +52,7 @@ let # NOTE: The hip.gpuTargets are prefixed with "gfx" instead of "sm" like flags.realArches. # For some reason, Magma's CMakeLists.txt file does not handle the "gfx" prefix, so we must # remove it. - rocmArches = lists.map (x: strings.removePrefix "gfx" x) effectiveRocmPackages.clr.gpuTargets; + rocmArches = lists.map (x: strings.removePrefix "gfx" x) rocmPackages.clr.gpuTargets; supportedRocmArches = lists.intersectLists rocmArches supportedGpuTargets; unsupportedRocmArches = lists.subtractLists supportedRocmArches rocmArches; @@ -123,19 +110,12 @@ stdenv.mkDerivation (finalAttrs: { "test" ]; - postPatch = - '' - # For rocm version script invoked by cmake - patchShebangs tools/ - # Fixup for the python test runners - patchShebangs ./testing/run_{tests,summarize}.py - '' - + lib.optionalString (strings.versionOlder version "2.9.0") '' - substituteInPlace ./testing/run_tests.py \ - --replace-fail \ - "print >>sys.stderr, cmdp, \"doesn't exist (original name: \" + cmd + \", precision: \" + precision + \")\"" \ - "print(f\"{cmdp} doesn't exist (original name: {cmd}, precision: {precision})\", file=sys.stderr)" - ''; + postPatch = '' + # For rocm version script invoked by cmake + patchShebangs tools/ + # Fixup for the python test runners + patchShebangs ./testing/run_{tests,summarize}.py + ''; nativeBuildInputs = [ @@ -145,7 +125,7 @@ stdenv.mkDerivation (finalAttrs: { gfortran ] ++ lists.optionals cudaSupport [ - effectiveCudaPackages.cuda_nvcc + cudaPackages.cuda_nvcc ]; buildInputs = @@ -157,7 +137,7 @@ stdenv.mkDerivation (finalAttrs: { (getLib gfortran.cc) # libgfortran.so ] ++ lists.optionals cudaSupport ( - with effectiveCudaPackages; + with cudaPackages; [ cuda_cccl # and cuda_cudart # cuda_runtime.h @@ -172,7 +152,7 @@ stdenv.mkDerivation (finalAttrs: { ] ) ++ lists.optionals rocmSupport ( - with effectiveRocmPackages; + with rocmPackages; [ clr hipblas @@ -203,9 +183,9 @@ stdenv.mkDerivation (finalAttrs: { # Can be removed once https://github.com/icl-utk-edu/magma/pull/27 is merged # Can't easily apply the PR as a patch because we rely on the tarball with pregenerated # hipified files ∴ fetchpatch of the PR will apply cleanly but fail to build - (strings.cmakeFeature "ROCM_CORE" "${effectiveRocmPackages.clr}") - (strings.cmakeFeature "CMAKE_C_COMPILER" "${effectiveRocmPackages.clr}/bin/hipcc") - (strings.cmakeFeature "CMAKE_CXX_COMPILER" "${effectiveRocmPackages.clr}/bin/hipcc") + (strings.cmakeFeature "ROCM_CORE" "${rocmPackages.clr}") + (strings.cmakeFeature "CMAKE_C_COMPILER" "${rocmPackages.clr}/bin/hipcc") + (strings.cmakeFeature "CMAKE_CXX_COMPILER" "${rocmPackages.clr}/bin/hipcc") ]; # Magma doesn't have a test suite we can easily run, just loose executables, all of which require a GPU. @@ -241,8 +221,12 @@ stdenv.mkDerivation (finalAttrs: { ''; passthru = { - inherit cudaSupport rocmSupport gpuTargets; - cudaPackages = effectiveCudaPackages; + inherit + cudaPackages + cudaSupport + rocmSupport + gpuTargets + ; testers = { all = let @@ -395,8 +379,6 @@ stdenv.mkDerivation (finalAttrs: { # dynamic CUDA support is broken https://github.com/NixOS/nixpkgs/issues/239237 (cudaSupport && !static) || !(cudaSupport || rocmSupport) # At least one back-end enabled - || (cudaSupport && rocmSupport) # Mutually exclusive - || (cudaSupport && strings.versionOlder version "2.7.1" && cudaPackages_11 == null) - || (rocmSupport && strings.versionOlder version "2.8.0"); + || (cudaSupport && rocmSupport); # Mutually exclusive }; }) diff --git a/pkgs/development/libraries/science/math/magma/releases.nix b/pkgs/development/libraries/science/math/magma/releases.nix index beb1559e3762..2d0566300330 100644 --- a/pkgs/development/libraries/science/math/magma/releases.nix +++ b/pkgs/development/libraries/science/math/magma/releases.nix @@ -4,68 +4,6 @@ # HIP is here: https://github.com/icl-utk-edu/magma/blob/v2.9.0/CMakeLists.txt#L290 # CUDA works around magma's wrappers and uses FindCUDAToolkit directly [ - { - version = "2.6.2"; - hash = "sha256-dbVU2rAJA+LRC5cskT5Q5/iMvGLzrkMrWghsfk7aCnE="; - supportedGpuTargets = [ - "700" - "701" - "702" - "703" - "704" - "705" - "801" - "802" - "803" - "805" - "810" - "900" - "902" - "904" - "906" - "908" - "909" - "90c" - "1010" - "1011" - "1012" - "1030" - "1031" - "1032" - "1033" - ]; - } - { - version = "2.7.2"; - hash = "sha256-cpvBpw5RinQi/no6VFN6R0EDWne+M0n2bqxcNiV21WA="; - supportedGpuTargets = [ - "700" - "701" - "702" - "703" - "704" - "705" - "801" - "802" - "803" - "805" - "810" - "900" - "902" - "904" - "906" - "908" - "909" - "90c" - "1010" - "1011" - "1012" - "1030" - "1031" - "1032" - "1033" - ]; - } { version = "2.9.0"; hash = "sha256-/3f9Nyaz3+w7+1V5CwZICqXMOEOWwts1xW/a5KgsZBw="; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 2e93d6c7f224..37dfb4c2fea8 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1158,6 +1158,8 @@ mapAliases { ma1sd = throw "ma1sd was dropped as it is unmaintained"; # Added 2024-07-10 mac = monkeysAudio; # Added 2024-11-30 MACS2 = macs2; # Added 2023-06-12 + magma_2_6_2 = throw "'magma_2_6_2' has been removed, use the latest 'magma' package instead."; # Added 2025-07-20 + magma_2_7_2 = throw "'magma_2_7_2' has been removed, use the latest 'magma' package instead."; # Added 2025-07-20 mailcore2 = throw "'mailcore2' has been removed due to lack of upstream maintenance."; # Added 2025-06-09 mailctl = throw "mailctl has been renamed to oama"; # Added 2024-08-19 mailman-rss = throw "The mailman-rss package was dropped since it was unmaintained."; # Added 2024-06-21 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3c27a643d53e..aa859708acc3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15698,7 +15698,7 @@ with pkgs; # standard BLAS and LAPACK. openblasCompat = openblas.override { blas64 = false; }; - inherit (callPackage ../development/libraries/science/math/magma { }) magma magma_2_7_2 magma_2_6_2; + inherit (callPackage ../development/libraries/science/math/magma { }) magma; magma-cuda = magma.override { cudaSupport = true;