-
Notifications
You must be signed in to change notification settings - Fork 25k
[Quant][PT2E][X86] Enable annotation of aten.mul.tensor with X86InductorQuantizer #150831
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/150831
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 71e079b with merge base 01f226b ( UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
test/quantization/pt2e/test_x86inductor_quantizer.py:2877
- [nitpick] Avoid using 'type' as a variable name because it shadows the built-in function. Consider renaming it to 'model_type' or a similar descriptive name.
for type in [0, 1, 2]:
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.
LGTM. A small comment.
Hi @jerryzh168 Could you please review this PR? Thanks. |
else: | ||
return x * y.sum().item() | ||
|
||
for type in [0, 1, 2, 3]: |
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.
nit: I think we can improve [0, 1, 2, 3] by defining different classes for each test case here
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. Updated.
Close this PR as we need to move to Torchao. |
Stack from ghstack (oldest at bottom):
Summary
This PR adds support of annotation of
aten.mul.tensor
inX86InductorQuantizer
.mul
is not annotated by default. Users need to set the following to enable annotation ofmul
:After
convert_pt2e
, users get patterns likeTest plan
cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10