-
Notifications
You must be signed in to change notification settings - Fork 49
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]: itir.embedded support for Lists in output #1703
base: main
Are you sure you want to change the base?
Conversation
@@ -116,7 +116,31 @@ def visit_FieldOperator( | |||
def visit_ScanOperator( | |||
self, node: foast.ScanOperator, **kwargs: Any | |||
) -> itir.FunctionDefinition: | |||
raise NotImplementedError("TODO") | |||
# note: we don't need the axis here as this is handled by the program |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copied from itir
@@ -920,9 +936,9 @@ def deref(self) -> Any: | |||
return _make_tuple(self.field, position, column_axis=self.column_axis) | |||
|
|||
|
|||
def _get_sparse_dimensions(axes: Sequence[common.Dimension]) -> list[Tag]: | |||
def _get_sparse_dimensions(axes: Sequence[common.Dimension]) -> list[common.Dimension]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a cleanup
ready for a first round of review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed I skipped over the details of the embedded implementation.
@@ -0,0 +1,95 @@ | |||
# GT4Py - GridTools Framework |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a skipped test for the case we don't support yet makes sense: if(..., const_list_val, list_val)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Lists returned from an
as_fieldop
ed stencil will be turned into a local dimension of the the resulting field.In case of a
make_const_list
, a magic local dimension_CONST_DIM
is used. This is a hack, but localized toitir.embedded
. A clean implementation will probably involve to tag themake_const_list
with the neighborhood it is meant to be used with.