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
add qnnpack path for hardtanh #35779
Conversation
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: [ghstack-poisoned]
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: b21c33d69aa4100b97dc9e1b488c732f74d0ef7a Pull Request resolved: #35779
💊 Build failures summary and remediationsAs of commit a5d4275 (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following build failures do not appear to be due to upstream breakages: pytorch_linux_backward_compatibility_check_test (1/1)Step: "Test" (full log | pattern match details | 🔁 rerun)
|
test/test_quantized.py
Outdated
dtype=torch_type) | ||
|
||
qY_hat = torch.nn.quantized.functional.hardtanh(qX, min_val, max_val) | ||
self.assertEqual( |
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.
Can we also compare the results against the server implementation? I think we can combine the test for server and mobile for this op.
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.
sure, we can reuse the body of the test, it probably does have to live in a separate wrapper though (check out the specs on class TestQNNPackOps
for motivation)
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.
seems like only a few lines would be able to be reused, so left it as is for now (seemed overkill), but flexible - lmk!
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D20778588](https://our.internmc.facebook.com/intern/diff/D20778588) [ghstack-poisoned]
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D20778588](https://our.internmc.facebook.com/intern/diff/D20778588) [ghstack-poisoned]
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 11c805543082ad2e4f9e1a83df3594a96a0e99d8 Pull Request resolved: #35779
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.
LGTM
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D20778588](https://our.internmc.facebook.com/intern/diff/D20778588) [ghstack-poisoned]
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 1dc64fc6d4fa4b685602e9f35ff7eb69701714fe Pull Request resolved: #35779
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D20778588](https://our.internmc.facebook.com/intern/diff/D20778588) [ghstack-poisoned]
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: db7fb2aaef0707081d40d2c788d7c9ad4899e77f Pull Request resolved: #35779
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D20778588](https://our.internmc.facebook.com/intern/diff/D20778588) [ghstack-poisoned]
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 119e4896c4eccfa99a0d24f6cc27917c6b950e72 Pull Request resolved: #35779
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D20778588](https://our.internmc.facebook.com/intern/diff/D20778588) [ghstack-poisoned]
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: de4b2f262befd2ee83fbd12685bf1093b2ea14da Pull Request resolved: #35779
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D20778588](https://our.internmc.facebook.com/intern/diff/D20778588) [ghstack-poisoned]
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: 790d2993cb28b8cdd3806ea08545c5bbe70d0375 Pull Request resolved: #35779
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D20778588](https://our.internmc.facebook.com/intern/diff/D20778588) [ghstack-poisoned]
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: fdc8e6a4fde1a57a1b5925e3b28a70f1182164c0 Pull Request resolved: #35779
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D20778588](https://our.internmc.facebook.com/intern/diff/D20778588) [ghstack-poisoned]
Summary: Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: b3ce84ced26309c11a31ecb45b7958e62246d46a Pull Request resolved: #35779
This pull request has been merged in faad00a. |
Summary: Pull Request resolved: pytorch#35779 Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Imported from OSS Differential Revision: D20778588 fbshipit-source-id: 537de42e795a9c67924e1acb1d33b370beb9dbf5
Summary: Pull Request resolved: pytorch#35779 Adds a QNNPack path for the clamp kernel, which is useful for hardtanh. Test Plan: python test/test_quantized.py TestQNNPackOps.test_hardtanh Imported from OSS Differential Revision: D20778588 fbshipit-source-id: 537de42e795a9c67924e1acb1d33b370beb9dbf5
Stack from ghstack:
Summary:
Adds a QNNPack path for the clamp kernel, which is useful for
hardtanh.
Test Plan:
python test/test_quantized.py TestQNNPackOps.test_hardtanh
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: D20778588