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

Fix nested access with nested symbol dependency #1239

Merged
merged 6 commits into from Apr 14, 2023

Conversation

alexnick83
Copy link
Contributor

In the Python frontend, when accessing an array from a higher-level scope, we try to "squeeze" the access to begin from index 0 while propagating the correct offset to the edge connecting the outer data to the nested scope (NestedSDFG). To achieve this, any access utilizing a symbol k that is local to the nested scope with an access method f(k) is altered to f(k) - f(min(range(k)) so that it starts from index 0, while the offset f(min(range(k)) is propagated to the outer edge.

However, issues arise when the symbol k range depends on other symbols local to the nested scope. In those cases, the symbols have to be altered/replaced recursively so that no local symbol remains in the offset; otherwise, it is impossible to propagate it to the outer edge, which then starts from index 0, leading to erroneous accesses in the nested scope.

This PR solves the above issue by simply skipping the elaborate and strict squeezing of the local-symbol-dependent sub-ranges when meeting such cases.

@alexnick83 alexnick83 requested a review from tbennun April 13, 2023 14:23
@alexnick83 alexnick83 merged commit d944bb5 into master Apr 14, 2023
9 checks passed
@alexnick83 alexnick83 deleted the fix-nested-access-with-nested-symbol-dependency branch April 14, 2023 21:16
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.

None yet

2 participants