-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix quantization dtypes after ORT PR #18043 (#881)
## Describe your changes PR microsoft/onnxruntime#18043 (onnxruntime) extends onnxruntime quantization tools to support float16 weights. To do so, it enforces scale and zerop_point to be strongly typed (as `numpy.array(single_value, dtype=dtype)`). scale type should always be the weight type, and zero_point type the quantized weight type. That convention is checked all along the quantization tools to make sure there is loss of information. This change was made to avoid adding new arguments in many functions to carry this information. ## Checklist before requesting a review - [ ] Add unit tests for this change. - [ ] Make sure all tests can pass. - [ ] Update documents if necessary. - [ ] Lint and apply fixes to your code by running `lintrunner -a` - [ ] Is this a user-facing change? If yes, give a description of this change to be included in the release notes. ## (Optional) Issue link
- Loading branch information
Showing
3 changed files
with
130 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters