-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[quant][qat] Ensure observers and fq modules are scriptable #44749
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: Ensure fx module is scriptable after calling prepare_qat on it Test Plan: python test/test_quantization.py TestQuantizeFx.test_qat_and_script Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
| if hasattr(self.activation_post_process, 'ch_axis') else -1 | ||
|
|
||
| @torch.jit.export | ||
| def enable_fake_quant(self, enabled=True): |
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.
these can actually just be global functions instead of residing in the module. maybe create an issue to track this?
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.
Filed #44751
|
|
||
| # symbolically trace | ||
| model = symbolic_trace(model) | ||
| model = prepare_fx(model, qconfig_dict) |
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.
please use prepare_qat_fx here, we want to be more explicit
Summary: Ensure fx module is scriptable after calling prepare_qat on it Test Plan: python test/test_quantization.py TestQuantizeFx.test_qat_and_script Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D23718380](https://our.internmc.facebook.com/intern/diff/D23718380) [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit 935e733 (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).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group. This comment has been revised 10 times. |
💊 CI failures summary and remediationsAs of commit 1ccb5d0 (more details on the Dr. CI page): ✅ None of the CI failures appear to be your fault 💚
🚧 4 fixed upstream failures:These were probably caused by upstream breakages that were already fixed.
Please rebase on the
|
Summary: Ensure fx module is scriptable after calling prepare_qat on it Test Plan: python test/test_quantization.py TestQuantizeFx.test_qat_and_script Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D23718380](https://our.internmc.facebook.com/intern/diff/D23718380) [ghstack-poisoned]
Summary: Ensure fx module is scriptable after calling prepare_qat on it Test Plan: python test/test_quantization.py TestQuantizeFx.test_qat_and_script Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D23718380](https://our.internmc.facebook.com/intern/diff/D23718380) [ghstack-poisoned]
Codecov Report
@@ Coverage Diff @@
## gh/supriyar/178/base #44749 +/- ##
=====================================================
Coverage 68.08% 68.08%
=====================================================
Files 384 384
Lines 49768 49765 -3
=====================================================
- Hits 33886 33884 -2
+ Misses 15882 15881 -1
Continue to review full report at Codecov.
|
|
This pull request has been merged in 3f512b0. |
Summary: Pull Request resolved: #44749 Ensure fx module is scriptable after calling prepare_qat on it Test Plan: python test/test_quantization.py TestQuantizeFx.test_qat_and_script Imported from OSS Reviewed By: jerryzh168 Differential Revision: D23718380 fbshipit-source-id: abf63ffb21e707f7def8f6c88246877f5aded58c
Stack from ghstack:
Summary:
Ensure fx module is scriptable after calling prepare_qat on it
Test Plan:
python test/test_quantization.py TestQuantizeFx.test_qat_and_script
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: D23718380