onnxruntime
192ab239 - [WebNN EP] Fix scale/zero_point rank for per-axis QDQ on last axis (#29475)

Commit
28 days ago
[WebNN EP] Fix scale/zero_point rank for per-axis QDQ on last axis (#29475) For per-axis QuantizeLinear/DequantizeLinear, the scale and zero_point tensors are 1-D. WebNN's quantizeLinear/dequantizeLinear requires them to have the same rank as the input (it broadcasts per-dimension and does not left-pad ranks). The reshape was skipped when the quantization axis was the last dimension, leaving a rank-1 scale against a higher-rank input and triggering "the rank of scale is not equal to the rank of input". Drop the `axis != input_rank - 1` guard so the reshape runs for all per-axis cases; the existing math already yields the correct shape (e.g. input [512, 1024], scale [1024], axis 1 -> scale [1, 1024]).
Author
Parents
Loading