Skip to content

Gemm/Transpose fusion - additional pattern coverage#8941

Merged
ytaous merged 4 commits intomasterfrom
ettao/gemm-transpose
Sep 3, 2021
Merged

Gemm/Transpose fusion - additional pattern coverage#8941
ytaous merged 4 commits intomasterfrom
ettao/gemm-transpose

Conversation

@ytaous
Copy link
Copy Markdown
Contributor

@ytaous ytaous commented Sep 2, 2021

Description: In the final optimized training graph of ULRv5 model, found one Transpose/Gemm pattern not fused properly. Thus adding additional logic to cover the case when a Transpose output is consumed by multiple Gemm nodes.

The new pattern only consider the case where all consumers of a Transpose are Gemm nodes. If one of the consumer node is not Gemm, we'll skip the fusion.

Example:
Before:
image

Expected results after transformation:
image

Motivation and Context

  • Why is this change required? What problem does it solve?
  • If it fixes an open issue, please link to the issue here.

@ytaous ytaous requested a review from a team as a code owner September 2, 2021 05:26
@SherlockNoMad SherlockNoMad added the training issues related to ONNX Runtime training; typically submitted using template label Sep 3, 2021
ashbhandare
ashbhandare previously approved these changes Sep 3, 2021
@ytaous ytaous merged commit 53eb79f into master Sep 3, 2021
@ytaous ytaous deleted the ettao/gemm-transpose branch September 3, 2021 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

training issues related to ONNX Runtime training; typically submitted using template

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants