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

refactor[next]: itir embedded: cleaner closure run #1521

Merged
merged 7 commits into from
Apr 15, 2024

Conversation

havogt
Copy link
Contributor

@havogt havogt commented Apr 4, 2024

This enables to run the closure also outside of the fendef context, e.g. from field view embedded.

@havogt havogt requested a review from egparedes April 4, 2024 15:47
Copy link
Contributor

@egparedes egparedes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. My only concern is about improving the documentation and usage of the new_context() function.

src/gt4py/next/embedded/context.py Outdated Show resolved Hide resolved
src/gt4py/next/iterator/embedded.py Outdated Show resolved Hide resolved
src/gt4py/next/iterator/embedded.py Outdated Show resolved Hide resolved
@@ -62,4 +60,4 @@ def ctx_updater(*args: tuple[cvars.ContextVar[Any], Any]) -> None:


def within_context() -> bool:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rename it to something like within_valid_context() and add a docstring to this function also.

src/gt4py/next/iterator/embedded.py Show resolved Hide resolved
Copy link
Contributor

@egparedes egparedes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ILGTM.

@havogt havogt merged commit d5d59d2 into GridTools:main Apr 15, 2024
31 checks passed
@havogt havogt deleted the refactor_itir_embedded branch April 15, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants