Skip to content

Commit

Permalink
magma-hip: remove ROCm version detection patch, set ROCM_CORE
Browse files Browse the repository at this point in the history
Fixes the build against rocmPackages_6

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
  • Loading branch information
LunNova committed Mar 1, 2025
1 parent 783e1f8 commit bda6bcb
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions pkgs/development/libraries/science/math/magma/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,11 @@ stdenv.mkDerivation {
"test"
];

patches = lib.optionals (version == "2.9.0") [
# get ROCm version directly
# https://github.com/icl-utk-edu/magma/pull/27
(fetchpatch {
url = "https://github.com/icl-utk-edu/magma/commit/10fe816b763c41099fa1c978a79d6869246671cf.patch";
hash = "sha256-qSY5ACMHyHofJdQKyPqx8sI8GbPD6IZezmCd8qOS5OM=";
})
];

# Fixup for the python test runners
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") ''
Expand Down Expand Up @@ -201,6 +194,10 @@ stdenv.mkDerivation {
(strings.cmakeFeature "MIN_ARCH" minArch) # Disarms magma's asserts
]
++ lists.optionals rocmSupport [
# 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")
];
Expand Down

0 comments on commit bda6bcb

Please sign in to comment.