-
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][dace]: Support for sparse fields and reductions over lift expressions #1377
Conversation
src/gt4py/next/program_processors/runners/dace_iterator/itir_to_tasklet.py
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_iterator/itir_to_tasklet.py
Outdated
Show resolved
Hide resolved
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.
This is my first one. Further, I have one or two off topic questions, things that just pop up in my mind and would like to ask.
src/gt4py/next/program_processors/runners/dace_iterator/itir_to_tasklet.py
Outdated
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_iterator/itir_to_tasklet.py
Outdated
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_iterator/itir_to_tasklet.py
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_iterator/itir_to_tasklet.py
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_iterator/itir_to_tasklet.py
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_iterator/itir_to_tasklet.py
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_iterator/itir_to_tasklet.py
Outdated
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_iterator/itir_to_tasklet.py
Show resolved
Hide resolved
src/gt4py/next/program_processors/runners/dace_iterator/itir_to_tasklet.py
Outdated
Show resolved
Hide resolved
@philip-paul-mueller Thank you for the review, I have tried to address your comments. Please check again. |
dace.symbol(unique_var_name() + "__shp", dace.int64), | ||
dace.symbol(unique_var_name() + "__shp", dace.int64), | ||
) | ||
strides = ( | ||
dace.symbol(unique_var_name() + "__strd", dace.int64), | ||
dace.symbol(unique_var_name() + "__strd", dace.int64), |
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.
In the add_storage
function we also create such variables, but we name them shape
and stride
.
We should use the same words in both functions. However, since they were part of #1379 I will change them there.
Description
This PR adds support to DaCe backend for sparse fields and reductions over lift expressions.
The DaCe backend is configured with full-inlining of lifts in ITIR. An additional option is enabled, in combination with reduce-unroll, to fully inline lambda-like arguments. This option is required because the ITIR visitor in the DaCe backend is not able to translate reductions over lift expressions.
The inlined ITIR could contain the
list_get
operator. This PR adds translation capability for thelist_get
operator.In icon4py stencils,
list_get
is proceeded by thederef
operator, in order to extract a 1D slice out of a multi-dimensional field. Baseline only supportedderef
operator on full-domain index, that returns a scalar value. When thederef
indexing is partial,deref
will return a 1D or ND slice from the original field, and the return type should be array. Therefore, this PR also adds support forderef
with array return.Requirements