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.
This commit is contained in:
parent
64cfdc07cb
commit
99e3fdb180
@ -121,6 +121,7 @@ def patch(self):
|
||||
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 @@ def validate_gasnet_root(value):
|
||||
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 @@ def cmake_args(self):
|
||||
# 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)
|
||||
|
Loading…
Reference in New Issue
Block a user