summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authoreugeneswalker <38933153+eugeneswalker@users.noreply.github.com>2023-05-09 08:51:04 -0500
committerGitHub <noreply@github.com>2023-05-09 06:51:04 -0700
commit13dd05e5ecc7b720044a2b8df89251213ed020ac (patch)
tree837be38d8d965d3c155b788763ed55ccaf9a082c /var
parent89520467e03616270e173ddb8a58b540a70973d7 (diff)
downloadspack-13dd05e5ecc7b720044a2b8df89251213ed020ac.tar.gz
spack-13dd05e5ecc7b720044a2b8df89251213ed020ac.tar.bz2
spack-13dd05e5ecc7b720044a2b8df89251213ed020ac.tar.xz
spack-13dd05e5ecc7b720044a2b8df89251213ed020ac.zip
hip: get_paths for hipify-clang (#37559)
* hip: get_paths for hipify-clang * fix: need to actually use get_paths now to get hipify-clang path * set hipify-clang path differentluy for external vs spack-installed case * [@spackbot] updating style on behalf of eugeneswalker
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/hip/package.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/hip/package.py b/var/spack/repos/builtin/packages/hip/package.py
index a64d0846d9..21181f693e 100644
--- a/var/spack/repos/builtin/packages/hip/package.py
+++ b/var/spack/repos/builtin/packages/hip/package.py
@@ -379,6 +379,9 @@ class Hip(CMakePackage):
"rocminfo": rocm_prefix,
"rocm-device-libs": rocm_prefix,
}
+
+ if self.spec.satisfies("@5.4:"):
+ paths["hipify-clang"] = rocm_prefix
else:
paths = {
"hip-path": self.spec.prefix,
@@ -389,6 +392,9 @@ class Hip(CMakePackage):
"rocm-device-libs": self.spec["llvm-amdgpu"].prefix,
}
+ if self.spec.satisfies("@5.4:"):
+ paths["hipify-clang"] = self.spec["hipify-clang"].prefix
+
if "@:3.8.0" in self.spec:
paths["bitcode"] = paths["rocm-device-libs"].lib
else:
@@ -417,7 +423,7 @@ class Hip(CMakePackage):
# there is a common prefix /opt/rocm-x.y.z.
env.set("ROCM_PATH", paths["rocm-path"])
if self.spec.satisfies("@5.4:"):
- env.set("HIPIFY_CLANG_PATH", self.spec["hipify-clang"].prefix)
+ env.set("HIPIFY_CLANG_PATH", paths["hipify-clang"])
# hipcc recognizes HIP_PLATFORM == hcc and HIP_COMPILER == clang, even
# though below we specified HIP_PLATFORM=rocclr and HIP_COMPILER=clang