hpx-kokkos: add 0.4.0 and other minor changes (#39723)
* Add hpx-kokkos 0.4.0 * Make git global package property in hpx-kokkos instead of having it version-specific * Add variant for choosing future type in hpx-kokkos * Add support for testing hpx-kokkos
This commit is contained in:
parent
566754440f
commit
cfdf19ed6b
@ -3,6 +3,8 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
import llnl.util.filesystem as fs
|
||||||
|
|
||||||
from spack.package import *
|
from spack.package import *
|
||||||
|
|
||||||
|
|
||||||
@ -11,9 +13,11 @@ class HpxKokkos(CMakePackage, CudaPackage, ROCmPackage):
|
|||||||
|
|
||||||
homepage = "https://github.com/STEllAR-GROUP/hpx-kokkos"
|
homepage = "https://github.com/STEllAR-GROUP/hpx-kokkos"
|
||||||
url = "https://github.com/STEllAR-GROUP/hpx-kokkos/archive/0.0.0.tar.gz"
|
url = "https://github.com/STEllAR-GROUP/hpx-kokkos/archive/0.0.0.tar.gz"
|
||||||
|
git = "https://github.com/STEllAR-GROUP/hpx-kokkos.git"
|
||||||
maintainers("G-071", "msimberg")
|
maintainers("G-071", "msimberg")
|
||||||
|
|
||||||
version("master", git="https://github.com/STEllAR-GROUP/hpx-kokkos.git", branch="master")
|
version("master", branch="master")
|
||||||
|
version("0.4.0", sha256="dafef55521cf4bf7ab28ebad546ea1d3fb83fac3a9932e292db4ab3666cd833f")
|
||||||
version("0.3.0", sha256="83c1d11dab95552ad0abdae767c71f757811d7b51d82bd231653dc942e89a45d")
|
version("0.3.0", sha256="83c1d11dab95552ad0abdae767c71f757811d7b51d82bd231653dc942e89a45d")
|
||||||
version("0.2.0", sha256="289b711cea26afe80be002fc521234c9194cd0e8f69863f3b08b654674dbe5d5")
|
version("0.2.0", sha256="289b711cea26afe80be002fc521234c9194cd0e8f69863f3b08b654674dbe5d5")
|
||||||
version("0.1.0", sha256="24edb817d0969f4aea1b68eab4984c2ea9a58f4760a9b8395e20f85b178f0850")
|
version("0.1.0", sha256="24edb817d0969f4aea1b68eab4984c2ea9a58f4760a9b8395e20f85b178f0850")
|
||||||
@ -26,6 +30,14 @@ class HpxKokkos(CMakePackage, CudaPackage, ROCmPackage):
|
|||||||
description="Use the specified C++ standard when building.",
|
description="Use the specified C++ standard when building.",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
future_types_map = {"polling": "event", "callback": "callback"}
|
||||||
|
variant(
|
||||||
|
"future_type",
|
||||||
|
default="polling",
|
||||||
|
values=future_types_map.keys(),
|
||||||
|
description="Integration type for GPU futures",
|
||||||
|
)
|
||||||
|
|
||||||
depends_on("cmake@3.19:", type="build")
|
depends_on("cmake@3.19:", type="build")
|
||||||
|
|
||||||
depends_on("hpx")
|
depends_on("hpx")
|
||||||
@ -52,3 +64,29 @@ class HpxKokkos(CMakePackage, CudaPackage, ROCmPackage):
|
|||||||
|
|
||||||
depends_on("hpx +rocm", when="+rocm")
|
depends_on("hpx +rocm", when="+rocm")
|
||||||
depends_on("kokkos +rocm", when="+rocm")
|
depends_on("kokkos +rocm", when="+rocm")
|
||||||
|
|
||||||
|
def cmake_args(self):
|
||||||
|
spec, args = self.spec, []
|
||||||
|
|
||||||
|
args += [
|
||||||
|
self.define(
|
||||||
|
"HPX_KOKKOS_CUDA_FUTURE_TYPE",
|
||||||
|
self.future_types_map[spec.variants["future_type"].value],
|
||||||
|
),
|
||||||
|
self.define("HPX_KOKKOS_ENABLE_TESTS", self.run_tests),
|
||||||
|
self.define("HPX_KOKKOS_ENABLE_BENCHMARKS", self.run_tests),
|
||||||
|
]
|
||||||
|
|
||||||
|
if "+rocm" in self.spec:
|
||||||
|
args += [self.define("CMAKE_CXX_COMPILER", self.spec["hip"].hipcc)]
|
||||||
|
|
||||||
|
return args
|
||||||
|
|
||||||
|
build_directory = "spack-build"
|
||||||
|
|
||||||
|
def check(self):
|
||||||
|
if self.run_tests:
|
||||||
|
with fs.working_dir(self.build_directory):
|
||||||
|
cmake("--build", ".", "--target", "tests")
|
||||||
|
cmake("--build", ".", "--target", "benchmarks")
|
||||||
|
ctest("--output-on-failure")
|
||||||
|
Loading…
Reference in New Issue
Block a user