-
Notifications
You must be signed in to change notification settings - Fork 24.1k
[quant][pt2e] Fix conv-bn weight + bias per channel QAT #125208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary: This commit fixes the pattern matching for conv-bn during QAT fusion where both weight and bias are quantized per channel. Previously this failed because weights and biases used the same example kwargs for their scales and zero points, causing these qparams to be tied during pattern matching. Test Plan: python test/test_quantization.py TestQuantizePT2EQAT_ConvBn1d.test_qat_conv_bn_per_channel_weight_bias python test/test_quantization.py TestQuantizePT2EQAT_ConvBn2d.test_qat_conv_bn_per_channel_weight_bias Reviewers: jerryzh168, angelayi Subscribers: jerryzh168, angelayi, supriyar [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/125208
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 90e6ebd with merge base 26f8d96 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Summary: This commit fixes the pattern matching for conv-bn during QAT fusion where both weight and bias are quantized per channel. Previously this failed because weights and biases used the same example kwargs for their scales and zero points, causing these qparams to be tied during pattern matching. Test Plan: python test/test_quantization.py TestQuantizePT2EQAT_ConvBn1d.test_qat_conv_bn_per_channel_weight_bias python test/test_quantization.py TestQuantizePT2EQAT_ConvBn2d.test_qat_conv_bn_per_channel_weight_bias Reviewers: jerryzh168, angelayi Subscribers: jerryzh168, angelayi, supriyar ghstack-source-id: 3240532 Pull Request resolved: #125208
@andrewor14 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@pytorchbot merge |
Merge failedReason: This PR has internal changes and must be landed via Phabricator Details for Dev Infra teamRaised by workflow job |
@pytorchbot merge -f 'Landed internally' (Initiating merge automatically since Phabricator Diff has merged, using force because this PR might not pass merge_rules.json but landed internally) |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Summary: This commit fixes the pattern matching for conv-bn during QAT fusion where both weight and bias are quantized per channel. Previously this failed because weights and biases used the same example kwargs for their scales and zero points, causing these qparams to be tied during pattern matching. Test Plan: python test/test_quantization.py TestQuantizePT2EQAT_ConvBn1d.test_qat_conv_bn_per_channel_weight_bias python test/test_quantization.py TestQuantizePT2EQAT_ConvBn2d.test_qat_conv_bn_per_channel_weight_bias Reviewers: jerryzh168, angelayi Subscribers: jerryzh168, angelayi, supriyar Differential Revision: [D56740694](https://our.internmc.facebook.com/intern/diff/D56740694) Pull Request resolved: pytorch#125208 Approved by: https://github.com/angelayi
Stack from ghstack (oldest at bottom):
Summary: This commit fixes the pattern matching for conv-bn
during QAT fusion where both weight and bias are quantized per
channel. Previously this failed because weights and biases used
the same example kwargs for their scales and zero points,
causing these qparams to be tied during pattern matching.
Test Plan:
python test/test_quantization.py TestQuantizePT2EQAT_ConvBn1d.test_qat_conv_bn_per_channel_weight_bias
python test/test_quantization.py TestQuantizePT2EQAT_ConvBn2d.test_qat_conv_bn_per_channel_weight_bias
Reviewers: jerryzh168, angelayi
Subscribers: jerryzh168, angelayi, supriyar
Differential Revision: D56740694