-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[quant][fx][fix] QAT with object_type in qconfig #60555
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: When we do QAT, we swap the FP32 modules with the corresponding quantized modules counterpart by calling `qat_swap_modules` in prepare. However when we try to look up using the swapped module type in qconfig_dict, we cannot find a match anymore since the qconfig dict contains the original module type. In this PR we get the list of original `modules` dict from the input model before we do swap for QAT Test Plan: python test/test_quantization.py TestQuantizeFx.test_qconfig_qat_module_type Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit 001f200 (more details on the Dr. CI page and at hud.pytorch.org/pr/60555):
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
Summary: When we do QAT, we swap the FP32 modules with the corresponding quantized modules counterpart by calling `qat_swap_modules` in prepare. However when we try to look up using the swapped module type in qconfig_dict, we cannot find a match anymore since the qconfig dict contains the original module type. In this PR we get the list of original `modules` dict from the input model before we do swap for QAT Test Plan: python test/test_quantization.py TestQuantizeFx.test_qconfig_qat_module_type Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: When we do QAT, we swap the FP32 modules with the corresponding quantized modules counterpart by calling `qat_swap_modules` in prepare. However when we try to look up using the swapped module type in qconfig_dict, we cannot find a match anymore since the qconfig dict contains the original module type. In this PR we get the list of original `modules` dict from the input model before we do swap for QAT Test Plan: python test/test_quantization.py TestQuantizeFx.test_qconfig_qat_module_type Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: When we do QAT, we swap the FP32 modules with the corresponding quantized modules counterpart by calling `qat_swap_modules` in prepare. However when we try to look up using the swapped module type in qconfig_dict, we cannot find a match anymore since the qconfig dict contains the original module type. In this PR we get the list of original `modules` dict from the input model before we do swap for QAT Test Plan: python test/test_quantization.py TestQuantizeFx.test_qconfig_qat_module_type Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: When we do QAT, we swap the FP32 modules with the corresponding quantized modules counterpart by calling `qat_swap_modules` in prepare. However when we try to look up using the swapped module type in qconfig_dict, we cannot find a match anymore since the qconfig dict contains the original module type. In this PR we update the qconfig_dict to include the modules swapped for QATT Test Plan: python test/test_quantization.py TestQuantizeFx.test_qconfig_qat_module_type Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: c74cb9a Pull Request resolved: #60555
@supriyar has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
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.
lg, thanks!
Codecov Report
@@ Coverage Diff @@
## gh/supriyar/235/base #60555 +/- ##
========================================================
- Coverage 76.24% 76.23% -0.01%
========================================================
Files 2054 2054
Lines 205027 205035 +8
========================================================
- Hits 156322 156310 -12
- Misses 48705 48725 +20 |
This pull request has been merged in 1120a1b. |
Stack from ghstack:
Summary:
When we do QAT, we swap the FP32 modules with the corresponding quantized modules counterpart by calling
qat_swap_modules
in prepare.However when we try to look up using the swapped module type in qconfig_dict, we cannot find a match anymore since the qconfig dict contains the original
module type.
In this PR we update the qconfig_dict to include the modules swapped for QATT
Test Plan:
python test/test_quantization.py TestQuantizeFx.test_qconfig_qat_module_type
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: D29337036