microsoft / microsoft/onnxruntime
[Feature Request] QLinearMatmul : weight zero point must be a scalar, 1D tensor of size 1, or last to second dimension is 1
- Dominant language
- C++
- Stars
- 21.9k
- Forks
- 4.2k
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 184
Description
### Describe the feature request
onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException:
[ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running QLinearMatMul node. Name:'MatMul_266' Status Message: /onnxruntime_src/onnxruntime/core/providers/cpu/math/quantize_linear_matmul.cc:37 virtual onnxruntime::common::Status onnxruntime::QLinearMatMul::Compute(onnxruntime::OpKernelContext*) const IsBQuantParamSupported(b_offset->Shape(), b ? b->Shape() : b_shape_) was false. QLinearMatmul : weight zero point must be a scalar, 1D tensor of size 1, or last to second dimension is 1
### Describe scenario use case



Thanks in advance!
Contributor guide
Research direction
Start with onnxruntime/core/providers/cpu/math/quantize_linear_matmul.cc and inspect QLinearMatMul::Compute, especially the IsBQuantParamSupported check named in the error. Determine how weight zero-point shapes are validated, then confirm the requested scalar, one-element 1D, and supported last-to-second-dimension forms are accepted without regressing existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend, machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100