[iOS][GPU] Consolidate array and non-array kernel for hardswish (#63369)
authorYuchen Huang <hyc@fb.com>
Sat, 28 Aug 2021 01:57:22 +0000 (18:57 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Sat, 28 Aug 2021 02:31:08 +0000 (19:31 -0700)
commita3a7a67048c11ee74fbdd54037a6dbaf90367964
treed61f8cf34d962b2d2f1aea33572405fcd71915cf
parent9ccb9299e072bb611fc67169e6f0d1fb9e49bedd
[iOS][GPU] Consolidate array and non-array kernel for hardswish (#63369)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63369

ghstack-source-id: 136918152

(Note: this ignores all push blocking failures!)

Test Plan:
- `buck test pp-macos`
- Op tests in PyTorchPlayground app
- Run mobilenetv3 test

https://pxl.cl/1Ncls

Reviewed By: xta0

Differential Revision: D30354454

fbshipit-source-id: 88bf4f8b5871e63170161b3f3e44f99b8a3086c6
aten/src/ATen/native/metal/MetalShaders.h
aten/src/ATen/native/metal/mpscnn/tests/MPSCNNTests.h
aten/src/ATen/native/metal/mpscnn/tests/MPSCNNTests.mm
aten/src/ATen/native/metal/mpscnn/tests/MetalOpTestRunner.mm
aten/src/ATen/native/metal/ops/MetalHardswish.mm