Skip to content

operator* for Tensor of Tensors (ToT) #282

@ryanmrichard

Description

@ryanmrichard

Presently multiplying ToT requires calling einsum. Unfortunately that makes it hard to write generic functions. I originally added einsum because I couldn't figure out how to get ToT multiplication to slide into the existing expression layer. I haven't prototyped it, but maybe you have a ToTMultiplication class which is returned when either tensor is a tot (you can deduce if either side of operator* is a ToT based on the tile types). It could then call einsum when it is assigned to a TsrExpr. The reason I'm thinking a new class is because the left and right sides of the expression generating the ToTMultiplication instance would have to just be annotated tensors, and you would have to immediately assign it to a TsrExpr (so it doesn't fully participate in the expression layer).

This could be somewhat related to #224 in that with general tensor contractions you may also be restricting non-ToT multiplications in a similar manner.

If the above plan sounds reasonable I could try taking a stab at this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions