dace
dace copied to clipboard
SDFG contains unnecessary intermediate transient
Describe the bug SDFG contains unnecessary intermediate transient. Might be an issue with the Python frontend.
To Reproduce Steps to reproduce the behavior:
- 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()
- 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:
Desktop (please complete the following information):
- OS: Ubuntu 20.04
- DaCe version: 0.14.4 (current main branch)
- Python version: 3.8
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.