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

Add map split transformation #1654

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add map split transformation #1654

wants to merge 3 commits into from

Conversation

luigifusco
Copy link
Contributor

I don't like the name too much, maybe someone has a better idea.

This transformation covers some cases found in climate codes where the range of a nested map changes on the first and/or the last iteration of an outer map. The resulting SDFG has a map with a nested sdfg, where multiple states are needed to calculate the correct inner range, preventing map collapse.

The transformation will look for such a pattern and split the map accordingly, in order to simplify the nested SDFG that can be later inlined after simplification (atm covering only a simple equality when detecting the condition, and peeling only one iteration).

Note that due to a bug, the resulting SDFG is wrong. The python-frontend-dealias-integration solves the bug.

example before:
image

after:
image

after simplify:
image

@tbennun tbennun removed their request for review September 15, 2024 21:42
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.

1 participant