summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pokorny <mpokorny@caltech.edu>2024-06-25 01:33:54 -0600
committerGitHub <noreply@github.com>2024-06-25 01:33:54 -0600
commit99e3fdb18076cb51eefc51084ce93006ec849933 (patch)
tree62a086673e5720e29c8d280cb4d10a0bee6e3f3c
parent64cfdc07cbfaa7c86d65b5b9194bbd85a7cba00d (diff)
downloadspack-99e3fdb18076cb51eefc51084ce93006ec849933.tar.gz
spack-99e3fdb18076cb51eefc51084ce93006ec849933.tar.bz2
spack-99e3fdb18076cb51eefc51084ce93006ec849933.tar.xz
spack-99e3fdb18076cb51eefc51084ce93006ec849933.zip
Legion: add redop_half variant, and add missing build dependency (#44792)
* legion: add redop_half variant * legion: conditionally add py-setuptools as build dependency Dependency exists only for '+python' variant.
-rw-r--r--var/spack/repos/builtin/packages/legion/package.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/legion/package.py b/var/spack/repos/builtin/packages/legion/package.py
index 80ad9e6a31..b924c88434 100644
--- a/var/spack/repos/builtin/packages/legion/package.py
+++ b/var/spack/repos/builtin/packages/legion/package.py
@@ -121,6 +121,7 @@ class Legion(CMakePackage, ROCmPackage):
depends_on("py-cffi", when="+python")
depends_on("py-numpy", when="+python")
depends_on("py-pip", when="+python", type="build")
+ depends_on("py-setuptools", when="+python", type="build")
depends_on("papi", when="+papi")
depends_on("zlib-api", when="+zlib")
@@ -267,6 +268,12 @@ class Legion(CMakePackage, ROCmPackage):
variant(
"redop_complex", default=False, description="Use reduction operators for complex types."
)
+ requires("+redop_complex", when="+bindings")
+ variant(
+ "redop_half",
+ default=False,
+ description="Use reduction operators for half precision types.",
+ )
variant(
"max_dims",
@@ -415,10 +422,14 @@ class Legion(CMakePackage, ROCmPackage):
# default is off.
options.append("-DLegion_BUILD_BINDINGS=ON")
- if spec.satisfies("+redop_complex") or spec.satisfies("+bindings"):
- # default is off; required for bindings.
+ if spec.satisfies("+redop_complex"):
+ # default is off
options.append("-DLegion_REDOP_COMPLEX=ON")
+ if spec.satisfies("+redop_half"):
+ # default is off
+ options.append("-DLegion_REDOP_HALF=ON")
+
maxdims = int(spec.variants["max_dims"].value)
# TODO: sanity check if maxdims < 0 || > 9???
options.append("-DLegion_MAX_DIM=%d" % maxdims)