Skip to content

Fix quantization dtypes after ORT PR #18043 - #881

Merged
guotuofeng merged 3 commits into
microsoft:mainfrom
xadupre:qu
Jan 17, 2024
Merged

Fix quantization dtypes after ORT PR #18043#881
guotuofeng merged 3 commits into
microsoft:mainfrom
xadupre:qu

Conversation

@xadupre

@xadupre xadupre commented Jan 15, 2024

Copy link
Copy Markdown
Member

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

@jambayk

jambayk commented Jan 15, 2024

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment thread olive/passes/onnx/vitis_ai/quant_utils.py Outdated
@guotuofeng

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment thread olive/passes/onnx/vitis_ai/quant_utils.py Outdated
@guotuofeng

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@guotuofeng

Copy link
Copy Markdown
Contributor

@sheng-xiao, would you please help take a look?

@guotuofeng
guotuofeng merged commit aacc65c into microsoft:main Jan 17, 2024
guotuofeng added a commit that referenced this pull request Jan 18, 2024
## Describe your changes
With PR #881, the CI pipeline for
ORT 1.15 is broken. This PR is to fix the issue.

## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants