pytorch
d0ff640e - [Pytorch] aten::stack (#103344)

Commit
2 years ago
[Pytorch] aten::stack (#103344) Summary: Stack: https://pytorch.org/docs/stable/generated/torch.stack.html This diff uses `at::unsqueeze` and `at::cat` to implement `at::stack` for all dims Re-organize the tests to 1d, 2d, 3d tensors. 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="*stack*" Restarting Buck daemon because Buck version has changed... Buck daemon started. Parsing buck files: finished in 9.1 sec Creating action graph: finished in 0.7 sec Downloaded 54/3888 artifacts, 27.68 Mbytes, 97.3% cache miss (for updated rules) Building: finished in 07:36.5 min (100%) 2487/2487 jobs, 2487/2487 updated Total time: 07:46.3 min BUILD SUCCEEDED Running main() from xplat/third-party/gmock/googletest-1.12.1/googletest/src/gtest_main.cc Note: Google Test filter = *stack* [==========] Running 4 tests from 1 test suite. [----------] Global test environment set-up. [----------] 4 tests from VulkanAPITest [ RUN ] VulkanAPITest.stack_invalid_inputs [ OK ] VulkanAPITest.stack_invalid_inputs (499 ms) [ RUN ] VulkanAPITest.stack_1d [ OK ] VulkanAPITest.stack_1d (6 ms) [ RUN ] VulkanAPITest.stack_2d [ OK ] VulkanAPITest.stack_2d (12 ms) [ RUN ] VulkanAPITest.stack_3d [ OK ] VulkanAPITest.stack_3d (130 ms) [----------] 4 tests from VulkanAPITest (649 ms total) [----------] Global test environment tear-down [==========] 4 tests from 1 test suite ran. (649 ms total) [ PASSED ] 4 tests. lfq@lfq-mbp fbsource % ``` Reviewed By: yipjustin Differential Revision: D46178424 Pull Request resolved: https://github.com/pytorch/pytorch/pull/103344 Approved by: https://github.com/SS-JIA
Author
Committer
Parents
Loading