-
Notifications
You must be signed in to change notification settings - Fork 133
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 read_and_write_sets() for ControlFlowRegion #1920
Conversation
dace/sdfg/sdfg.py
Outdated
for edge in self.all_interstate_edges(): | ||
read_set |= edge.data.free_symbols & array_names | ||
|
||
# By definition, data that is referenced by the conditions (branching condition, |
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 comment appears copied from somewhere else, does this really apply here?
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 think it does. We are removing from single_use_data
the symbols used by condition expressions in control flow regions.
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.
But what is single_use_data
here, in this context? It appears that all we are doing here - based on the code - is adding symbols used on control flow region's meta accesses (conditions, loop increments, etc.) to the read_set
of the 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.
Now I get it, the misleading information is "single use data". I will change the code comment.
Co-authored-by: Philip Mueller <[email protected]>
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.
Thank you, LGTM!
The
PruneConnectors
transformation relies onread_and_write_sets()
to identify connectors on a nested SDFG that refer to unused data containers. With the introduction ofControlFlowRegion
nodes, the data containers can now be accessed by symbolic expressions used as conditions in such nodes. This case was not considered in baseline.