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
This commit is contained in:
parent
89520467e0
commit
13dd05e5ec
@ -379,6 +379,9 @@ def get_paths(self):
|
||||
"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 @@ def get_paths(self):
|
||||
"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 @@ def set_variables(self, env):
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user