Skip to content

Comments

Draft: Integration of QuantizeFusedConvBnBiasPass to NXP conversion pipeline#17523

Draft
StrycekSimon wants to merge 2 commits intopytorch:mainfrom
nxp-upstream:convbn_no_bias_pass_nxp_pipeline
Draft

Draft: Integration of QuantizeFusedConvBnBiasPass to NXP conversion pipeline#17523
StrycekSimon wants to merge 2 commits intopytorch:mainfrom
nxp-upstream:convbn_no_bias_pass_nxp_pipeline

Conversation

@StrycekSimon
Copy link
Collaborator

@StrycekSimon StrycekSimon commented Feb 18, 2026

This is a placeholder PR used as demonstration of integration of changes applied in this pull request.

Includes testing function for reference.

Summary:

When performing QAT with a model that has a conv layer with no bias followed by batch norm, the fusion process creates a bias. This is done *after* observers are attached so the resulting bias is kept as float.

This diff adds a pass which grabs the proper qparams and applies them to the non-quantized bias.

Differential Revision: D92733079
@pytorch-bot
Copy link

pytorch-bot bot commented Feb 18, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17523

Note: Links to docs will display an error until the docs builds have been completed.

❌ 38 New Failures

As of commit 1875eec with merge base 6c1dc31 (image):

NEW FAILURES - The following jobs have failed:

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 Feb 18, 2026
@github-actions
Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@StrycekSimon StrycekSimon force-pushed the convbn_no_bias_pass_nxp_pipeline branch from 6c04a6e to 1875eec Compare February 18, 2026 13:14
module = convert_pt2e(module)

# Without this export, conv bias is not in the graph_signature.
model = torch.export.export(module, calibration_inputs[0], strict=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

So you want to try to drop needing this?

model = bias_quant_pass(model.graph_module)

return m
return model.graph_module
Copy link
Contributor

Choose a reason for hiding this comment

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

is the change to use graph_module desired outcome or currently just needed for the pass as is?

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants