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[next]: DaCe backend - symbol propagation in lambda scope #1367

Merged
merged 9 commits into from
Nov 28, 2023

Conversation

edopao
Copy link
Contributor

@edopao edopao commented Nov 20, 2023

Description

Full-inling of ITIR lift operator can result in nested lambda calls, which are translated to nested SDFGs in DaCe backend. The problem was that inner lambda SDFGs were not inheriting the symbols in scope from the parent tasklet, instead the DaCe backend was only mapping the lambda arguments.
The solution implemented in this PR is to run a pre-pass to discover all symbols used in the nested lambdas, and propagate the required data containers from outer to inner scope.

The legacy visit_SymRef function is also cleaned up. In baseline code, it was supposed to create access nodes whenever a symbol was used. With this PR, this operation is delegated to the pre-pass.

This PR also contains some cleanup of the scan visitor. The overall goal is to rely as much as possible on visit_FunCall to generate the scan body.

@edopao edopao marked this pull request as ready for review November 21, 2023 12:36
@edopao edopao requested a review from petiaccja November 21, 2023 12:36
@edopao edopao merged commit 5a912cf into GridTools:main Nov 28, 2023
@edopao edopao deleted the dace-scope_symbols branch November 28, 2023 11:52
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.

2 participants