diff options
author | Mikael Simberg <simberg@cscs.ch> | 2022-09-12 16:54:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-12 16:54:17 +0200 |
commit | daf691fd0772ea55d3c3e1f8e30d8f0c6e9cb483 (patch) | |
tree | 624bb287a083c3f7d864f05e91b6668b8b6aa3d0 | |
parent | 3ff63b06bfcc937b38190bd866e75a2955313dfc (diff) | |
download | spack-daf691fd0772ea55d3c3e1f8e30d8f0c6e9cb483.tar.gz spack-daf691fd0772ea55d3c3e1f8e30d8f0c6e9cb483.tar.bz2 spack-daf691fd0772ea55d3c3e1f8e30d8f0c6e9cb483.tar.xz spack-daf691fd0772ea55d3c3e1f8e30d8f0c6e9cb483.zip |
whip: add new package (#32576)
-rw-r--r-- | var/spack/repos/builtin/packages/whip/package.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/whip/package.py b/var/spack/repos/builtin/packages/whip/package.py new file mode 100644 index 0000000000..f23b1af9a9 --- /dev/null +++ b/var/spack/repos/builtin/packages/whip/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +from spack.package import * + + +class Whip(CMakePackage, CudaPackage, ROCmPackage): + """whip is a small C++ abstraction layer for CUDA and HIP.""" + + homepage = "https://github.com/eth-cscs/whip/" + url = "https://github.com/eth-cscs/whip/archive/0.0.0.tar.gz" + git = "https://github.com/eth-cscs/whip.git" + maintainers = ["msimberg", "rasolca"] + + version("main", branch="main") + + depends_on("cmake@3.22:", type="build") + + # Exactly one of +cuda and +rocm need to be set + conflicts("~cuda ~rocm") + conflicts("+cuda +rocm") + + def cmake_args(self): + if self.spec.satisfies("+cuda"): + return [self.define("WHIP_BACKEND", "CUDA")] + else: + return [self.define("WHIP_BACKEND", "HIP")] |