hip@5.2.0 onwards: set prefix properly (#33257)
* hip-set-prefix-rocm5.2.0-onwards * Update var/spack/repos/builtin/packages/hip/package.py Update description Co-authored-by: Satish Balay <balay@mcs.anl.gov>
This commit is contained in:
parent
67bc90acb7
commit
c44934a44d
1 changed files with 6 additions and 4 deletions
|
@ -288,10 +288,12 @@ def get_paths(self):
|
|||
if self.spec.external:
|
||||
# For external packages we only assume the `hip` prefix is known,
|
||||
# because spack does not set prefixes of dependencies of externals.
|
||||
# We assume self.spec.prefix is /opt/rocm-x.y.z/hip and rocm has a
|
||||
# default installation with everything installed under
|
||||
# /opt/rocm-x.y.z
|
||||
rocm_prefix = Prefix(os.path.dirname(self.spec.prefix))
|
||||
# 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
|
||||
if self.spec.satisfies("@5.2.0:"):
|
||||
rocm_prefix = Prefix(self.spec.prefix)
|
||||
else:
|
||||
rocm_prefix = Prefix(os.path.dirname(self.spec.prefix))
|
||||
|
||||
if not os.path.isdir(rocm_prefix):
|
||||
msg = "Could not determine prefix for other rocm components\n"
|
||||
|
|
Loading…
Reference in a new issue