pytorch
f49b2f11 - [Pytorch] Add Vulkan support for aten::unsqueeze, 1d->2d, 3d->4d (#102987)

Commit
1 year ago
[Pytorch] Add Vulkan support for aten::unsqueeze, 1d->2d, 3d->4d (#102987) Summary: Re-submitting D46057585 after revert from merge conflict Add 1d->2d, 3d->4d unsqueeze Unsqueeze operator: https://pytorch.org/docs/stable/generated/torch.unsqueeze.html#torch.unsqueeze Test Plan: Unsqueeze tests: ``` lfq@lfq-mbp xplat % buck run --target-platforms ovr_config//platform/macos:arm64-fbsource //xplat/caffe2:pt_vulkan_api_test_binAppleMac\#macosx-arm64 -c pt.vulkan_full_precision=1 -- --gtest_filter="*unsqueeze*" Downloaded 0/44 artifacts, 0.00 bytes, 100.0% cache miss (for updated rules) Building: finished in 38.6 sec (100%) 523/523 jobs, 8/523 updated Total time: 38.6 sec BUILD SUCCEEDED Running main() from xplat/third-party/gmock/googletest-1.12.1/googletest/src/gtest_main.cc Note: Google Test filter = *unsqueeze* [==========] Running 9 tests from 1 test suite. [----------] Global test environment set-up. [----------] 9 tests from VulkanAPITest [ RUN ] VulkanAPITest.unsqueeze_1dto2d_dim0 [ OK ] VulkanAPITest.unsqueeze_1dto2d_dim0 (76 ms) [ RUN ] VulkanAPITest.unsqueeze_1dto2d_dim1 [ OK ] VulkanAPITest.unsqueeze_1dto2d_dim1 (2 ms) [ RUN ] VulkanAPITest.unsqueeze_2dto3d_dim0 [ OK ] VulkanAPITest.unsqueeze_2dto3d_dim0 (9 ms) [ RUN ] VulkanAPITest.unsqueeze_2dto3d_dim1 [ OK ] VulkanAPITest.unsqueeze_2dto3d_dim1 (1 ms) [ RUN ] VulkanAPITest.unsqueeze_2dto3d_dim2 [ OK ] VulkanAPITest.unsqueeze_2dto3d_dim2 (1 ms) [ RUN ] VulkanAPITest.unsqueeze_3dto4d_dim0 [ OK ] VulkanAPITest.unsqueeze_3dto4d_dim0 (2 ms) [ RUN ] VulkanAPITest.unsqueeze_3dto4d_dim1 [ OK ] VulkanAPITest.unsqueeze_3dto4d_dim1 (1 ms) [ RUN ] VulkanAPITest.unsqueeze_3dto4d_dim2 [ OK ] VulkanAPITest.unsqueeze_3dto4d_dim2 (1 ms) [ RUN ] VulkanAPITest.unsqueeze_3dto4d_dim3 [ OK ] VulkanAPITest.unsqueeze_3dto4d_dim3 (1 ms) [----------] 9 tests from VulkanAPITest (98 ms total) [----------] Global test environment tear-down [==========] 9 tests from 1 test suite ran. (98 ms total) [ PASSED ] 9 tests. ``` clang-format on the glsl files Reviewed By: copyrightly Differential Revision: D46375157 Pull Request resolved: https://github.com/pytorch/pytorch/pull/102987 Approved by: https://github.com/SS-JIA
Author
Committer
Parents
Loading