Skip to content

NXP backend: Add QuantizeFusedConvBnBiasAtenPass call to integration tests pipeline#18904

Open
StrycekSimon wants to merge 1 commit intopytorch:mainfrom
nxp-upstream:feature/nxg10272/EIEX-757-enable-mlperftiny-vww-model-qat-training-test
Open

NXP backend: Add QuantizeFusedConvBnBiasAtenPass call to integration tests pipeline#18904
StrycekSimon wants to merge 1 commit intopytorch:mainfrom
nxp-upstream:feature/nxg10272/EIEX-757-enable-mlperftiny-vww-model-qat-training-test

Conversation

@StrycekSimon
Copy link
Copy Markdown
Collaborator

Adds call to QuantizeFusedConvBnBiasAtenPass in 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.

Copilot AI review requested due to automatic review settings April 15, 2026 08:19
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Apr 15, 2026

🔗 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 Failures

As of commit f490656 with merge base 37b12c8 (image):

AWAITING APPROVAL - The following workflow needs approval before CI can run:

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.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 15, 2026
@StrycekSimon StrycekSimon added release notes: nxp Changes to the NXP Neutron backend delegate and removed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Apr 15, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 QuantizeFusedConvBnBiasAtenPass into the NXP integration-test utilities.
  • Invoke QuantizeFusedConvBnBiasAtenPass(default_zero_bias=True) after convert_pt2e(...) when use_qat is enabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 143 to +148

if use_qat:
exir_program_aten_quant = QuantizeFusedConvBnBiasAtenPass(
default_zero_bias=True
)(exir_program_aten_quant).graph_module

Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
if use_qat:
exir_program_aten_quant = QuantizeFusedConvBnBiasAtenPass(
default_zero_bias=True
)(exir_program_aten_quant).graph_module
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
)(exir_program_aten_quant).graph_module
)(
exir_program_aten_quant
).graph_module

Copilot uses AI. Check for mistakes.
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: nxp Changes to the NXP Neutron backend delegate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants