Adding quantized::conv2d function for pytorch mobile in c10#26152
Adding quantized::conv2d function for pytorch mobile in c10#26152supriyar wants to merge 13 commits intogh/supriyar/15/basefrom
Conversation
Summary: This change adds the support to call QNNPACK using the refactored API for Conv2d operators Test Plan: python test/test_quantized.py TestQNNPackOps.test_qconv_qnnpack Reviewers: Subscribers: Tasks: Tags:
Summary: This change adds the support to call QNNPACK using the refactored API for Conv2d operators Test Plan: python test/test_quantized.py TestQNNPackOps.test_qconv_qnnpack Reviewers: Subscribers: Tasks: Tags:
Summary: This change adds the support to call QNNPACK using the refactored API for Conv2d operators Test Plan: python test/test_quantized.py TestQNNPackOps.test_qconv_qnnpack Reviewers: Subscribers: Tasks: Tags:
dzhulgakov
left a comment
There was a problem hiding this comment.
looking good, some comments
Summary: This change adds the support to call QNNPACK using the refactored API for Conv2d operators Test Plan: python test/test_quantized.py TestQNNPackOps.test_qconv_qnnpack Reviewers: Subscribers: Tasks: Tags:
Summary: This change adds the support to call QNNPACK using the refactored API for Conv2d operators Test Plan: python test/test_quantized.py TestQNNPackOps.test_qconv_qnnpack Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: b33ea74 Pull Request resolved: pytorch#26152
Summary: This change adds the support to call QNNPACK using the refactored API for Conv2d operators Test Plan: python test/test_quantized.py TestQNNPackOps.test_qconv_qnnpack Reviewers: Subscribers: Tasks: Tags:
Summary: This change adds the support to call QNNPACK using the refactored API for Conv2d operators Test Plan: python test/test_quantized.py TestQNNPackOps.test_qconv_qnnpack Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: This change adds the support to call QNNPACK using the refactored API for Conv2d operators Test Plan: python test/test_quantized.py TestQNNPackOps.test_qconv_qnnpack Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: This change adds the support to call QNNPACK using the refactored API for Conv2d operators Test Plan: python test/test_quantized.py TestQNNPackOps.test_qconv_qnnpack Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D17422828](https://our.internmc.facebook.com/intern/diff/D17422828) [ghstack-poisoned]
Summary: This change adds the support to call QNNPACK using the refactored API for Conv2d operators Test Plan: python test/test_quantized.py TestQNNPackOps.test_qconv_qnnpack Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D17422828](https://our.internmc.facebook.com/intern/diff/D17422828) [ghstack-poisoned]
Summary: This change adds the support to call QNNPACK using the refactored API for Conv2d operators Test Plan: python test/test_quantized.py TestQNNPackOps.test_qconv_qnnpack Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D17422828](https://our.internmc.facebook.com/intern/diff/D17422828) [ghstack-poisoned]
Summary: This change adds the support to call QNNPACK using the refactored API for Conv2d operators Test Plan: python test/test_quantized.py TestQNNPackOps.test_qconv_qnnpack Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D17422828](https://our.internmc.facebook.com/intern/diff/D17422828) [ghstack-poisoned]
Summary: This change adds the support to call QNNPACK using the refactored API for Conv2d operators Test Plan: python test/test_quantized.py TestQNNPackOps.test_qconv_qnnpack Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D17422828](https://our.internmc.facebook.com/intern/diff/D17422828) [ghstack-poisoned]
dzhulgakov
left a comment
There was a problem hiding this comment.
I guess one of us would need to rebase depending on whether permute PR lands first or not
| np.testing.assert_equal( | ||
| Y_q_ref2.int_repr().numpy(), Y_q.int_repr().numpy()) | ||
|
|
||
| @given(batch_size=st.integers(1, 3), |
There was a problem hiding this comment.
why do we need separate tests for qnnpack? can't we just use the same set of tests as for fbgemm? (and iterate over available engines in the beginning)
same applies to linear tests above
There was a problem hiding this comment.
Ensuring numeric consistency of QNNPACK and FBGEMM is also a requirement for quantization aware training to work, so it will be good to check that both kernels pass the same tests. For QNNPACK we should also add tests that allow for full use of dynamic range of wts and activations
There was a problem hiding this comment.
Discussed offline. Will merge tests in a different PR.
| Y_scale, | ||
| Y_zp, | ||
| use_relu): | ||
| with enable_mobile_quantized_engine(): |
There was a problem hiding this comment.
nit: I'd rather rename it to a function taking qengine as an argument, but since it's a test - it's minor
raghuramank100
left a comment
There was a problem hiding this comment.
Few comments/questions. Thanks!
Summary: This change adds the support to call QNNPACK using the refactored API for Conv2d operators Test Plan: python test/test_quantized.py TestQNNPackOps.test_qconv_qnnpack Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D17459892](https://our.internmc.facebook.com/intern/diff/D17459892) [ghstack-poisoned]
Summary: Pull Request resolved: pytorch/pytorch#26152 This change adds the support to call QNNPACK using the refactored API for Conv2d operators Test Plan: python test/test_quantized.py TestQNNPackOps.test_qconv_qnnpack Imported from OSS Differential Revision: D17459892 fbshipit-source-id: d20b3e8b81dd403541cb2b9164731448ca229695
|
This pull request has been merged in b23be95. |
…26152) Summary: Pull Request resolved: pytorch#26152 This change adds the support to call QNNPACK using the refactored API for Conv2d operators Test Plan: python test/test_quantized.py TestQNNPackOps.test_qconv_qnnpack Imported from OSS Differential Revision: D17459892 fbshipit-source-id: d20b3e8b81dd403541cb2b9164731448ca229695
Stack from ghstack:
Summary:
This change adds the support to call QNNPACK using the refactored API for Conv2d operators
Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_qnnpack
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: D17459892