Skip to content

Get rid of join view flag #753

Open
@ricardoV94

Description

@ricardoV94

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions