NXP backend: Add QuantizeFusedConvBnBiasAtenPass call to integration tests pipeline#18904
Conversation
…ration tests pipeline
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18904
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 Awaiting Approval, 3 New Failures, 2 Unrelated FailuresAs of commit f490656 with merge base 37b12c8 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
There was a problem hiding this comment.
Pull request overview
Adds an ATen-graph transform into the NXP integration-test quantization flow to better support QAT graphs that include biasless convolutions (by ensuring fused/introduced conv biases are quantized/dequantized appropriately before lowering).
Changes:
- Import
QuantizeFusedConvBnBiasAtenPassinto the NXP integration-test utilities. - Invoke
QuantizeFusedConvBnBiasAtenPass(default_zero_bias=True)afterconvert_pt2e(...)whenuse_qatis enabled.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| if use_qat: | ||
| exir_program_aten_quant = QuantizeFusedConvBnBiasAtenPass( | ||
| default_zero_bias=True | ||
| )(exir_program_aten_quant).graph_module | ||
|
|
There was a problem hiding this comment.
In the NXP quantization helper (backends/nxp/quantizer/utils.py), QuantizeFusedConvBnBiasAtenPass(default_zero_bias=True) is applied unconditionally after convert_pt2e (PTQ and QAT). Gating it behind use_qat here makes the integration-test conversion pipeline diverge from the main quantization path; consider applying it unconditionally as well, or add a short comment explaining why PTQ should skip it in this pipeline.
| if use_qat: | |
| exir_program_aten_quant = QuantizeFusedConvBnBiasAtenPass( | |
| default_zero_bias=True | |
| )(exir_program_aten_quant).graph_module | |
| exir_program_aten_quant = QuantizeFusedConvBnBiasAtenPass( | |
| default_zero_bias=True | |
| )(exir_program_aten_quant).graph_module |
| if use_qat: | ||
| exir_program_aten_quant = QuantizeFusedConvBnBiasAtenPass( | ||
| default_zero_bias=True | ||
| )(exir_program_aten_quant).graph_module |
There was a problem hiding this comment.
The chained pass invocation is likely to be reformatted by the repo’s UFMT/black (line-length wrapping tends to split at the outer callable invocation rather than inside the pass constructor). Please run UFMT/black on this file or adjust the wrapping so formatting CI doesn’t fail.
| )(exir_program_aten_quant).graph_module | |
| )( | |
| exir_program_aten_quant | |
| ).graph_module |
Adds call to
QuantizeFusedConvBnBiasAtenPassin conversion pipeline for integration tests. The pass enables QAT support for models containing biasless convolutions in integration tests.Test plan
Covered by NXP internal tests.