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

Div mul fusion #7183

Merged
merged 3 commits into from
Apr 5, 2021
Merged

Div mul fusion #7183

merged 3 commits into from
Apr 5, 2021

Conversation

ashbhandare
Copy link
Contributor

This transform fuses Div->Mul when the computation is (1/X1 * X2) to do Div (X2/X1)

@ashbhandare ashbhandare requested a review from a team as a code owner March 30, 2021 19:00
onnxruntime/core/optimizer/div_mul_fusion.cc Outdated Show resolved Hide resolved
onnxruntime/core/optimizer/div_mul_fusion.cc Show resolved Hide resolved
onnxruntime/core/optimizer/div_mul_fusion.cc Outdated Show resolved Hide resolved
onnxruntime/core/optimizer/div_mul_fusion.cc Outdated Show resolved Hide resolved
onnxruntime/test/optimizer/graph_transform_test.cc Outdated Show resolved Hide resolved
@ashbhandare ashbhandare added the training issues related to ONNX Runtime training; typically submitted using template label Mar 30, 2021
@ashbhandare ashbhandare force-pushed the aibhanda/div_mul branch 2 times, most recently from 8858f7e to e284fd5 Compare March 31, 2021 23:50
SherlockNoMad
SherlockNoMad previously approved these changes Apr 1, 2021
@fdwr
Copy link
Contributor

fdwr commented Apr 2, 2021

Amusingly, many GPU's then (internally) decompose X2/X1 back into (1/X1 * X2). 😅

@ashbhandare ashbhandare merged commit 2b85135 into master Apr 5, 2021
@ashbhandare ashbhandare deleted the aibhanda/div_mul branch April 5, 2021 16:35
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.

5 participants