-
Notifications
You must be signed in to change notification settings - Fork 24.7k
[PT2E x86 & Intel GPU] Collapse dim in qlinear_pointwise_binary fusion #148245
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/148245
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 6d893b0 with merge base 4216478 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@@ -884,7 +884,7 @@ def qlinear_binary( | |||
x_size = x.get_size() | |||
x2_size = x2.get_size() | |||
assert len(x_size) == len(x2_size) | |||
if len(x_size) > 2 and binary_attr == "add": | |||
if len(x_size) > 2 and (binary_attr == "add" or binary_attr == "sum"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Can you elaborate on why this change is necessary? AFAIK, Viewing the input from 3D to 2D is required for the CPP GEMM Template, but the CPP GEMM Template doesn't support in-place sum yet. Adding a corresponding test case to illustrate this would also be appreciated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @leslie-fang-intel appreciation for you explanation. I just get the info that sum
is not supported in CPP GEMM Template. I wrongly presume they have same ability previously. This PR is not necessary, I can adopt the dim collapsing logic in oneDNN integration for XPU instead. I will close this PR.
Thanks for your explanation again 👍 !
Motivation
Currently, most of
qlinear+add
path would hit fusionqlinear_pointwise_binary
withsum
as post op. But it has not collapse the input dim whendim>2
. This PR intends to trigger dimension collapse in qlinear_bianry for 3D linear cases.Stack from ghstack (oldest at bottom):
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov