Open philip-paul-mueller opened 4 days ago
other_subset
deserves at least a detailed doc-string at this point, in my opinion.try_initialize()
?
I've been trying to see when _is_data_src
field is None
when calling src_subset
and dst_subset
. So far, the only time that happens when two memlets are compared with ==
or !=
in newast.py
or propagation.py
etc. files that work with partly initialized graph anyway (because they are building it).
Turns out they could just just be compared with is
and is not
--- as far as I can tell, the tests do not fail that way. But that is an entirely different comparison.
Memlets have two subset properties
subset
andother_subset
. Whilesubset
always refers to the data container thedata
attribute of the Memlet is pointing to,other_subset
is option (it is also not super clear to me whatNone
in this case means) and describes to "other" side of the connection. However,subset
does not necessarily describes the subset at the source of the connection nor the subset at the destination. For this the propertiessrc_subset
anddst_subset
are provided, that takes the direction into account. However, this information is sometimes outdated and to overcome ittry_initialize()
of the Memlet must be called. In addition there are alsoget_{src, dst}_subset()
which first calltry_initialize()
.In order to make PR#1678 work, we had to call
try_initialize()
on all edges in the state, which is a very expensive operation.