Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legion: add redop_half variant, and add missing build dependency #44792

Merged
merged 3 commits into from
Jun 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions var/spack/repos/builtin/packages/legion/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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)
Expand Down