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

Merged

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)})

Support in the dace backend is missing and will be added in a seperate 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
@havogt
Copy link
Contributor

havogt commented Jan 15, 2025

Is #1780 required for this to work, I still don't understand that part...

@tehrengruber tehrengruber marked this pull request as ready for review January 17, 2025 01:12
@tehrengruber tehrengruber merged commit 517e1e9 into GridTools:main Jan 18, 2025
21 checks passed
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.

3 participants