mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Summary: Previously QAT fusion assumes bias is not quantized. This works for the existing XNNPACKQuantizer, but not for custom quantizers that wish to quantize the bias. This commit supports this by adding the necessary patterns. This requires refactoring the code, however, since it previously assumed that there will only be one pair of q-dq (from conv weight) in the matched pattern, and this is no longer true. Test Plan: python test/test_quantization.py TestQuantizePT2EQAT.test_qat_conv_bn_bias_derived_qspec Reviewers: jerryzh168, kimishpatel Subscribers: jerryzh168, kimishpatel, supriyar Differential Revision: [D50856377](https://our.internmc.facebook.com/intern/diff/D50856377) Pull Request resolved: https://github.com/pytorch/pytorch/pull/112528 Approved by: https://github.com/jerryzh168 |
||
|---|---|---|
| .. | ||
| ao_migration | ||
| bc | ||
| core | ||
| eager | ||
| fx | ||
| jit | ||
| pt2e | ||
| serialized | ||
| __init__.py | ||