Add dla-future 0.4.0 (#42106)
This commit is contained in:
parent
264c0d6428
commit
07c1f7ced8
@ -16,6 +16,7 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage):
|
|||||||
|
|
||||||
license("BSD-3-Clause")
|
license("BSD-3-Clause")
|
||||||
|
|
||||||
|
version("0.4.0", sha256="34fd0da0d1a72b6981bed0bba029ba0947e0d0d99beb3e0aad0a478095c9527d")
|
||||||
version("0.3.1", sha256="350a7fd216790182aa52639a3d574990a9d57843e02b92d87b854912f4812bfe")
|
version("0.3.1", sha256="350a7fd216790182aa52639a3d574990a9d57843e02b92d87b854912f4812bfe")
|
||||||
version("0.3.0", sha256="9887ac0b466ca03d704a8738bc89e68550ed33509578c576390e98e76b64911b")
|
version("0.3.0", sha256="9887ac0b466ca03d704a8738bc89e68550ed33509578c576390e98e76b64911b")
|
||||||
version("0.2.1", sha256="4c2669d58f041304bd618a9d69d9879a42e6366612c2fc932df3894d0326b7fe")
|
version("0.2.1", sha256="4c2669d58f041304bd618a9d69d9879a42e6366612c2fc932df3894d0326b7fe")
|
||||||
@ -52,6 +53,9 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage):
|
|||||||
depends_on("scalapack", when="+scalapack")
|
depends_on("scalapack", when="+scalapack")
|
||||||
depends_on("blaspp@2022.05.00:")
|
depends_on("blaspp@2022.05.00:")
|
||||||
depends_on("lapackpp@2022.05.00:")
|
depends_on("lapackpp@2022.05.00:")
|
||||||
|
depends_on("intel-oneapi-mkl +cluster", when="^[virtuals=scalapack] intel-oneapi-mkl")
|
||||||
|
|
||||||
|
conflicts("intel-oneapi-mkl", when="@:0.3")
|
||||||
|
|
||||||
depends_on("umpire~examples")
|
depends_on("umpire~examples")
|
||||||
depends_on("umpire~cuda", when="~cuda")
|
depends_on("umpire~cuda", when="~cuda")
|
||||||
@ -63,7 +67,8 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage):
|
|||||||
depends_on("pika@0.15.1:", when="@0.1")
|
depends_on("pika@0.15.1:", when="@0.1")
|
||||||
depends_on("pika@0.16:", when="@0.2.0")
|
depends_on("pika@0.16:", when="@0.2.0")
|
||||||
depends_on("pika@0.17:", when="@0.2.1")
|
depends_on("pika@0.17:", when="@0.2.1")
|
||||||
depends_on("pika@0.18:", when="@0.3.0:")
|
depends_on("pika@0.18:", when="@0.3")
|
||||||
|
depends_on("pika@0.19.1:", when="@0.4.0:")
|
||||||
depends_on("pika-algorithms@0.1:", when="@:0.2")
|
depends_on("pika-algorithms@0.1:", when="@:0.2")
|
||||||
depends_on("pika +mpi")
|
depends_on("pika +mpi")
|
||||||
depends_on("pika +cuda", when="+cuda")
|
depends_on("pika +cuda", when="+cuda")
|
||||||
@ -75,9 +80,10 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage):
|
|||||||
depends_on("whip +rocm", when="+rocm")
|
depends_on("whip +rocm", when="+rocm")
|
||||||
|
|
||||||
depends_on("rocblas", when="+rocm")
|
depends_on("rocblas", when="+rocm")
|
||||||
depends_on("rocprim", when="+rocm")
|
|
||||||
depends_on("rocsolver", when="+rocm")
|
depends_on("rocsolver", when="+rocm")
|
||||||
depends_on("rocthrust", when="+rocm")
|
|
||||||
|
depends_on("rocprim", when="@:0.3 +rocm")
|
||||||
|
depends_on("rocthrust", when="@:0.3 +rocm")
|
||||||
|
|
||||||
# nvcc 11.2 and older is unable to detect fmt::formatter specializations.
|
# nvcc 11.2 and older is unable to detect fmt::formatter specializations.
|
||||||
# DLA-Future 0.3.1 includes a workaround to avoid including fmt in device
|
# DLA-Future 0.3.1 includes a workaround to avoid including fmt in device
|
||||||
@ -100,29 +106,22 @@ class DlaFuture(CMakePackage, CudaPackage, ROCmPackage):
|
|||||||
conflicts("+cuda", when="+rocm")
|
conflicts("+cuda", when="+rocm")
|
||||||
|
|
||||||
with when("+rocm"):
|
with when("+rocm"):
|
||||||
for val in ROCmPackage.amdgpu_targets:
|
for arch in ROCmPackage.amdgpu_targets:
|
||||||
depends_on("pika amdgpu_target={0}".format(val), when="amdgpu_target={0}".format(val))
|
depends_on(f"pika amdgpu_target={arch}", when=f"amdgpu_target={arch}")
|
||||||
depends_on(
|
depends_on(f"rocsolver amdgpu_target={arch}", when=f"amdgpu_target={arch}")
|
||||||
"rocsolver amdgpu_target={0}".format(val), when="amdgpu_target={0}".format(val)
|
depends_on(f"rocblas amdgpu_target={arch}", when=f"amdgpu_target={arch}")
|
||||||
)
|
depends_on(f"whip amdgpu_target={arch}", when=f"amdgpu_target={arch}")
|
||||||
depends_on(
|
depends_on(f"umpire amdgpu_target={arch}", when=f"amdgpu_target={arch}")
|
||||||
"rocblas amdgpu_target={0}".format(val), when="amdgpu_target={0}".format(val)
|
|
||||||
)
|
with when("@:0.3 +rocm"):
|
||||||
depends_on(
|
for arch in ROCmPackage.amdgpu_targets:
|
||||||
"rocprim amdgpu_target={0}".format(val), when="amdgpu_target={0}".format(val)
|
depends_on(f"rocprim amdgpu_target={arch}", when=f"amdgpu_target={arch}")
|
||||||
)
|
depends_on(f"rocthrust amdgpu_target={arch}", when=f"amdgpu_target={arch}")
|
||||||
depends_on(
|
|
||||||
"rocthrust amdgpu_target={0}".format(val), when="amdgpu_target={0}".format(val)
|
|
||||||
)
|
|
||||||
depends_on("whip amdgpu_target={0}".format(val), when="amdgpu_target={0}".format(val))
|
|
||||||
depends_on(
|
|
||||||
"umpire amdgpu_target={0}".format(val), when="amdgpu_target={0}".format(val)
|
|
||||||
)
|
|
||||||
|
|
||||||
with when("+cuda"):
|
with when("+cuda"):
|
||||||
for val in CudaPackage.cuda_arch_values:
|
for arch in CudaPackage.cuda_arch_values:
|
||||||
depends_on("pika cuda_arch={0}".format(val), when="cuda_arch={0}".format(val))
|
depends_on(f"pika cuda_arch={arch}", when=f"cuda_arch={arch}")
|
||||||
depends_on("umpire cuda_arch={0}".format(val), when="cuda_arch={0}".format(val))
|
depends_on(f"umpire cuda_arch={arch}", when=f"cuda_arch={arch}")
|
||||||
|
|
||||||
patch(
|
patch(
|
||||||
"https://github.com/eth-cscs/DLA-Future/pull/1063/commits/efc9c176a7a8c512b3f37d079dec8c25ac1b7389.patch?full_index=1",
|
"https://github.com/eth-cscs/DLA-Future/pull/1063/commits/efc9c176a7a8c512b3f37d079dec8c25ac1b7389.patch?full_index=1",
|
||||||
@ -137,29 +136,61 @@ def cmake_args(self):
|
|||||||
args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
|
args.append(self.define_from_variant("BUILD_SHARED_LIBS", "shared"))
|
||||||
|
|
||||||
# BLAS/LAPACK
|
# BLAS/LAPACK
|
||||||
if self.spec["lapack"].name in INTEL_MATH_LIBRARIES:
|
if spec["lapack"].name in INTEL_MATH_LIBRARIES:
|
||||||
|
mkl_provider = spec["lapack"].name
|
||||||
|
|
||||||
vmap = {
|
vmap = {
|
||||||
"none": "seq",
|
"intel-oneapi-mkl": {
|
||||||
"openmp": "omp",
|
"threading": {
|
||||||
"tbb": "tbb",
|
"none": "sequential",
|
||||||
} # Map MKL variants to LAPACK target name
|
"openmp": "gnu_thread",
|
||||||
mkl_threads = vmap[spec["intel-mkl"].variants["threads"].value]
|
"tbb": "tbb_thread",
|
||||||
# TODO: Generalise for intel-oneapi-mkl
|
},
|
||||||
|
"mpi": {"intel-mpi": "intelmpi", "mpich": "mpich", "openmpi": "openmpi"},
|
||||||
|
},
|
||||||
|
"intel-mkl": {
|
||||||
|
"threading": {"none": "seq", "openmp": "omp", "tbb": "tbb"},
|
||||||
|
"mpi": {"intel-mpi": "mpich", "mpich": "mpich", "openmpi": "ompi"},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
if mkl_provider not in vmap.keys():
|
||||||
|
raise RuntimeError(
|
||||||
|
f"dla-future does not support {mkl_provider} as lapack provider"
|
||||||
|
)
|
||||||
|
mkl_mapper = vmap[mkl_provider]
|
||||||
|
|
||||||
|
mkl_threads = mkl_mapper["threading"][spec[mkl_provider].variants["threads"].value]
|
||||||
|
if mkl_provider == "intel-oneapi-mkl":
|
||||||
args += [
|
args += [
|
||||||
self.define("DLAF_WITH_MKL", True),
|
self.define("DLAF_WITH_MKL", True),
|
||||||
|
self.define("MKL_INTERFACE", "lp64"),
|
||||||
|
self.define("MKL_THREADING", mkl_threads),
|
||||||
|
]
|
||||||
|
elif mkl_provider == "intel-mkl":
|
||||||
|
args += [
|
||||||
|
self.define("DLAF_WITH_MKL", True)
|
||||||
|
if spec.version <= Version("0.3")
|
||||||
|
else self.define("DLAF_WITH_MKL_LEGACY", True),
|
||||||
self.define("MKL_LAPACK_TARGET", f"mkl::mkl_intel_32bit_{mkl_threads}_dyn"),
|
self.define("MKL_LAPACK_TARGET", f"mkl::mkl_intel_32bit_{mkl_threads}_dyn"),
|
||||||
]
|
]
|
||||||
|
|
||||||
if "+scalapack" in spec:
|
if "+scalapack" in spec:
|
||||||
if (
|
try:
|
||||||
"^mpich" in spec
|
mpi_provider = spec["mpi"].name
|
||||||
or "^cray-mpich" in spec
|
if mpi_provider in ["mpich", "cray-mpich", "mvapich", "mvapich2"]:
|
||||||
or "^intel-mpi" in spec
|
mkl_mpi = mkl_mapper["mpi"]["mpich"]
|
||||||
or "^mvapich" in spec
|
else:
|
||||||
or "^mvapich2" in spec
|
mkl_mpi = mkl_mapper["mpi"][mpi_provider]
|
||||||
):
|
except KeyError:
|
||||||
mkl_mpi = "mpich"
|
raise RuntimeError(
|
||||||
elif "^openmpi" in spec:
|
f"dla-future does not support {spec['mpi'].name} as mpi provider with "
|
||||||
mkl_mpi = "ompi"
|
f"the selected scalapack provider {mkl_provider}"
|
||||||
|
)
|
||||||
|
|
||||||
|
if mkl_provider == "intel-oneapi-mkl":
|
||||||
|
args.append(self.define("MKL_MPI", mkl_mpi))
|
||||||
|
elif mkl_provider == "intel-mkl":
|
||||||
args.append(
|
args.append(
|
||||||
self.define(
|
self.define(
|
||||||
"MKL_SCALAPACK_TARGET",
|
"MKL_SCALAPACK_TARGET",
|
||||||
@ -183,12 +214,12 @@ def cmake_args(self):
|
|||||||
args.append(self.define_from_variant("DLAF_WITH_CUDA", "cuda"))
|
args.append(self.define_from_variant("DLAF_WITH_CUDA", "cuda"))
|
||||||
args.append(self.define_from_variant("DLAF_WITH_HIP", "rocm"))
|
args.append(self.define_from_variant("DLAF_WITH_HIP", "rocm"))
|
||||||
if "+rocm" in spec:
|
if "+rocm" in spec:
|
||||||
archs = self.spec.variants["amdgpu_target"].value
|
archs = spec.variants["amdgpu_target"].value
|
||||||
if "none" not in archs:
|
if "none" not in archs:
|
||||||
arch_str = ";".join(archs)
|
arch_str = ";".join(archs)
|
||||||
args.append(self.define("CMAKE_HIP_ARCHITECTURES", arch_str))
|
args.append(self.define("CMAKE_HIP_ARCHITECTURES", arch_str))
|
||||||
if "+cuda" in spec:
|
if "+cuda" in spec:
|
||||||
archs = self.spec.variants["cuda_arch"].value
|
archs = spec.variants["cuda_arch"].value
|
||||||
if "none" not in archs:
|
if "none" not in archs:
|
||||||
arch_str = ";".join(archs)
|
arch_str = ";".join(archs)
|
||||||
args.append(self.define("CMAKE_CUDA_ARCHITECTURES", arch_str))
|
args.append(self.define("CMAKE_CUDA_ARCHITECTURES", arch_str))
|
||||||
|
Loading…
Reference in New Issue
Block a user