New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Pytorch][Vulkan] sum.dim_IntList with keepdim #106159
Conversation
Summary: Add Vulkan support for [sum](https://pytorch.org/docs/stable/generated/torch.sum.html).dim_IntList) with `keep_dim=true` [sum.dim_IntList](https://www.internalfb.com/code/fbsource/[49b7951b7eb6]/xplat/caffe2/aten/src/ATen/native/native_functions.yaml?lines=5466) ``` if keepdim is true, the output tensor is of the same size as input except in the dimension(s) dim, where it is of size 1 otherwise, the dim is squeezed, result in the output tensor having 1 fewer dimension/s. ``` Test Plan: ``` lfq@lfq-mbp fbsource % 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="*.sum*" Action graph will be rebuilt because files have been added or removed. Parsing buck files: finished in 1.4 sec Downloaded 4/58 artifacts, 3.08 Mbytes, 50.0% cache miss (for updated rules) Building: finished in 41.2 sec (100%) 536/536 jobs, 13/536 updated Total time: 42.8 sec BUILD SUCCEEDED Running main() from third-party/googletest/1.11.0/googletest/googletest/src/gtest_main.cc Note: Google Test filter = *.sum* [==========] Running 6 tests from 1 test suite. [----------] Global test environment set-up. [----------] 6 tests from VulkanAPITest [ RUN ] VulkanAPITest.sum_dim_2d [ OK ] VulkanAPITest.sum_dim_2d (558 ms) [ RUN ] VulkanAPITest.sum_dim_3d [ OK ] VulkanAPITest.sum_dim_3d (7 ms) [ RUN ] VulkanAPITest.sum_dim_4d [ OK ] VulkanAPITest.sum_dim_4d (14 ms) [ RUN ] VulkanAPITest.sum_dim_keepdim_2d [ OK ] VulkanAPITest.sum_dim_keepdim_2d (4 ms) [ RUN ] VulkanAPITest.sum_dim_keepdim_3d [ OK ] VulkanAPITest.sum_dim_keepdim_3d (7 ms) [ RUN ] VulkanAPITest.sum_dim_keepdim_4d [ OK ] VulkanAPITest.sum_dim_keepdim_4d (18 ms) [----------] 6 tests from VulkanAPITest (612 ms total) [----------] Global test environment tear-down [==========] 6 tests from 1 test suite ran. (612 ms total) [ PASSED ] 6 tests. ``` Reviewed By: SS-JIA Differential Revision: D47652931 fbshipit-source-id: 62ce3a217338770e0401a7779c60661ac1067045
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/106159
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 8382227: NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D47652931 |
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Summary: Add Vulkan support for [sum](https://pytorch.org/docs/stable/generated/torch.sum.html).dim_IntList) with `keep_dim=true` [sum.dim_IntList](https://www.internalfb.com/code/fbsource/[49b7951b7eb6]/xplat/caffe2/aten/src/ATen/native/native_functions.yaml?lines=5466) ``` if keepdim is true, the output tensor is of the same size as input except in the dimension(s) dim, where it is of size 1 otherwise, the dim is squeezed, result in the output tensor having 1 fewer dimension/s. ``` Test Plan: ``` lfq@lfq-mbp fbsource % 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="*.sum*" Action graph will be rebuilt because files have been added or removed. Parsing buck files: finished in 1.4 sec Downloaded 4/58 artifacts, 3.08 Mbytes, 50.0% cache miss (for updated rules) Building: finished in 41.2 sec (100%) 536/536 jobs, 13/536 updated Total time: 42.8 sec BUILD SUCCEEDED Running main() from third-party/googletest/1.11.0/googletest/googletest/src/gtest_main.cc Note: Google Test filter = *.sum* [==========] Running 6 tests from 1 test suite. [----------] Global test environment set-up. [----------] 6 tests from VulkanAPITest [ RUN ] VulkanAPITest.sum_dim_2d [ OK ] VulkanAPITest.sum_dim_2d (558 ms) [ RUN ] VulkanAPITest.sum_dim_3d [ OK ] VulkanAPITest.sum_dim_3d (7 ms) [ RUN ] VulkanAPITest.sum_dim_4d [ OK ] VulkanAPITest.sum_dim_4d (14 ms) [ RUN ] VulkanAPITest.sum_dim_keepdim_2d [ OK ] VulkanAPITest.sum_dim_keepdim_2d (4 ms) [ RUN ] VulkanAPITest.sum_dim_keepdim_3d [ OK ] VulkanAPITest.sum_dim_keepdim_3d (7 ms) [ RUN ] VulkanAPITest.sum_dim_keepdim_4d [ OK ] VulkanAPITest.sum_dim_keepdim_4d (18 ms) [----------] 6 tests from VulkanAPITest (612 ms total) [----------] Global test environment tear-down [==========] 6 tests from 1 test suite ran. (612 ms total) [ PASSED ] 6 tests. ``` Reviewed By: SS-JIA Differential Revision: D47652931 Pull Request resolved: pytorch#106159 Approved by: https://github.com/SS-JIA
Summary:
Add Vulkan support for sum.dim_IntList) with
keep_dim=true
sum.dim_IntList
Test Plan:
Reviewed By: SS-JIA
Differential Revision: D47652931