Drop QDQ around MaxPool for opset 22 and stabilize ASAN build_x64#28783
Drop QDQ around MaxPool for opset 22 and stabilize ASAN build_x64#28783Copilot wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a regression in the QDQ DropQDQ selector logic for MaxPool when models use newer ONNX opsets. Specifically, it extends MaxPool matching from only SinceVersion == 12 to also include SinceVersion == 22, restoring the ability to collapse DequantizeLinear -> MaxPool -> QuantizeLinear sequences for opset 22+ models.
Changes:
- Extend
MaxPoolsupported versions to{12, 22}in the shared misc op versions map used by QDQ selector infrastructure. - Update
DropQDQNodesRulesregistration to allowMaxPoolversion 22 to match the positive-scale/no-int16 DropQDQ rule. - Add a regression test verifying DropQDQ works for
MaxPoolin opsets 12 and 22 for bothint8anduint8.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| onnxruntime/test/optimizer/qdq_transformer_test.cc | Adds regression coverage to ensure QDQ is dropped around MaxPool for opsets 12 and 22 with int8/uint8. |
| onnxruntime/core/optimizer/qdq_transformer/selectors_actions/shared/utils.cc | Updates misc selector op-version map so MaxPool selections can match both version 12 and 22. |
| onnxruntime/core/optimizer/qdq_transformer/selectors_actions/qdq_selector_action_transformer.cc | Updates DropQDQ selector/action registration so the MaxPool drop rule applies to both version 12 and 22. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot the issue is AddressSanitizer: Out of memory |
Confirmed. I checked the failing |
Description
Extend MaxPool QDQ-drop handling to opset 22 and add corresponding optimizer test coverage.
Based on CI feedback from
build_x64ASAN, reduce the newly added MaxPool QDQ test footprint so the change remains validated for opset 22 without triggering AddressSanitizer out-of-memory failures inonnxruntime_test_all.Motivation and Context
The original fix adds opset 22 support for dropping Q/DQ around MaxPool.
Follow-up feedback showed the ASAN job (
build_x64, job79519089498) failing due to memory exhaustion during the expanded test workload, not due to incorrect optimizer behavior.This update keeps the intended functionality change (opset 22 support) while narrowing added test cases to preserve CI stability in ASAN-constrained environments.