microsoft / microsoft/onnxruntime
[BUG] QLinearConv uses same value for all zero_points!
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 179
Description
Zero-points as 1D tensor have different values for each element when quantized per output channel.
When W is quantized asymmetric, this is of course the case.
ORT quantization tool can generate ONNX files with asymmetric weights but runtime crashes here and shows this error.
Thanks for fixing this bug, I really need this fix to run models that otherwise have very bad accuracy.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at onnxruntime/core/providers/cpu/nn/qlinearconv.cc around line 247 and inspect how zero-points are read for per-output-channel weights. Reproduce the failure with an ONNX model generated by the ORT quantization tool using asymmetric weights, then verify that distinct zero-point values are handled without a runtime crash and preserve model execution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, machine-learning
- Domain
- backend, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100