pytorch
8e51521c - [quant][pt2] Handle maxpool + conv + bn case in prepare QAT (#100941)

Commit
1 year ago
[quant][pt2] Handle maxpool + conv + bn case in prepare QAT (#100941) Summary: This commit fixes a bug where we copy the metadata from the wrong node after replace_pattern. This happened in the case of [maxpool -> getitem1 -> conv -> bn -> getitem2], where `getitem1` is the placeholder node fed into the fused conv + bn pattern, and we incorrectly copied the metadata from `getitem1` instead of from `getitem2`. We fix this bug by filtering out the placeholder nodes before doing the metadata copying. Test Plan: python test/test_quantization.py TestQuantizePT2E.test_prepare_qat_conv_bn_fusion_getitem_placeholder Reviewers: jerryzh168, kimishpatel Differential Revision: [D45916751](https://our.internmc.facebook.com/intern/diff/D45916751) Pull Request resolved: https://github.com/pytorch/pytorch/pull/100941 Approved by: https://github.com/jerryzh168
Author
Committer
Parents
Loading