Draft: Integration of QuantizeFusedConvBnBiasPass to NXP conversion pipeline#17523
Draft: Integration of QuantizeFusedConvBnBiasPass to NXP conversion pipeline#17523StrycekSimon wants to merge 2 commits intopytorch:mainfrom
QuantizeFusedConvBnBiasPass to NXP conversion pipeline#17523Conversation
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
🔗 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 FailuresAs of commit 1875eec with merge base 6c1dc31 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
6c04a6e to
1875eec
Compare
| 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) |
There was a problem hiding this comment.
So you want to try to drop needing this?
| model = bias_quant_pass(model.graph_module) | ||
|
|
||
| return m | ||
| return model.graph_module |
There was a problem hiding this comment.
is the change to use graph_module desired outcome or currently just needed for the pass as is?
This is a placeholder PR used as demonstration of integration of changes applied in this pull request.
Includes testing function for reference.