Remove InplaceVariables and the problems they cause
Created by: jmitrevs
This attempts to fix the problem that removing nodes can cause to InplaceVariable
s by removing InplaceVariable
s altogether. These variables are only used for the Reshape
layar. In io_stream
we already replace Reshape
nodes with Repack
nodes; this pull request additionally removes those nodes in io_parallel
(and flatten), changing the shape of the preceding variable. (We may want to rename the ReshapeStream
optimizer pass to reflect on the additional duties it performs.)
I added a basic test, though it does not test the flatten case.
@vloncar, is this the direction we should go?