Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#727 21 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Domain
data

Research direction

The issue names no files, tests, or entry points. Start by reviewing the array API standard and comparing the proposed batched_matmul, batched tensordot, and einsum approaches; done means selecting and specifying a supported operation rather than leaving multiple alternatives open.

Written by the indexing model from the issue text.

Description

Needs Discussion RFC topic: Linear Algebra

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
Dominant language
Python
Stars
281
Forks
52
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from data-apis/array-api

All issues in data-apis/array-api

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.