-
Notifications
You must be signed in to change notification settings - Fork 53
feat[dace][next]: Using the canonicalize_memlet_trees() function
#2351
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[dace][next]: Using the canonicalize_memlet_trees() function
#2351
Conversation
| # into the split transformation. | ||
| # TODO(phimuell): Implement a data cleaner. | ||
| dace_sdutils.canonicalize_memlet_trees(sdfg) | ||
| dace_propagation.propagate_memlets_sdfg(sdfg) |
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.
Would it be useful to have 2 gt4py wrapper functions?
gt_propagate_memlet_sdfg()that also callscanonicalize_memlet_trees(sdfg)gt_propagate_memlet_map()that also callscanonicalize_memlet_trees_for_scope(map_entry / map_exit)
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.
I am not fully sure, as we only call canonicalize_memlet_trees() (which seems to have a bug) to fix some other things and in the long run the only reason where it is called is in front of dace simplify or other (known) DaCe transformation.
So I am not sure if it makes sense in the long run.
However I agree that there should be a function that runs the thing for entry and exit but this should life in dace.
I will do a PR tomorrow.
Rather, made some botherline legal behaviour more explicit.
Also removed the reference to `dace_iterator`, which no longer exists from the `pyproject.toml` file.
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.
LGTM
|
Correctness can be seen here: C2SM/icon4py#928 |
|
I am currently running a performance regression test, but it will take some time until it got through. |
|
Performance is okay, but we have an issue in the ICON4Py CI. |

Especially older DaCe transformations have trouble handling non standard Memlets. i.e. they expect a particular assignment of
Memlet.dataandMemlet.subset, among them is Memlet propagation.The recently introduced helper function
canonicalize_memlet_trees()allows to transform the SDFG in such a way that it conforms to this format.This PR introduces calls to this function at particular locations, mostly before Memlet propagation happens.
TODO: