Skip to content

Fix DropQDQ not dropping Q/DQ around opset-22 MaxPool - #29201

Merged
tianleiwu merged 1 commit into
microsoft:mainfrom
tairenpiao:fix-qdq-maxpool-opset22
Jun 23, 2026
Merged

Fix DropQDQ not dropping Q/DQ around opset-22 MaxPool#29201
tianleiwu merged 1 commit into
microsoft:mainfrom
tairenpiao:fix-qdq-maxpool-opset22

Conversation

@tairenpiao

Copy link
Copy Markdown
Contributor

Description

ONNX added a MaxPool-22 schema, but the DropQDQ selectors still matched only MaxPool-12, so the DequantizeLinear / QuantizeLinear around an opset-22 MaxPool were no longer dropped. This updates both DropQDQ selector op-version maps to {12, 22}, matching the QDQ propagation pass. (MaxPool stays pinned to integer-capable versions ≥ 12.)

Motivation and Context

Fixes #28770. Models that optimized to full integer at opset ≤ 21 regressed at opset 22+, blocking users from upgrading their opset.

@tairenpiao

tairenpiao commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

#27059 already proposes the same qdq_selector_action_transformer.cc {12}{12, 22} change and is the original PR for this — it should take priority.

The thing this PR adds on top is updating GetMiscOpVersionsMap in selectors_actions/shared/utils.cc to {12, 22} as well, so the runtime / EP / minimal-build QDQ node-unit selectors also recognize the opset-22 MaxPool (otherwise that path still misses it).

Happy to close this in favor of #27059 if that one-line shared/utils.cc addition is folded in there.

@tairenpiao

Copy link
Copy Markdown
Contributor Author

@xadupre @tianleiwu
The Web CI keeps queueing. Could anyone take a look at this?

@tianleiwu
tianleiwu enabled auto-merge (squash) June 23, 2026 07:05
@tianleiwu
tianleiwu merged commit c69373c into microsoft:main Jun 23, 2026
90 of 91 checks passed
tianleiwu pushed a commit that referenced this pull request Jun 23, 2026
### Description

ONNX added a `MaxPool-22` schema, but the DropQDQ selectors still
matched only `MaxPool-12`, so the `DequantizeLinear` / `QuantizeLinear`
around an opset-22 `MaxPool` were no longer dropped. This updates both
DropQDQ selector op-version maps to `{12, 22}`, matching the QDQ
propagation pass. (`MaxPool` stays pinned to integer-capable versions ≥
12.)

### Motivation and Context

Fixes #28770. Models that optimized to full integer at opset ≤ 21
regressed at opset 22+, blocking users from upgrading their opset.
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.

[Performance] DropQDQ optimization no longer drops QDQ around MaxPool for opset >= 22

3 participants