Skip to content

RFC: add support for batched matmul / einsum / batched tensordot #727

Open
@arogozhnikov

Description

@arogozhnikov

Currently I don't see a way to implement einsum or batched matmul using the standard. There is a way with explicit loop, but that does not count.

Some ways this can be addressed:

  • minimal implementation would include batched_matmul (signature bij, bjk -> bik). Other operations can be reduced to it with reshapes. This may include additional copies
  • modification of tensordot to include batched dimensions thus should be more efficient, but AFAIK this method is not surfaced in any major framework
  • include einsum in the standard

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs DiscussionNeeds further discussion.RFCRequest for comments. Feature requests and proposed changes.topic: Linear AlgebraLinear algebra.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions