Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of join view flag #753

Open
ricardoV94 opened this issue May 7, 2024 · 0 comments
Open

Get rid of join view flag #753

ricardoV94 opened this issue May 7, 2024 · 0 comments

Comments

@ricardoV94
Copy link
Member

ricardoV94 commented May 7, 2024

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:

join = Join(view=0)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant