stree: consider read-after-write when calculating input_memlets of tree nodes#2419
Open
romanc wants to merge 2 commits into
Open
stree: consider read-after-write when calculating input_memlets of tree nodes#2419romanc wants to merge 2 commits into
romanc wants to merge 2 commits into
Conversation
Every tree node has functions to calculate input and output memlets (of that node). Tree scopes have a default implementation to gather all inputs/outputs of their children. That default implementation for scopes didn't consider read after write (within the same scope). This caused "too many inputs" to be returned, which - in turn - caused the dependency analysis of the state boundary inserter to generate wrong results. This could lead to **missing** state boundaries. We saw write/write races in D2A2C_Vect of pyFV3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Every tree node has functions to calculate input and output memlets of that node. Tree scopes have a default implementation to gather all inputs/outputs of their children. That default implementation for scopes didn't consider read after write (within the same scope). This caused "too many inputs" to be returned, which - in turn - caused the dependency analysis of the state boundary inserter to generate wrong results, which - in the end - generated wrong SDFGs from a given schedule tree.
This PR changes the default implementation of
_gather_memlets_in_scope()to account for read-after-write memlets and adds a test.This PR is part of a series of commits to bring back the fixes from the June push (i.e. #2364) into
mainas clean commits with test cases.