-
Notifications
You must be signed in to change notification settings - Fork 142
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
Add more information to quantized linear module and added some logs #782
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/782
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit f7e0bbd with merge base 6080986 (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
e66c44e
to
bd95206
Compare
def insert_subclass(lin): | ||
lin.weight = torch.nn.Parameter(constructor(lin.weight), requires_grad=False) | ||
lin.weight = torch.nn.Parameter(constructor(lin.weight, **kwargs), requires_grad=False) | ||
lin.extra_repr = types.MethodType(_linear_extra_repr, lin) |
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.
optional: is there anything we can do to preserve any preexisting custom repr?
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.
actually there will be a recursive call here, since we are overriding extra_repr()
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.
looks great, thanks for working on this!
Summary: Fixes pytorch#771 Test Plan: python test/dtypes/test_affine_quantized_tensor.py -k test_print_quantized_module Reviewers: Subscribers: Tasks: Tags:
e8219a8
to
e3f6f7c
Compare
…ytorch#782) * Add more information to quantized linear module and added some logs Summary: Fixes pytorch#771 Test Plan: python test/dtypes/test_affine_quantized_tensor.py -k test_print_quantized_module Reviewers: Subscribers: Tasks: Tags:
Summary:
Fixes #771
Test Plan:
python test/dtypes/test_affine_quantized_tensor.py -k test_print_quantized_module
Example output:
Reviewers:
Subscribers:
Tasks:
Tags: