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
Join has a view flag that allows it to work inplace in one of the inputs if all the remaining ones have length 0 (are empty) along the axis. This happens at eval time, but pytensor needs to know the candidate input in advance with the view flag.
The only place where this is used is in scan_checkpoints:
Funnily enough that code branch is completely broken, the code was never tested apparently. See a fix in: #754
Unlike theano, we have more static shapes than 1/None, so I suggest we get rid of this flag. We can have a rewrite that removes inputs with shape 0 along the axis from Join, and if all are removed the join is useless and can be discarded. This inplace is just a runtime version of this optimization.
The text was updated successfully, but these errors were encountered:
Description
Join has a view flag that allows it to work inplace in one of the inputs if all the remaining ones have length 0 (are empty) along the axis. This happens at eval time, but pytensor needs to know the candidate input in advance with the view flag.
The only place where this is used is in
scan_checkpoints
:pytensor/pytensor/scan/checkpoints.py
Line 131 in b79d232
Funnily enough that code branch is completely broken, the code was never tested apparently. See a fix in: #754
Unlike theano, we have more static shapes than 1/None, so I suggest we get rid of this flag. We can have a rewrite that removes inputs with shape 0 along the axis from Join, and if all are removed the join is useless and can be discarded. This inplace is just a runtime version of this optimization.
The text was updated successfully, but these errors were encountered: