Skip to content

Do we need dot Op to handle the vector cases? #946

Open
@ricardoV94

Description

@ricardoV94

Description

A matrix vector dot or a vector dot matrix can be represented as a matrix - col/row dot followed by a squeeze of the useless dims.

I don't think we're making any special use of of the vector cases and it creates more versions of equivalent graphs for us to handle. For instance we have a special blockwise for the matrix matrix dot but not the other cases. We wouldn't need to if our core dot Op only did matrix matrix.

We already do this rewrite anyway here, so why not use that as the canonical representation?

def local_dot_to_dot22(fgraph, node):

Only reason I can see is if different routines wil be triggered for the special vector cases? I would be surprised if our backends didn't have special handling though :)

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