-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Unify quantized conv and linear tests #26992
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: Run the same test for FBGEMM and QNNPACK backends. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear ---------------------------------------------------------------------- Ran 2 tests in 0.108s OK python test/test_quantized.py TestQuantizedConv ---------------------------------------------------------------------- Ran 2 tests in 0.108s OK Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: Run the same test for FBGEMM and QNNPACK backends. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear ---------------------------------------------------------------------- Ran 2 tests in 0.108s OK python test/test_quantized.py TestQuantizedConv ---------------------------------------------------------------------- Ran 2 tests in 0.108s OK Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: Run the same test for FBGEMM and QNNPACK backends. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear ---------------------------------------------------------------------- Ran 2 tests in 0.108s OK python test/test_quantized.py TestQuantizedConv ---------------------------------------------------------------------- Ran 2 tests in 0.108s OK Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: Run the same test for FBGEMM and QNNPACK backends. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear ---------------------------------------------------------------------- Ran 2 tests in 0.108s OK python test/test_quantized.py TestQuantizedConv ---------------------------------------------------------------------- Ran 2 tests in 0.108s OK Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 82b4f7e Pull Request resolved: #26992
Summary: Run the same test for FBGEMM and QNNPACK backends. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear ---------------------------------------------------------------------- Ran 2 tests in 0.108s OK python test/test_quantized.py TestQuantizedConv ---------------------------------------------------------------------- Ran 2 tests in 0.108s OK Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: Run the same test for FBGEMM and QNNPACK backends. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear ---------------------------------------------------------------------- Ran 2 tests in 0.108s OK python test/test_quantized.py TestQuantizedConv ---------------------------------------------------------------------- Ran 2 tests in 0.108s OK Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: Run the same test for FBGEMM and QNNPACK backends. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear ---------------------------------------------------------------------- Ran 2 tests in 0.108s OK python test/test_quantized.py TestQuantizedConv ---------------------------------------------------------------------- Ran 2 tests in 0.108s OK Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 33db9b2 Pull Request resolved: #26992
Summary: Run the same test for FBGEMM and QNNPACK backends. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear ---------------------------------------------------------------------- Ran 2 tests in 0.108s OK python test/test_quantized.py TestQuantizedConv ---------------------------------------------------------------------- Ran 2 tests in 0.108s OK Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: Run the same test for FBGEMM and QNNPACK backends. For op level as well as module level tests. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear python test/test_quantized.py TestQuantizedConv python test/test_quantized_models.py python test/test_quantized_nn_mods.py Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 3810440 Pull Request resolved: #26992
Summary: Run the same test for FBGEMM and QNNPACK backends. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear python test/test_quantized.py TestQuantizedConv python test/test_quantized_models.py python test/test_quantized_nn_mods.py Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: Run the same test for FBGEMM and QNNPACK backends. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear python test/test_quantized.py TestQuantizedConv python test/test_quantized_models.py python test/test_quantized_nn_mods.py Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: Run the same test for FBGEMM and QNNPACK backends. For op level as well as module level tests. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear python test/test_quantized.py TestQuantizedConv python test/test_quantized_models.py python test/test_quantized_nn_mods.py Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 4435ff7 Pull Request resolved: #26992
Summary: Run the same test for FBGEMM and QNNPACK backends. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear python test/test_quantized.py TestQuantizedConv python test/test_quantized_models.py python test/test_quantized_nn_mods.py Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D17689171](https://our.internmc.facebook.com/intern/diff/D17689171) [ghstack-poisoned]
Summary: Run the same test for FBGEMM and QNNPACK backends. For op level as well as module level tests. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear python test/test_quantized.py TestQuantizedConv python test/test_quantized_models.py python test/test_quantized_nn_mods.py Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 4077938 Pull Request resolved: #26992
# Setting target SQNR to be 30 dB so that relative error is 1e-3 below the desired | ||
# output | ||
self.assertGreater(SQNRdB, 30, msg='Quantized model numerics diverge from float, expect SQNR > 30 dB') | ||
for qengine in ["fbgemm", "qnnpack"]: |
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.
Also, this is an integration test, I think you should put this in torch.quantization, but this can be done in a separate PR
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.
# output | ||
self.assertGreater(SQNRdB, 30, msg='Quantized model numerics diverge from float, expect SQNR > 30 dB') | ||
for qengine in ["fbgemm", "qnnpack"]: | ||
if qengine not in torch.backends.quantized.supported_engines: |
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.
Also, shouldn't we use randomized tests to test numerics?
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 haven't modified the test really. Just run the existing test for different qengine.
cc @raghuramank100 for adding randomized tests.
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, some comments are inline
Summary: Run the same test for FBGEMM and QNNPACK backends. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear python test/test_quantized.py TestQuantizedConv python test/test_quantized_models.py python test/test_quantized_nn_mods.py Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D17689171](https://our.internmc.facebook.com/intern/diff/D17689171) [ghstack-poisoned]
Summary: Run the same test for FBGEMM and QNNPACK backends. For op level as well as module level tests. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear python test/test_quantized.py TestQuantizedConv python test/test_quantized_models.py python test/test_quantized_nn_mods.py Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 571a252 Pull Request resolved: #26992
This pull request has been merged in b805b5d. |
Summary: Pull Request resolved: #26992 Run the same test for FBGEMM and QNNPACK backends. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear python test/test_quantized.py TestQuantizedConv python test/test_quantized_models.py python test/test_quantized_nn_mods.py Imported from OSS Differential Revision: D17689171 fbshipit-source-id: e11c0a5e41f5f4e6836a614a5b61e4db3c5e384b
Summary: Pull Request resolved: #26992 Run the same test for FBGEMM and QNNPACK backends. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear python test/test_quantized.py TestQuantizedConv python test/test_quantized_models.py python test/test_quantized_nn_mods.py Imported from OSS Differential Revision: D17689171 fbshipit-source-id: e11c0a5e41f5f4e6836a614a5b61e4db3c5e384b
Summary: Pull Request resolved: #26992 Run the same test for FBGEMM and QNNPACK backends. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear python test/test_quantized.py TestQuantizedConv python test/test_quantized_models.py python test/test_quantized_nn_mods.py Imported from OSS Differential Revision: D17689171 fbshipit-source-id: e11c0a5e41f5f4e6836a614a5b61e4db3c5e384b
Summary: Pull Request resolved: #26992 Run the same test for FBGEMM and QNNPACK backends. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear python test/test_quantized.py TestQuantizedConv python test/test_quantized_models.py python test/test_quantized_nn_mods.py Imported from OSS Differential Revision: D17689171 fbshipit-source-id: e11c0a5e41f5f4e6836a614a5b61e4db3c5e384b
Summary: Pull Request resolved: pytorch#26992 Run the same test for FBGEMM and QNNPACK backends. Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines) Test Plan: python test/test_quantized.py TestQuantizedLinear python test/test_quantized.py TestQuantizedConv python test/test_quantized_models.py python test/test_quantized_nn_mods.py Imported from OSS Differential Revision: D17689171 fbshipit-source-id: e11c0a5e41f5f4e6836a614a5b61e4db3c5e384b
Stack from ghstack:
Summary:
Run the same test for FBGEMM and QNNPACK backends.
Checks that QNNPACK or FBGEMM are supported before running it (using supported_qengines)
Test Plan:
python test/test_quantized.py TestQuantizedLinear
python test/test_quantized.py TestQuantizedConv
python test/test_quantized_models.py
python test/test_quantized_nn_mods.py
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: D17689171