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

scope_work_depth() analysis modifies original SDFG #1670

Open
Berke-Ates opened this issue Sep 30, 2024 · 2 comments
Open

scope_work_depth() analysis modifies original SDFG #1670

Berke-Ates opened this issue Sep 30, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Berke-Ates
Copy link
Contributor

Berke-Ates commented Sep 30, 2024

Describe the bug
Using scope_work_depth() on an SDFG with loops removes the backedges in the state machine.

To Reproduce
Steps to reproduce the behavior:

  1. Checkout DaCe (Commit Hash: 74a31cb)
  2. Execute the provided Python script with the sample SDFG in this source
  3. Inspect out.sdfg

Expected behavior
scope_work_depth() should not modify the passed SDFG.

Screenshots
image
The SDFG on the left is the sample SDFG and the SDFG on right has been analysed with scope_work_depth().

@tbennun
Copy link
Collaborator

tbennun commented Oct 1, 2024

@phschaad FYI

@phschaad
Copy link
Collaborator

phschaad commented Oct 2, 2024

It seems that the way the work-depth analysis for an SDFG was implemented, it is a destructive analysis (breaking loop cycles). I will indirectly fix this by transitioning the analysis into one that uses control flow lifting to perform the analysis on loop regions. This avoids the issue altogether. An intermediate quickfix is to create a deepcopy of the SDFG and performing analysis on that instead.

@phschaad phschaad added the bug Something isn't working label Oct 2, 2024
@phschaad phschaad moved this to 🏗 In progress in DaCe: Loops as First-Class-Citizens Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🏗 In progress
Development

No branches or pull requests

3 participants