Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize BatchMatMul by moving batch variable out of loops #7069

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

Linchenn
Copy link
Collaborator

@Linchenn Linchenn commented Nov 21, 2022

When computing a certain output value of BatchMatMul, it has to have a loop over the inputs' shared Dimension. However, batch variables are const over this loop, so we could move batch variables out of this loop.

To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.


This change is Reviewable

Copy link
Collaborator

@pyu10055 pyu10055 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained

Copy link
Member

@mattsoulanille mattsoulanille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Linchenn
Copy link
Collaborator Author

FYI @qjia7 @xhcao .

@Linchenn Linchenn merged commit 9762200 into tensorflow:master Nov 21, 2022
@Linchenn Linchenn deleted the optBatch branch November 21, 2022 22:12
Linchenn added a commit to Linchenn/tfjs that referenced this pull request Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants