Skip to content

Conversation

@affifboudaoud
Copy link
Collaborator

The _is_data_accessed_downstream() function was missing visited node tracking in its graph traversal. Even though the dataflow graph is acyclic, the same node can be reached via multiple paths, causing it to be processed exponentially many times. For example, in a diamond-shaped graph A → B,C → D, node D gets visited twice (once via B, once via C). When multiple diamonds are chained together, the visits compound multiplicatively: if D feeds into another diamond D → E,F → G, then G is visited 4 times (2 paths to D × 2 paths from D). With n such diamonds in sequence, the final node gets visited 2^n times. I added a visited set to make sure each node is only processed once. This reduces map fusion time from 26+ minutes to seconds on a large test SDFGs.

Copy link
Collaborator

@philip-paul-mueller philip-paul-mueller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Thanks for the fix.

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.

3 participants