-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
[quant][api] Add assert for backend in get_default_qconfig related apis #86259
Conversation
Summary: Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/86259
Note: Links to docs will display an error until the docs builds have been completed. ❗ 2 Active SEVsThere are 2 currently active SEVs. If your PR is affected, please view them below:
✅ No Failures, 1 PendingAs of commit e14efa9: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Summary: Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: c435a3feab363a1d165a2dada6610dcd8acf9a81 Pull Request resolved: #86259
`x86` (default), `fbgemm`, `qnnpack` and `onednn`. | ||
|
||
Return: | ||
qconfig | ||
""" | ||
supported_backends = ["fbgemm", "x86", "qnnpack", "onednn"] | ||
if backend not in supported_backends: | ||
raise AssertionError( |
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.
Should this be ValueError
instead?
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.
I actually checked this yesterday, ValueError means the type is correct and value is not correct, but in this case the type may not be correct either so I guess AssertionError is OK. we are also using AssertionError for the version number as well
@pytorchbot merge -g |
@pytorchbot successfully started a merge job. Check the current status here. |
Merge failedReason: 2 additional jobs have failed, first few of them are: trunk ,trunk / macos-12-py3-arm64 / test (default, 2, 2, macos-m1-12) Details for Dev Infra teamRaised by workflow job |
@pytorchbot rebase |
@pytorchbot successfully started a rebase job. Check the current status here |
… related apis" Summary: Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Successfully rebased |
Summary: Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 8900ae42bb8702b6d2ffce34e8e347008ab34ac7 Pull Request resolved: #86259
@pytorchbot merge |
@pytorchbot merge -g |
Merge startedYour change will be merged once all checks on your PR pass since you used the green (-g) flag (ETA: 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 2 additional jobs have failed, first few of them are: trunk ,trunk / macos-12-py3-arm64 / test (default, 2, 2, macos-m1-12) Details for Dev Infra teamRaised by workflow job |
… related apis" Summary: Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 30d265c0cca3452dab4aa7161fc22a8599d6a8f3 Pull Request resolved: #86259
@jerryzh168 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
… related apis" Summary: Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D40236474](https://our.internmc.facebook.com/intern/diff/D40236474) [ghstack-poisoned]
Summary: Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 15a2cf357646566b54ebafae86938a682ddc0062 Pull Request resolved: #86259
Merge failedReason: Command
Details for Dev Infra teamRaised by workflow job |
… related apis" Summary: Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D40236474](https://our.internmc.facebook.com/intern/diff/D40236474) [ghstack-poisoned]
Summary: Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 5df504dd5d093ecdd6cc9cb7e54c3917259e7861 Pull Request resolved: #86259
@jerryzh168 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
… related apis" Summary: Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D40236474](https://our.internmc.facebook.com/intern/diff/D40236474) [ghstack-poisoned]
Summary: Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 2b2a5e6fb81f3ec295394a89edda1c2911fcd165 Pull Request resolved: #86259
@jerryzh168 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@pytorchbot merge -g |
Merge failedReason: This PR has internal changes and must be landed via Phabricator Details for Dev Infra teamRaised by workflow job |
@pytorchbot rebase |
@pytorchbot successfully started a rebase job. Check the current status here |
… related apis" Summary: Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D40236474](https://our.internmc.facebook.com/intern/diff/D40236474) [ghstack-poisoned]
Successfully rebased |
Summary: Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 9fca040069021a7e776696520c944850f43ff851 Pull Request resolved: #86259
@jerryzh168 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@pytorchbot rebase |
@pytorchbot successfully started a rebase job. Check the current status here |
… related apis" Summary: Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D40236474](https://our.internmc.facebook.com/intern/diff/D40236474) [ghstack-poisoned]
Successfully rebased |
Summary: Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 055a429ec0e86fdfd209a11f050484dcba8ba207 Pull Request resolved: #86259
@jerryzh168 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
…is (pytorch#86259) Summary: Pull Request resolved: pytorch#86259 Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Imported from OSS Reviewed By: jcaip Differential Revision: D40236474 fbshipit-source-id: 833355257fcc708ebe28842ffe1c370142688ffc
closed in favor of #87331 |
…is (#86259) (#87331) Summary: Pull Request resolved: #86259 Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Imported from OSS Reviewed By: jcaip Differential Revision: D40236474 Pull Request resolved: #87331 Approved by: https://github.com/andrewor14
…is (pytorch#86259) (pytorch#87331) Summary: Pull Request resolved: pytorch#86259 Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Imported from OSS Reviewed By: jcaip Differential Revision: D40236474 Pull Request resolved: pytorch#87331 Approved by: https://github.com/andrewor14
…is (pytorch#86259) (pytorch#87331) Summary: Pull Request resolved: pytorch#86259 Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Imported from OSS Reviewed By: jcaip Differential Revision: D40236474 Pull Request resolved: pytorch#87331 Approved by: https://github.com/andrewor14
…is (pytorch#86259) (pytorch#87331) Summary: Pull Request resolved: pytorch#86259 Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn" for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping Test Plan: python test/test_quantization.py -k test_get_default_qconfig_mapping Imported from OSS Reviewed By: jcaip Differential Revision: D40236474 Pull Request resolved: pytorch#87331 Approved by: https://github.com/andrewor14
Stack from ghstack (oldest at bottom):
Summary:
Add assertion to make sure backend is one of "fbgemm", "x86", "qnnpack" and "onednn"
for get_default_qconfig, get_default_qat_qconfig, get_default_qconfig_mapping and get_default_qat_qconfig_mapping
Test Plan:
python test/test_quantization.py -k test_get_default_qconfig_mapping
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: D40236474