[iOS GPU][Kernel] Implement transpose in Metal shaders (#54522)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/54522
Implement the transpose operator in metal shaders using textures.
ghstack-source-id: 126802125
Test Plan:
- Metal operator tests
```
2021-03-22 02:25:53.941006-0700 PyTorchPlayground[57924:9047121] [bool test_transpose()],[1 2 2 5 ],[SUCCEED]
2021-03-22 02:25:53.949834-0700 PyTorchPlayground[57924:9047121] [bool test_transpose2()],[1 2 58 28 28 ],[SUCCEED]
2021-03-22 03:12:19.786584-0700 PyTorchPlayground[58230:9066223] [bool test_transpose3()],[4 5 6 ],[SUCCEED]
```
- Sandcastle CI
- CircleCI
Reviewed By: SS-JIA
Differential Revision: D27225940
fbshipit-source-id: 14bfb96435a39aecf4f14bc5e2f7232421014328