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

SDFG contains unnecessary intermediate transient #1382

Open
hodelcl opened this issue Oct 4, 2023 · 1 comment
Open

SDFG contains unnecessary intermediate transient #1382

hodelcl opened this issue Oct 4, 2023 · 1 comment

Comments

@hodelcl
Copy link
Contributor

hodelcl commented Oct 4, 2023

Describe the bug
SDFG contains unnecessary intermediate transient. Might be an issue with the Python frontend.

To Reproduce
Steps to reproduce the behavior:

  1. Run the following Python code:
import dace as dc

@dc.program
def example_sdfg(x: dc.float64[10], y: dc.float64[10]):
    x[0] += y[0]

sdfg = example_sdfg.to_sdfg()
sdfg.simplify()
sdfg.view()
  1. Investigate the produced SDFG (produces SDFG as seen in screenshot).

Expected behavior
I expect to get the same SDFG but without the transient __tmp0 AccessNode and the y[0] memlet flowing directly into the tasklet.

Screenshots
Screenshot of the produced SDFG:
Screenshot from 2023-10-04 12-20-34

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • DaCe version: 0.14.4 (current main branch)
  • Python version: 3.8
@alexnick83
Copy link
Contributor

My suggestion would be to debug the ArrayElimination pass with your example and see why RedundantSecondArray doesn't apply on y -> __tmp0. Then, we can discuss if the conditions are too conservative or if there are good reasons/concerns for the current behavior.

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

No branches or pull requests

2 participants