Dear Rafael,
I thought more about reshape operators (and their kind), what if ...
if an operator's output has the same size as its first input and this input is only used by this single node (the one we investigate here), we assume that this operator can be done in-place and extend the lifetime of the tensor in the planning stage to the lifetime of the output tensor.
I don't know whether this saves memory, but it will for sure make some operations more cache friendly (and enable reshape to be a no-op under the right conditions).
What do you think?
(should we use a list of invalid operators or a list of valid operators, the default being the other case)
Dear Rafael,
I thought more about reshape operators (and their kind), what if ...
if an operator's output has the same size as its first input and this input is only used by this single node (the one we investigate here), we assume that this operator can be done in-place and extend the lifetime of the tensor in the planning stage to the lifetime of the output tensor.
I don't know whether this saves memory, but it will for sure make some operations more cache friendly (and enable reshape to be a no-op under the right conditions).
What do you think?
(should we use a list of invalid operators or a list of valid operators, the default being the other case)