Skip to content

Conversation

supriyar
Copy link
Contributor

@supriyar supriyar commented Sep 27, 2019

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

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]
@pytorchbot pytorchbot added oncall: quantization Quantization support in PyTorch module: tests Issues related to tests (not the torch.testing module) labels Sep 27, 2019
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]
supriyar added a commit that referenced this pull request Sep 27, 2019
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]
supriyar added a commit that referenced this pull request Sep 28, 2019
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]
supriyar added a commit that referenced this pull request Sep 30, 2019
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]
supriyar added a commit that referenced this pull request Oct 1, 2019
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
@supriyar supriyar requested a review from dskhudia October 1, 2019 01:17
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]
supriyar added a commit that referenced this pull request Oct 1, 2019
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"]:
Copy link
Contributor

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

Copy link
Contributor Author

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:
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@jerryzh168 jerryzh168 left a 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]
supriyar added a commit that referenced this pull request Oct 1, 2019
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
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in b805b5d.

jamesr66a pushed a commit that referenced this pull request Oct 3, 2019
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
jamesr66a pushed a commit that referenced this pull request Oct 4, 2019
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
jamesr66a pushed a commit that referenced this pull request Oct 4, 2019
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
soumith pushed a commit that referenced this pull request Oct 7, 2019
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
@facebook-github-bot facebook-github-bot deleted the gh/supriyar/25/head branch October 28, 2019 22:21
pdlive215 pushed a commit to pdlive215/pytorch that referenced this pull request Nov 27, 2019
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: tests Issues related to tests (not the torch.testing module) oncall: quantization Quantization support in PyTorch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants