legion: Add 24.03.0, update HIP dependency (#43398)
* legion: Add 24.03.0, update HIP dependency. * legion: Remove CUDA upper bound, update HIP bounds, use f-strings. * legion: Fix format. * legion: Fix format again.
This commit is contained in:
parent
32deca2a4c
commit
e2a942d07e
2 changed files with 20 additions and 35 deletions
|
@ -27,6 +27,7 @@ class Legion(CMakePackage, ROCmPackage):
|
|||
|
||||
maintainers("pmccormick", "streichler", "elliottslaughter")
|
||||
tags = ["e4s"]
|
||||
version("24.03.0", tag="legion-24.03.0", commit="c61071541218747e35767317f6f89b83f374f264")
|
||||
version("23.12.0", tag="legion-23.12.0", commit="8fea67ee694a5d9fb27232a7976af189d6c98456")
|
||||
version("23.09.0", tag="legion-23.09.0", commit="7304dfcf9b69005dd3e65e9ef7d5bd49122f9b49")
|
||||
version("23.06.0", tag="legion-23.06.0", commit="7b5ff2fb9974511c28aec8d97b942f26105b5f6d")
|
||||
|
@ -53,8 +54,10 @@ class Legion(CMakePackage, ROCmPackage):
|
|||
depends_on("mpi", when="conduit=mpi")
|
||||
depends_on("cuda@10.0:11.9", when="+cuda_unsupported_compiler @21.03.0:23.03.0")
|
||||
depends_on("cuda@10.0:11.9", when="+cuda @21.03.0:23.03.0")
|
||||
depends_on("cuda@10.0:12.2", when="+cuda_unsupported_compiler")
|
||||
depends_on("cuda@10.0:12.2", when="+cuda")
|
||||
depends_on("cuda@10.0:", when="+cuda_unsupported_compiler")
|
||||
depends_on("cuda@10.0:", when="+cuda")
|
||||
depends_on("hip@5.1:5.7", when="+rocm @23.03.0:23.12.0")
|
||||
depends_on("hip@5.1:", when="+rocm")
|
||||
depends_on("hdf5", when="+hdf5")
|
||||
depends_on("hwloc", when="+hwloc")
|
||||
|
||||
|
@ -62,12 +65,12 @@ class Legion(CMakePackage, ROCmPackage):
|
|||
cuda_arch_list = CudaPackage.cuda_arch_values
|
||||
for nvarch in cuda_arch_list:
|
||||
depends_on(
|
||||
"kokkos@3.3.01:+cuda+cuda_lambda+wrapper cuda_arch={0}".format(nvarch),
|
||||
when="%gcc+kokkos+cuda cuda_arch={0}".format(nvarch),
|
||||
f"kokkos@3.3.01:+cuda+cuda_lambda+wrapper cuda_arch={nvarch}",
|
||||
when=f"%gcc+kokkos+cuda cuda_arch={nvarch}",
|
||||
)
|
||||
depends_on(
|
||||
"kokkos@3.3.01:+cuda+cuda_lambda~wrapper cuda_arch={0}".format(nvarch),
|
||||
when="%clang+kokkos+cuda cuda_arch={0}".format(nvarch),
|
||||
f"kokkos@3.3.01:+cuda+cuda_lambda~wrapper cuda_arch={nvarch}",
|
||||
when=f"%clang+kokkos+cuda cuda_arch={nvarch}",
|
||||
)
|
||||
|
||||
depends_on("kokkos@3.3.01:~cuda", when="+kokkos~cuda")
|
||||
|
@ -75,7 +78,6 @@ class Legion(CMakePackage, ROCmPackage):
|
|||
|
||||
# https://github.com/spack/spack/issues/37232#issuecomment-1553376552
|
||||
patch("hip-offload-arch.patch", when="@23.03.0 +rocm")
|
||||
patch("update-hip-path-legion-23.06.0.patch", when="@23.06.0:23.12.0 ^hip@6.0 +rocm")
|
||||
|
||||
def patch(self):
|
||||
if "network=gasnet conduit=ofi-slingshot11 ^cray-mpich+wrappers" in self.spec:
|
||||
|
@ -103,10 +105,7 @@ def patch(self):
|
|||
)
|
||||
|
||||
for arch in ROCmPackage.amdgpu_targets:
|
||||
depends_on(
|
||||
"kokkos@3.3.01:+rocm amdgpu_target={0}".format(arch),
|
||||
when="+rocm amdgpu_target={0}".format(arch),
|
||||
)
|
||||
depends_on(f"kokkos@3.3.01:+rocm amdgpu_target={arch}", when=f"+rocm amdgpu_target={arch}")
|
||||
|
||||
depends_on("kokkos@3.3.01:+rocm", when="+kokkos+rocm")
|
||||
|
||||
|
@ -350,11 +349,10 @@ def cmake_args(self):
|
|||
options.append(from_variant("Legion_HIP_TARGET", "hip_target"))
|
||||
options.append(from_variant("Legion_HIP_ARCH", "amdgpu_target"))
|
||||
options.append(from_variant("Legion_HIJACK_HIP", "hip_hijack"))
|
||||
options.append(self.define("HIP_PATH", "{0}/hip".format(spec["hip"].prefix)))
|
||||
if "^hip@:5.7" in spec:
|
||||
options.append(self.define("HIP_PATH", "{0}/hip".format(spec["hip"].prefix)))
|
||||
elif "^hip@6.0:" in spec:
|
||||
options.append(self.define("HIP_PATH", "{0}".format(spec["hip"].prefix)))
|
||||
if "@23.03.0:23.12.0" in spec:
|
||||
options.append(self.define("HIP_PATH", f"{spec['hip'].prefix}/hip"))
|
||||
else:
|
||||
options.append(self.define("ROCM_PATH", spec["hip"].prefix))
|
||||
|
||||
if "+fortran" in spec:
|
||||
# default is off.
|
||||
|
@ -460,21 +458,21 @@ def run_local_function_tasks_test(self):
|
|||
exe = "local_function_tasks"
|
||||
|
||||
cmake_args = [
|
||||
"-DCMAKE_C_COMPILER={0}".format(self.compiler.cc),
|
||||
"-DCMAKE_CXX_COMPILER={0}".format(self.compiler.cxx),
|
||||
"-DLegion_DIR={0}".format(join_path(self.prefix, "share", "Legion", "cmake")),
|
||||
f"-DCMAKE_C_COMPILER={self.compiler.cc}",
|
||||
f"-DCMAKE_CXX_COMPILER={self.compiler.cxx}",
|
||||
f"-DLegion_DIR={join_path(self.prefix, 'share', 'Legion', 'cmake')}",
|
||||
]
|
||||
|
||||
self.run_test(
|
||||
"cmake",
|
||||
options=cmake_args,
|
||||
purpose="test: generate makefile for {0} example".format(exe),
|
||||
purpose=f"test: generate makefile for {exe} example",
|
||||
work_dir=test_dir,
|
||||
)
|
||||
|
||||
self.run_test("make", purpose="test: build {0} example".format(exe), work_dir=test_dir)
|
||||
self.run_test("make", purpose=f"test: build {exe} example", work_dir=test_dir)
|
||||
|
||||
self.run_test(exe, purpose="test: run {0} example".format(exe), work_dir=test_dir)
|
||||
self.run_test(exe, purpose=f"test: run {exe} example", work_dir=test_dir)
|
||||
|
||||
def test(self):
|
||||
self.run_local_function_tasks_test()
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/cmake/FindHIP.cmake b/cmake/FindHIP.cmake
|
||||
index f86edd2..24492ad 100644
|
||||
--- a/cmake/FindHIP.cmake
|
||||
+++ b/cmake/FindHIP.cmake
|
||||
@@ -22,7 +22,7 @@ if(NOT DEFINED HIP_PATH)
|
||||
set(HIP_PATH $ENV{HIP_PATH} CACHE PATH "Path to where HIP has been installed")
|
||||
endif()
|
||||
endif()
|
||||
-include(${HIP_PATH}/cmake/FindHIP.cmake)
|
||||
+include(${HIP_PATH}/lib/cmake/hip/FindHIP.cmake)
|
||||
|
||||
if(NOT HIP_INCLUDE_DIRS)
|
||||
list(APPEND HIP_INCLUDE_DIRS
|
Loading…
Reference in a new issue