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

feat[next]: Support for direct field operator call with domain arg #1779

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tehrengruber
Copy link
Contributor

@tehrengruber tehrengruber commented Dec 10, 2024

Adds support for directly calling a field operator with a domain argument, which was previously only supported inside of a program. Many field operators in icon4py use the domain argument resulting in excessive amounts of boilerplate programs that can be removed now.

@field_operator
def testee(inp: IField) -> IField:
    return inp

testee(inp, domain={IDim: (0, 10)})

Depends on #1780 (merged into this PR).

)
return tuple(rewritten_args), tuple(size_args), kwargs


def _field_constituents_shape_and_dims(
def _field_constituents_range_and_dims(
Copy link
Contributor Author

@tehrengruber tehrengruber Dec 10, 2024

Choose a reason for hiding this comment

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

This part of the code-base is in an extremely poor state, let's not prettify a blobfish and invest time on improving this here.

Copy link
Contributor

@havogt havogt left a comment

Choose a reason for hiding this comment

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

Please split into 2 PRs.

@tehrengruber tehrengruber marked this pull request as draft December 10, 2024 23:22
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