Update hip support in radiuss packages leveraging blt@0.7.0 (#49488)
Co-authored-by: Chris White <white238@llnl.gov> Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This commit is contained in:
parent
e9cc1b36bc
commit
9dada76d34
@ -278,17 +278,24 @@ def initconfig_hardware_entries(self):
|
||||
entries.append("# ROCm")
|
||||
entries.append("#------------------{0}\n".format("-" * 30))
|
||||
|
||||
# Explicitly setting HIP_ROOT_DIR may be a patch that is no longer necessary
|
||||
entries.append(cmake_cache_path("HIP_ROOT_DIR", "{0}".format(spec["hip"].prefix)))
|
||||
llvm_bin = spec["llvm-amdgpu"].prefix.bin
|
||||
llvm_prefix = spec["llvm-amdgpu"].prefix
|
||||
# Some ROCm systems seem to point to /<path>/rocm-<ver>/ and
|
||||
# others point to /<path>/rocm-<ver>/llvm
|
||||
if os.path.basename(os.path.normpath(llvm_prefix)) != "llvm":
|
||||
llvm_bin = os.path.join(llvm_prefix, "llvm/bin/")
|
||||
entries.append(
|
||||
cmake_cache_filepath("CMAKE_HIP_COMPILER", os.path.join(llvm_bin, "clang++"))
|
||||
)
|
||||
if spec.satisfies("^blt@0.7:"):
|
||||
rocm_root = os.path.dirname(spec["llvm-amdgpu"].prefix)
|
||||
entries.append(cmake_cache_path("ROCM_PATH", rocm_root))
|
||||
else:
|
||||
# Explicitly setting HIP_ROOT_DIR may be a patch that is no longer necessary
|
||||
entries.append(cmake_cache_path("HIP_ROOT_DIR", "{0}".format(spec["hip"].prefix)))
|
||||
llvm_bin = spec["llvm-amdgpu"].prefix.bin
|
||||
llvm_prefix = spec["llvm-amdgpu"].prefix
|
||||
# Some ROCm systems seem to point to /<path>/rocm-<ver>/ and
|
||||
# others point to /<path>/rocm-<ver>/llvm
|
||||
if os.path.basename(os.path.normpath(llvm_prefix)) != "llvm":
|
||||
llvm_bin = os.path.join(llvm_prefix, "llvm/bin/")
|
||||
entries.append(
|
||||
cmake_cache_filepath(
|
||||
"CMAKE_HIP_COMPILER", os.path.join(llvm_bin, "amdclang++")
|
||||
)
|
||||
)
|
||||
|
||||
archs = self.spec.variants["amdgpu_target"].value
|
||||
if archs[0] != "none":
|
||||
arch_str = ";".join(archs)
|
||||
|
@ -72,6 +72,7 @@ class Blt(Package):
|
||||
# if you export targets this could cause problems in downstream
|
||||
# projects if not handled properly. More info here:
|
||||
# https://llnl-blt.readthedocs.io/en/develop/tutorial/exporting_targets.html
|
||||
version("0.7.0", sha256="df8720a9cba1199d21f1d32649cebb9dddf95aa61bc3ac23f6c8a3c6b6083528")
|
||||
version("0.6.2", sha256="84b663162957c1fe0e896ac8e94cbf2b6def4a152ccfa12a293db14fb25191c8")
|
||||
version("0.6.1", sha256="205540b704b8da5a967475be9e8f2d1a5e77009b950e7fbf01c0edabc4315906")
|
||||
version("0.6.0", sha256="ede355e85f7b11d7c8442b51e4f7871c152093818606e00b1e1cf30f67ebdb23")
|
||||
|
@ -186,7 +186,7 @@ def initconfig_compiler_entries(self):
|
||||
compiler = self.compiler
|
||||
entries = super().initconfig_compiler_entries()
|
||||
|
||||
if spec.satisfies("+rocm"):
|
||||
if spec.satisfies("+rocm ^blt@:0.6"):
|
||||
entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
|
||||
|
||||
llnl_link_helpers(entries, spec, compiler)
|
||||
|
@ -221,7 +221,7 @@ def initconfig_compiler_entries(self):
|
||||
# Default entries are already defined in CachedCMakePackage, inherit them:
|
||||
entries = super().initconfig_compiler_entries()
|
||||
|
||||
if spec.satisfies("+rocm"):
|
||||
if spec.satisfies("+rocm ^blt@:0.6"):
|
||||
entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
|
||||
|
||||
llnl_link_helpers(entries, spec, compiler)
|
||||
|
@ -176,7 +176,7 @@ def initconfig_compiler_entries(self):
|
||||
# Default entries are already defined in CachedCMakePackage, inherit them:
|
||||
entries = super().initconfig_compiler_entries()
|
||||
|
||||
if spec.satisfies("+rocm"):
|
||||
if spec.satisfies("+rocm ^blt@:0.6"):
|
||||
entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
|
||||
|
||||
# adrienbernede-23-01
|
||||
|
@ -295,7 +295,7 @@ def initconfig_compiler_entries(self):
|
||||
# Default entries are already defined in CachedCMakePackage, inherit them:
|
||||
entries = super().initconfig_compiler_entries()
|
||||
|
||||
if spec.satisfies("+rocm"):
|
||||
if spec.satisfies("+rocm ^blt@:0.6"):
|
||||
entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
|
||||
|
||||
llnl_link_helpers(entries, spec, compiler)
|
||||
|
@ -324,7 +324,7 @@ def initconfig_compiler_entries(self):
|
||||
# Default entries are already defined in CachedCMakePackage, inherit them:
|
||||
entries = super().initconfig_compiler_entries()
|
||||
|
||||
if "+rocm" in spec:
|
||||
if spec.satisfies("+rocm ^blt@:0.6"):
|
||||
entries.insert(0, cmake_cache_path("CMAKE_CXX_COMPILER", spec["hip"].hipcc))
|
||||
|
||||
option_prefix = "UMPIRE_" if spec.satisfies("@2022.03.0:") else ""
|
||||
|
Loading…
Reference in New Issue
Block a user