-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[Quant][fx] Add lowering for Linear-Bn1d in QAT mode #73509
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 adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Reviewers: jerryzh168, vkuzo Subscribers: jerryzh168, vkuzo Tasks: #66483 [ghstack-poisoned]
CI Flow Status⚛️ CI FlowRuleset - Version:
|
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 3909f2a (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
Summary: This adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Reviewers: jerryzh168, vkuzo Subscribers: jerryzh168, vkuzo Tasks: #66483 ghstack-source-id: d0c2c3d Pull Request resolved: #73509
vkuzo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for fixing this!
jerryzh168
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
| for model, quant_type in options: | ||
| self.checkGraphModeFxOp( | ||
| model, data, quant_type, quantized_nodes[quant_type]) | ||
| for quant_type in self.all_quant_types: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, this refactor looks very clean
Summary: This adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. This follows #72431 and #72796, which add Linear-Bn1d fusion functionality to eager QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Reviewers: jerryzh168, vkuzo Subscribers: jerryzh168, vkuzo Tasks: #66483 [ghstack-poisoned]
Summary: This adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. This follows #72431 and #72796, which add Linear-Bn1d fusion functionality to eager QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Reviewers: jerryzh168, vkuzo Subscribers: jerryzh168, vkuzo Tasks: #66483 [ghstack-poisoned]
|
@andrewor14 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: This adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Reviewers: jerryzh168, vkuzo Subscribers: jerryzh168, vkuzo Tasks: #66483 ghstack-source-id: 03832f1 Pull Request resolved: #73509
Summary: This adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. This follows #72431 and #72796, which add Linear-Bn1d fusion functionality to eager QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Reviewers: jerryzh168, vkuzo Subscribers: jerryzh168, vkuzo Tasks: #66483 Differential Revision: [D34591251](https://our.internmc.facebook.com/intern/diff/D34591251) [ghstack-poisoned]
Summary: This adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Reviewers: jerryzh168, vkuzo Subscribers: jerryzh168, vkuzo Tasks: #66483 ghstack-source-id: 126b205 Pull Request resolved: #73509
|
@andrewor14 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
looks like we do not have a test comparing against eager mode here for linear bn fusion, that is why there is no test failing. maybe we could add a eager mode test, like https://github.com/pytorch/pytorch/blob/master/test/quantization/fx/test_quantize_fx.py#L955 |
Summary: This adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. This follows #72431 and #72796, which add Linear-Bn1d fusion functionality to eager QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Reviewers: jerryzh168, vkuzo Subscribers: jerryzh168, vkuzo Tasks: #66483 Differential Revision: [D34591251](https://our.internmc.facebook.com/intern/diff/D34591251) [ghstack-poisoned]
Summary: This adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. This follows #72431 and #72796, which add Linear-Bn1d fusion functionality to eager QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Reviewers: jerryzh168, vkuzo Subscribers: jerryzh168, vkuzo Tasks: #66483 Differential Revision: [D34591251](https://our.internmc.facebook.com/intern/diff/D34591251) [ghstack-poisoned]
Summary: This adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Reviewers: jerryzh168, vkuzo Subscribers: jerryzh168, vkuzo Tasks: #66483 ghstack-source-id: 4962de7 Pull Request resolved: #73509
Summary: This adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. This follows #72431 and #72796, which add Linear-Bn1d fusion functionality to eager QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Reviewers: jerryzh168, vkuzo Subscribers: jerryzh168, vkuzo Tasks: #66483 Differential Revision: [D34591251](https://our.internmc.facebook.com/intern/diff/D34591251) [ghstack-poisoned]
Summary: This adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Reviewers: jerryzh168, vkuzo Subscribers: jerryzh168, vkuzo Tasks: #66483 ghstack-source-id: 56e1bfa Pull Request resolved: #73509
|
@andrewor14 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: This adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. This follows #72431 and #72796, which add Linear-Bn1d fusion functionality to eager QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Reviewers: jerryzh168, vkuzo Subscribers: jerryzh168, vkuzo Tasks: #66483 Differential Revision: [D34591251](https://our.internmc.facebook.com/intern/diff/D34591251) [ghstack-poisoned]
|
@andrewor14 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: This adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Reviewers: jerryzh168, vkuzo Subscribers: jerryzh168, vkuzo Tasks: #66483 ghstack-source-id: 6ec71d9 Pull Request resolved: #73509
Summary: This adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. This follows #72431 and #72796, which add Linear-Bn1d fusion functionality to eager QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Reviewers: jerryzh168, vkuzo Subscribers: jerryzh168, vkuzo Tasks: #66483 Differential Revision: [D34591251](https://our.internmc.facebook.com/intern/diff/D34591251) [ghstack-poisoned]
Summary: This adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Reviewers: jerryzh168, vkuzo Subscribers: jerryzh168, vkuzo Tasks: #66483 ghstack-source-id: dd35e72 Pull Request resolved: #73509
|
@andrewor14 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: Pull Request resolved: #73509 This adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. This follows #72431 and #72796, which add Linear-Bn1d fusion functionality to eager QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Imported from OSS Reviewed By: dagitses Differential Revision: D34591251 fbshipit-source-id: 39144485f9954ee1830c8b414e724560fd7e47bf
Summary: Pull Request resolved: pytorch/pytorch#73509 This adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. This follows pytorch/pytorch#72431 and pytorch/pytorch#72796, which add Linear-Bn1d fusion functionality to eager QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Imported from OSS Reviewed By: dagitses Differential Revision: D34591251 fbshipit-source-id: 39144485f9954ee1830c8b414e724560fd7e47bf (cherry picked from commit b97a39b4d9df00e045fab4c01eca88e562ca2c02)
Summary: Pull Request resolved: pytorch/pytorch#73509 This adds functionality to lower reference models involving the Linear-Bn1d pattern in FX QAT mode. This follows pytorch/pytorch#72431 and pytorch/pytorch#72796, which add Linear-Bn1d fusion functionality to eager QAT mode. Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module Imported from OSS Reviewed By: dagitses Differential Revision: D34591251 fbshipit-source-id: 39144485f9954ee1830c8b414e724560fd7e47bf (cherry picked from commit b97a39b4d9df00e045fab4c01eca88e562ca2c02)
Stack from ghstack (oldest at bottom):
Summary: This adds functionality to lower reference models
involving the Linear-Bn1d pattern in FX QAT mode. This follows
#72431 and #72796, which add Linear-Bn1d fusion functionality
to eager QAT mode.
Test Plan: python test/test_quantization.py TestQuantizeFxOps.test_linear_module
Reviewers: jerryzh168, vkuzo
Subscribers: jerryzh168, vkuzo
Tasks: #66483
Differential Revision: D34591251