-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 Quantize/Dequantize Partitioning #5940
Conversation
aa4bd6c
to
5ca2d05
Compare
CC @ZihengJiang |
@weberlo please rebase to resolve the conflict. @ZihengJiang please help to manage this PR |
1ad274c
to
53deebc
Compare
@ZihengJiang I've rebased and converted the datatype collector pass into C++, but I won't be prioritizing C++ conversion for the other visitors for the next few weeks. To prevent bit rot, I think we should work towards merging the PR in its current state. |
@weberlo Will this affect the original pipeline when the config |
Nice work @weberlo, do can we add a |
@ZihengJiang It won't affect the original pipeline, since we just return the
It's implicitly tested in this helper function. I explicitly set it to |
@weberlo I believe we would like a general approach to achieve the partitioning in the future, but I am fine with the PR in the current stage. I will approve it after it pass the tests. |
on our way get clooooooser clean up (part 1) clean up (part 2) clean up (part 3) clean up (part 4) clean clean cleaanaannanaaananaananaananaan clkjsdflkjlfsjdflkj revert parser changes add docs roll lint roll lint
13126f1
to
29ab9d3
Compare
@ZihengJiang I agree the current implementation is suboptimal, and it would be much better to integrate it more closely with the quantization pass itself. I went with the approach in this PR, because you're in the process of making significant changes to quantization, and this approach should be robust to those changes. We should certainly revisit this feature once your changes land though. |
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.
Overall LGTM, thanks for clarifying @weberlo. Can you take a look at the CI error to make sure the PR is ready to be merged?
@tmoreau89 @ZihengJiang CI's finally passing |
Merged now! Thanks Logan! |
* Implement quant/dequant partitioning on our way get clooooooser clean up (part 1) clean up (part 2) clean up (part 3) clean up (part 4) clean clean cleaanaannanaaananaananaananaan clkjsdflkjlfsjdflkj revert parser changes add docs roll lint roll lint * add option to toggle fully integral check * convert dtype collector to C++ * remove need for `with_dtype` * remove unused imports * roll lint * partially address feedback * roll lint * upgrade to new parser * retrigger CI * roll the dice again
* Implement quant/dequant partitioning on our way get clooooooser clean up (part 1) clean up (part 2) clean up (part 3) clean up (part 4) clean clean cleaanaannanaaananaananaananaan clkjsdflkjlfsjdflkj revert parser changes add docs roll lint roll lint * add option to toggle fully integral check * convert dtype collector to C++ * remove need for `with_dtype` * remove unused imports * roll lint * partially address feedback * roll lint * upgrade to new parser * retrigger CI * roll the dice again
* Implement quant/dequant partitioning on our way get clooooooser clean up (part 1) clean up (part 2) clean up (part 3) clean up (part 4) clean clean cleaanaannanaaananaananaananaan clkjsdflkjlfsjdflkj revert parser changes add docs roll lint roll lint * add option to toggle fully integral check * convert dtype collector to C++ * remove need for `with_dtype` * remove unused imports * roll lint * partially address feedback * roll lint * upgrade to new parser * retrigger CI * roll the dice again
* Implement quant/dequant partitioning on our way get clooooooser clean up (part 1) clean up (part 2) clean up (part 3) clean up (part 4) clean clean cleaanaannanaaananaananaananaan clkjsdflkjlfsjdflkj revert parser changes add docs roll lint roll lint * add option to toggle fully integral check * convert dtype collector to C++ * remove need for `with_dtype` * remove unused imports * roll lint * partially address feedback * roll lint * upgrade to new parser * retrigger CI * roll the dice again
* Implement quant/dequant partitioning on our way get clooooooser clean up (part 1) clean up (part 2) clean up (part 3) clean up (part 4) clean clean cleaanaannanaaananaananaananaan clkjsdflkjlfsjdflkj revert parser changes add docs roll lint roll lint * add option to toggle fully integral check * convert dtype collector to C++ * remove need for `with_dtype` * remove unused imports * roll lint * partially address feedback * roll lint * upgrade to new parser * retrigger CI * roll the dice again
Implements step 1 of the Improvements to Automatic Quantization for Bare-Metal RFC.
The code still needs more thorough documentation, and I'm gonna wait to bake the visitors into C++ until we get some design feedback (either here or on the RFC).