You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where a is copied into t then into p and finally into b.
One would expect that simplify (RedundantArrayRemoval in particular) could remove these copies.
However, this is only the case if t and p have the same storage type, since those are transients, one should expect that DaCe would do this.
However, if p is a register, as it is below in the code, then p is maintained.
Furthermore, we the subsets would be changed to 0:80 for example, then it would also not work.
import dace
sdfg = dace.SDFG("test")
state = sdfg.add_state(is_start_block=True)
sdfg.add_array(
"a",
shape=(100,),
transient=False,
dtype=dace.float64,
)
sdfg.add_array(
"t",
shape=(100,),
transient=True,
dtype=dace.float64,
)
sdfg.add_array(
"p",
shape=(100,),
transient=True,
dtype=dace.float64,
# If `p` is a register, it can not be optimized away
# but if it is, then it can be removed.
storage=dace.StorageType.Register,
)
sdfg.add_array(
"b",
shape=(100,),
transient=False,
dtype=dace.float64,
)
a, t, p, b = (state.add_access(n) for n in "atpb")
state.add_nedge(
a,
t,
dace.Memlet("a[0:100] -> [0:100]"),
)
state.add_nedge(
t,
p,
dace.Memlet("t[0:100] -> [0:100]"),
)
state.add_nedge(
p,
b,
dace.Memlet("p[0:100] -> [0:100]"),
)
sdfg.validate()
sdfg.simplify()
sdfg.validate()
The text was updated successfully, but these errors were encountered:
Consider the following SDFG
where
a
is copied intot
then intop
and finally intob
.One would expect that simplify (
RedundantArrayRemoval
in particular) could remove these copies.However, this is only the case if
t
andp
have the same storage type, since those are transients, one should expect that DaCe would do this.However, if
p
is a register, as it is below in the code, thenp
is maintained.Furthermore, we the subsets would be changed to
0:80
for example, then it would also not work.The text was updated successfully, but these errors were encountered: