[Metal][GPU] Enable metal for simulators and fix test failures if possible (#64322)
authorYuchen Huang <hyc@fb.com>
Wed, 1 Sep 2021 05:00:11 +0000 (22:00 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 1 Sep 2021 05:36:09 +0000 (22:36 -0700)
commit05ecaefbbfa157ad2d6353ef9b2a53892f7ed34c
treebc5e52aef250428fb7a56f7a5294c6a73237241c
parent24e50b8453d861b10e799a3c02cef9d06cf996c6
[Metal][GPU] Enable metal for simulators and fix test failures if possible (#64322)

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

As title
ghstack-source-id: 137143877

Test Plan:
- `aibench-cli mobile`
- Select iOS -> `y` -> `1` -> `n` -> "--metal_op_test"
- Select all iPhone 6 + iPhone 7 + iPhone 8 and a iPhone X or 11 or 12
```
Benchmark Submitted. Find more details at: https://our.intern.facebook.com/intern/aibench/details/318120612514604
Benchmark Status:
        D10 (https://github.com/pytorch/pytorch/commit/b8256280ce45f02a7e105d3b3db4a547990e683d)AP-12.0.1: DONE
        N71mAP-14.3: DONE
DUMMY latency:
        D10 (https://github.com/pytorch/pytorch/commit/b8256280ce45f02a7e105d3b3db4a547990e683d)AP-12.0.1: 4319.3
        N71mAP-14.3: 8868.51
I0831 16:06:27.210558 605277 ClientSingletonManager.cpp:99] Shutting down Manifold ClientSingletonManager
```

Reviewed By: xta0

Differential Revision: D30147163

fbshipit-source-id: 2de6bbd9bd525e32ca92b2845eb435800855edcc
aten/src/ATen/native/metal/MetalContext.mm
aten/src/ATen/native/metal/mpscnn/tests/MetalOpTestRunner.mm