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
#121 disables the inplacing of Elemwise Composite Ops to cases with more than one output, as the InplaceElemwiseOptimizer was otherwise faulty for Composites that have nested outputs
One simple solution for multiple outputs, is to only allow in-placing from the last toposorted output. Otherwise, if we want to support multiple inplacing we can try something fancier by introspecting the inner graph.
Currently there is no good utility we can reuse. IIRC PyTensor usually attempts brute-force inplacing rewrite and backtracks when that would invalidate the graph. That approach doesn't sound great, so I suggest we try something else.
The text was updated successfully, but these errors were encountered:
ricardoV94
changed the title
Implement specialized inplace rewriter for Composite Ops
Implement specialized inplace rewriter for Elemwise Composite Ops
Dec 16, 2022
Description
#121 disables the inplacing of Elemwise Composite Ops to cases with more than one output, as the InplaceElemwiseOptimizer was otherwise faulty for Composites that have nested outputs
https://github.com/ricardoV94/pytensor/blob/da357175b8026be14f3d5cf329f4572b5e0349cb/pytensor/tensor/rewriting/elemwise.py#L33
One simple solution for multiple outputs, is to only allow in-placing from the last toposorted output. Otherwise, if we want to support multiple inplacing we can try something fancier by introspecting the inner graph.
Currently there is no good utility we can reuse. IIRC PyTensor usually attempts brute-force inplacing rewrite and backtracks when that would invalidate the graph. That approach doesn't sound great, so I suggest we try something else.
The text was updated successfully, but these errors were encountered: