pytorch
2e8a9d2b - [iOS GPU] Support multi-dimension tensors via MPSImage (#54106)

Commit
3 years ago
[iOS GPU] Support multi-dimension tensors via MPSImage (#54106) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/54106 The texture size will always be four dimensional. For higher dim tensors, we just fold them to the batch dim. ghstack-source-id: 124113408 Test Plan: - Sandcastle CI - CircleCI - Metal Unit tests ``` 2021-03-16 00:27:30.407417-0700 PyTorchPlayground[16024:6249832] [bool test_synchronization()],[1 3 2 2 ],[SUCCEED] 2021-03-16 00:27:30.440521-0700 PyTorchPlayground[16024:6249832] [bool test_nchw_to_nc4_cpu()],[8 2 154 299 ],[SUCCEED] 2021-03-16 00:27:30.478765-0700 PyTorchPlayground[16024:6249832] [bool test_nchw_to_nc4_cpu()],[11 9 25 319 ],[SUCCEED] 2021-03-16 00:27:30.668841-0700 PyTorchPlayground[16024:6249832] [bool test_nchw_to_nc4_cpu()],[12 14 281 86 ],[SUCCEED] 2021-03-16 00:27:30.820580-0700 PyTorchPlayground[16024:6249832] [bool test_nchw_to_nc4_cpu()],[13 3 308 264 ],[SUCCEED] 2021-03-16 00:27:30.863287-0700 PyTorchPlayground[16024:6249832] [bool test_nchw_to_nc4_cpu()],[8 2 281 213 ],[SUCCEED] 2021-03-16 00:27:30.870941-0700 PyTorchPlayground[16024:6249832] [bool test_copy_nchw_to_metal()],[1 3 224 224 ],[SUCCEED] 2021-03-16 00:27:30.881768-0700 PyTorchPlayground[16024:6249832] [bool test_conv2d()],[4 2 10 258 ],[SUCCEED] 2021-03-16 00:27:30.916943-0700 PyTorchPlayground[16024:6249832] [bool test_conv2d()],[7 9 68 111 ],[SUCCEED] 2021-03-16 00:27:31.011515-0700 PyTorchPlayground[16024:6249832] [bool test_conv2d()],[4 25 186 246 ],[SUCCEED] 2021-03-16 00:27:31.018628-0700 PyTorchPlayground[16024:6249832] [bool test_conv2d()],[5 5 291 25 ],[SUCCEED] 2021-03-16 00:27:31.070833-0700 PyTorchPlayground[16024:6249832] [bool test_conv2d()],[2 38 178 109 ],[SUCCEED] WARNING: Logging before InitGoogleLogging() is written to STDERR W0316 00:27:31.076831 1843703808 TensorImpl.h:965] Warning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (function operator()) 2021-03-16 00:27:31.094476-0700 PyTorchPlayground[16024:6249832] [bool test_depthwiseConv()],[1 32 112 112 ],[SUCCEED] 2021-03-16 00:27:31.097782-0700 PyTorchPlayground[16024:6249832] [bool test_max_pool2d()],[1 3 4 4 ],[SUCCEED] 2021-03-16 00:27:31.109290-0700 PyTorchPlayground[16024:6249832] [bool test_max_pool2d_ceil()],[1 96 55 55 ],[SUCCEED] 2021-03-16 00:27:31.112203-0700 PyTorchPlayground[16024:6249832] [bool test_relu()],[1 3 4 4 ],[SUCCEED] 2021-03-16 00:27:31.116675-0700 PyTorchPlayground[16024:6249832] [bool test_addmm()],[5 120 105 ],[SUCCEED] 2021-03-16 00:27:31.119392-0700 PyTorchPlayground[16024:6249832] [bool test_addmm()],[6 6 84 ],[SUCCEED] 2021-03-16 00:27:31.122741-0700 PyTorchPlayground[16024:6249832] [bool test_addmm()],[5 110 38 ],[SUCCEED] 2021-03-16 00:27:31.125273-0700 PyTorchPlayground[16024:6249832] [bool test_addmm()],[8 116 90 ],[SUCCEED] 2021-03-16 00:27:31.128231-0700 PyTorchPlayground[16024:6249832] [bool test_addmm()],[5 92 123 ],[SUCCEED] 2021-03-16 00:27:31.132546-0700 PyTorchPlayground[16024:6249832] [bool test_add()],[1 180 12 12 ],[SUCCEED] 2021-03-16 00:27:31.138931-0700 PyTorchPlayground[16024:6249832] [bool test_add_broadcast()],[2 17 58 67 ],[SUCCEED] 2021-03-16 00:27:31.145191-0700 PyTorchPlayground[16024:6249832] [bool test_add_broadcast2()],[2 17 1 67 ],[SUCCEED] 2021-03-16 00:27:31.174218-0700 PyTorchPlayground[16024:6249832] [bool test_sub()],[5 3 167 222 ],[SUCCEED] 2021-03-16 00:27:31.182838-0700 PyTorchPlayground[16024:6249832] [bool test_sub_broadcast()],[3 1 1 ],[SUCCEED] 2021-03-16 00:27:31.205262-0700 PyTorchPlayground[16024:6249832] [bool test_sub_broadcast2()],[2 3 3 192 192 ],[SUCCEED] 2021-03-16 00:27:31.227730-0700 PyTorchPlayground[16024:6249832] [bool test_mul()],[2 7 262 119 ],[SUCCEED] 2021-03-16 00:27:31.244125-0700 PyTorchPlayground[16024:6249832] [bool test_mul_broadcast()],[4 3 192 192 ],[SUCCEED] 2021-03-16 00:27:31.250476-0700 PyTorchPlayground[16024:6249832] [bool test_mul_broadcast2()],[1 3 192 192 ],[SUCCEED] 2021-03-16 00:27:31.254482-0700 PyTorchPlayground[16024:6249832] [bool test_div()],[1 3 24 24 ],[SUCCEED] 2021-03-16 00:27:31.258273-0700 PyTorchPlayground[16024:6249832] [bool test_div_broadcast()],[4 3 24 24 ],[SUCCEED] 2021-03-16 00:27:31.259873-0700 PyTorchPlayground[16024:6249832] [bool test_div_broadcast2()],[1 3 24 24 ],[SUCCEED] 2021-03-16 00:27:31.269028-0700 PyTorchPlayground[16024:6249832] [bool test_t()],[109 196 ],[SUCCEED] 2021-03-16 00:27:31.271374-0700 PyTorchPlayground[16024:6249832] [bool test_t()],[82 227 ],[SUCCEED] 2021-03-16 00:27:31.273238-0700 PyTorchPlayground[16024:6249832] [bool test_t()],[33 175 ],[SUCCEED] 2021-03-16 00:27:31.275284-0700 PyTorchPlayground[16024:6249832] [bool test_t()],[13 226 ],[SUCCEED] 2021-03-16 00:27:31.277017-0700 PyTorchPlayground[16024:6249832] [bool test_t()],[7 153 ],[SUCCEED] 2021-03-16 00:27:31.280761-0700 PyTorchPlayground[16024:6249832] [bool test_view()],[1 10 2 2 ],[SUCCEED] 2021-03-16 00:27:31.282833-0700 PyTorchPlayground[16024:6249832] [bool test_view2()],[1 10 2 2 ],[SUCCEED] 2021-03-16 00:27:31.285320-0700 PyTorchPlayground[16024:6249832] [bool test_view3()],[5 8 ],[SUCCEED] 2021-03-16 00:27:31.286929-0700 PyTorchPlayground[16024:6249832] [bool test_view4()],[5 8 ],[SUCCEED] 2021-03-16 00:27:31.515716-0700 PyTorchPlayground[16024:6249832] [bool test_cat_dim0()],[3 9 221 193 ],[SUCCEED] 2021-03-16 00:27:31.520599-0700 PyTorchPlayground[16024:6249832] [bool test_cat_dim0_nonarray()],[1 3 90 77 ],[SUCCEED] 2021-03-16 00:27:32.122259-0700 PyTorchPlayground[16024:6249832] [bool test_cat_dim1_0()],[4 10 271 333 ],[SUCCEED] 2021-03-16 00:27:32.618431-0700 PyTorchPlayground[16024:6249832] [bool test_cat_dim1_1()],[3 11 271 333 ],[SUCCEED] 2021-03-16 00:27:32.621299-0700 PyTorchPlayground[16024:6249832] [bool test_cat_dim1_nonarray_0()],[1 3 22 33 ],[SUCCEED] 2021-03-16 00:27:32.626100-0700 PyTorchPlayground[16024:6249832] [bool test_cat_dim1_nonarray_1()],[1 9 53 67 ],[SUCCEED] 2021-03-16 00:27:32.630042-0700 PyTorchPlayground[16024:6249832] [bool test_softmax()],[2 3 1 1 ],[SUCCEED] 2021-03-16 00:27:32.632536-0700 PyTorchPlayground[16024:6249832] [bool test_sigmoid()],[1 3 4 4 ],[SUCCEED] 2021-03-16 00:27:32.636125-0700 PyTorchPlayground[16024:6249832] [bool test_hardsigmoid()],[3 3 44 44 ],[SUCCEED] 2021-03-16 00:27:32.638887-0700 PyTorchPlayground[16024:6249832] [bool test_hardswish()],[3 3 44 44 ],[SUCCEED] 2021-03-16 00:27:32.646802-0700 PyTorchPlayground[16024:6249832] [bool test_upsampling_nearest2d_vec()],[1 48 24 24 ],[SUCCEED] 2021-03-16 00:27:32.650445-0700 PyTorchPlayground[16024:6249832] [bool test_adaptive_avg_pool2d()],[1 48 24 24 ],[SUCCEED] 2021-03-16 00:27:32.667118-0700 PyTorchPlayground[16024:6249832] [bool test_hardtanh_()],[1 32 112 112 ],[SUCCEED] 2021-03-16 00:27:32.669041-0700 PyTorchPlayground[16024:6249832] [bool test_reshape()],[1 1280 1 1 ],[SUCCEED] ``` Reviewed By: SS-JIA Differential Revision: D27033569 fbshipit-source-id: 0b140a76e0ae2b27b57c0c9efb34a5fa03793c59
Author
Parents
Loading