diff options
author | Brian Van Essen <vanessen1@llnl.gov> | 2022-11-10 23:32:55 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-10 23:32:55 -0800 |
commit | 3437926cdebd3c5789620793802668290ce8555b (patch) | |
tree | a2a2fada631091aa78ff26bf5cccd5f31312707a /var | |
parent | d25375da55023cf83440489db19a625d0b70d28a (diff) | |
download | spack-3437926cdebd3c5789620793802668290ce8555b.tar.gz spack-3437926cdebd3c5789620793802668290ce8555b.tar.bz2 spack-3437926cdebd3c5789620793802668290ce8555b.tar.xz spack-3437926cdebd3c5789620793802668290ce8555b.zip |
Fixed a bug where the external HIP library is found in a nested directory, even on newer releases of ROCm. (#33772)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/hip/package.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/hip/package.py b/var/spack/repos/builtin/packages/hip/package.py index 9dce218904..e179ccb887 100644 --- a/var/spack/repos/builtin/packages/hip/package.py +++ b/var/spack/repos/builtin/packages/hip/package.py @@ -291,8 +291,13 @@ class Hip(CMakePackage): hip_libs_at_top = os.path.basename(self.spec.prefix) != "hip" # We assume self.spec.prefix is /opt/rocm-x.y.z for rocm-5.2.0 and newer # and /opt/rocm-x.y.z/hip for older versions + # However, depending on how an external is found it can be at either level + # of the installation path if self.spec.satisfies("@5.2.0:"): - rocm_prefix = Prefix(self.spec.prefix) + if hip_libs_at_top: + rocm_prefix = Prefix(self.spec.prefix) + else: + rocm_prefix = Prefix(os.path.dirname(self.spec.prefix)) else: # We assume self.spec.prefix is /opt/rocm-x.y.z/hip and rocm has a # default installation with everything installed under |