ROCm / ROCm/AMDMIGraphX

Generate broadcast for matrix multiplication where one of the matrix is filled with ones

Open
#4,166 1 comment 0 reactions 2 assignees View on GitHub

@shivadbhavsar is already working on this.

Since Jul 24, 2025.

Perf Improve
Dominant language
C++
Stars
333
Forks
150
Avg merge
4d 19h
Merged PRs (30d)
54

Description

DOR (Definition of Ready)

Ready, no blockers

Description

Let's say i have gemm C = A * B

where A is of shape [B, M, 1]. A is filled with ones.

Let's say B is of shape [B, 1, N].

in this case C would be of shape [B, M, N] .

Because A is filled with ones, C would actually just be broadcasted B.

C = broadcast(B) to shape [B, M, N]

This could be useful transformation for seqLenKV=1 in attention. It is unusual case but in general this transformation can be useful for further graph simplifications.

DOD (Definition of Done)

Unittests are added
Show perf improvement

Contributor guide

No contributing guide indexed for this repository

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.