-
Notifications
You must be signed in to change notification settings - Fork 273
Refactor LinearActQuantizedTensor #542
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/pytorch/ao/542
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 097a61e with merge base c9f79be ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
5007567
to
5f300dd
Compare
@jcaip please take a look again, the scope increased a bit to include a refactor for torch_function/torch_dispatch related utils functions also @msaroufim @gau-nernst please take a look as well |
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.
The new _dispatch__torch_function__
and _dispatch__torch_dispatch__
are very nice, reduce boilerplate. Apart from also making the changes to torchao/prototype/quant_llm/quant_llm.py
, for the codes that I wrote, as long as the tests pass, they are good for me.
5f300dd
to
2ba9bfc
Compare
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.
nice clean change, just double checking this won't cause any BC issues on tune side for their nf4 recipe?
70e760e
to
1f849c2
Compare
Summary: * rename to LinearActivationQuantizedTensor * using `implements` util to implement torch function and torch dispatch overwrites Test Plan: CI Reviewers: Subscribers: Tasks: Tags:
1f849c2
to
097a61e
Compare
oh nf4 is not using these utils yet, I can do it in a separate PR |
Summary: As a follow up of pytorch#542, we can simplify the code of nf4tensor by using the dispatch utils as well. Test Plan: python test/dtypes/test_nf4.py Reviewers: Subscribers: Tasks: Tags:
Summary: As a follow up of pytorch#542, we can simplify the code of nf4tensor by using the dispatch utils as well. Test Plan: python test/dtypes/test_nf4.py Reviewers: Subscribers: Tasks: Tags:
Summary: * rename to LinearActivationQuantizedTensor * using `implements` util to implement torch function and torch dispatch overwrites Test Plan: CI Reviewers: Subscribers: Tasks: Tags:
Summary: * rename to LinearActivationQuantizedTensor * using `implements` util to implement torch function and torch dispatch overwrites Test Plan: CI Reviewers: Subscribers: Tasks: Tags:
Summary:
implements
util to implement torch function and torch dispatch overwrites_implements
and added two dispatch helpers:_dispatch__torch_function__
and_dispatch__torch_dispatch__
that saves more lines of code from usersTest Plan:
CI
Reviewers:
Subscribers:
Tasks:
Tags: