-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[pytorch-vulkan] slices to support zero-size output #112879
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
Conversation
Summary: With D50030659, we are able to support zero-size tensor. Hence remove the check in slice. Also update related tests. Test Plan: ``` [yipjustin@189650.od ~/fbsource (876ab81e3)]$ LD_LIBRARY_PATH=third-party/swiftshader/lib/linux-x64/ buck2 run fbcode/mode/dev-nosan //xplat/caffe2:pt_vulkan_api_test_bin -- --gtest_filter="*slice*" File changed: fbsource//xplat/caffe2/aten/src/ATen/test/vulkan_api_test.cpp File changed: fbcode//caffe2/aten/src/ATen/test/vulkan_api_test.cpp File changed: fbcode//caffe2/aten/src/ATen/native/vulkan/ops/Slice.cpp 1 additional file change events Buck UI: https://www.internalfb.com/buck2/85adf6a3-7d17-4685-8d8b-a0b600df0b73 Network: Up: 44KiB Down: 1.3MiB (reSessionID-5afd53d4-0303-4f4d-a245-1eb810308fd3) Jobs completed: 6. Time elapsed: 22.8s. Cache hits: 0%. Commands: 2 (cached: 0, remote: 1, local: 1) BUILD SUCCEEDED Running main() from third-party/googletest/1.11.0/googletest/googletest/src/gtest_main.cc Note: Google Test filter = *slice* [==========] Running 6 tests from 1 test suite. [----------] Global test environment set-up. [----------] 6 tests from VulkanAPITest [ RUN ] VulkanAPITest.slice_width_success [ OK ] VulkanAPITest.slice_width_success (160 ms) [ RUN ] VulkanAPITest.slice_height_success [ OK ] VulkanAPITest.slice_height_success (6 ms) [ RUN ] VulkanAPITest.slice_feature_success [ OK ] VulkanAPITest.slice_feature_success (84 ms) [ RUN ] VulkanAPITest.slice_batch_success [ OK ] VulkanAPITest.slice_batch_success (5 ms) [ RUN ] VulkanAPITest.slice_zero_sized [ OK ] VulkanAPITest.slice_zero_sized (0 ms) [ RUN ] VulkanAPITest.slice_invalidinputs_exceptions [ OK ] VulkanAPITest.slice_invalidinputs_exceptions (0 ms) [----------] 6 tests from VulkanAPITest (257 ms total) [----------] Global test environment tear-down [==========] 6 tests from 1 test suite ran. (257 ms total) [ PASSED ] 6 tests. ``` Differential Revision: D50961979
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/112879
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (2 Unrelated Failures)As of commit 5afe905 with merge base 2c3ab60 ( FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D50961979 |
|
@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: With D50030659, we are able to support zero-size tensor. Hence remove the check in slice. Also update related tests. Test Plan: ``` [yipjustin@189650.od ~/fbsource (876ab81e3)]$ LD_LIBRARY_PATH=third-party/swiftshader/lib/linux-x64/ buck2 run fbcode/mode/dev-nosan //xplat/caffe2:pt_vulkan_api_test_bin -- --gtest_filter="*slice*" File changed: fbsource//xplat/caffe2/aten/src/ATen/test/vulkan_api_test.cpp File changed: fbcode//caffe2/aten/src/ATen/test/vulkan_api_test.cpp File changed: fbcode//caffe2/aten/src/ATen/native/vulkan/ops/Slice.cpp 1 additional file change events Buck UI: https://www.internalfb.com/buck2/85adf6a3-7d17-4685-8d8b-a0b600df0b73 Network: Up: 44KiB Down: 1.3MiB (reSessionID-5afd53d4-0303-4f4d-a245-1eb810308fd3) Jobs completed: 6. Time elapsed: 22.8s. Cache hits: 0%. Commands: 2 (cached: 0, remote: 1, local: 1) BUILD SUCCEEDED Running main() from third-party/googletest/1.11.0/googletest/googletest/src/gtest_main.cc Note: Google Test filter = *slice* [==========] Running 6 tests from 1 test suite. [----------] Global test environment set-up. [----------] 6 tests from VulkanAPITest [ RUN ] VulkanAPITest.slice_width_success [ OK ] VulkanAPITest.slice_width_success (160 ms) [ RUN ] VulkanAPITest.slice_height_success [ OK ] VulkanAPITest.slice_height_success (6 ms) [ RUN ] VulkanAPITest.slice_feature_success [ OK ] VulkanAPITest.slice_feature_success (84 ms) [ RUN ] VulkanAPITest.slice_batch_success [ OK ] VulkanAPITest.slice_batch_success (5 ms) [ RUN ] VulkanAPITest.slice_zero_sized [ OK ] VulkanAPITest.slice_zero_sized (0 ms) [ RUN ] VulkanAPITest.slice_invalidinputs_exceptions [ OK ] VulkanAPITest.slice_invalidinputs_exceptions (0 ms) [----------] 6 tests from VulkanAPITest (257 ms total) [----------] Global test environment tear-down [==========] 6 tests from 1 test suite ran. (257 ms total) [ PASSED ] 6 tests. ``` Differential Revision: D50961979 Pull Request resolved: pytorch#112879 Approved by: https://github.com/manuelcandales
Summary: With D50030659, we are able to support zero-size tensor. Hence remove the check in slice. Also update related tests. Test Plan: ``` [yipjustin@189650.od ~/fbsource (876ab81e3)]$ LD_LIBRARY_PATH=third-party/swiftshader/lib/linux-x64/ buck2 run fbcode/mode/dev-nosan //xplat/caffe2:pt_vulkan_api_test_bin -- --gtest_filter="*slice*" File changed: fbsource//xplat/caffe2/aten/src/ATen/test/vulkan_api_test.cpp File changed: fbcode//caffe2/aten/src/ATen/test/vulkan_api_test.cpp File changed: fbcode//caffe2/aten/src/ATen/native/vulkan/ops/Slice.cpp 1 additional file change events Buck UI: https://www.internalfb.com/buck2/85adf6a3-7d17-4685-8d8b-a0b600df0b73 Network: Up: 44KiB Down: 1.3MiB (reSessionID-5afd53d4-0303-4f4d-a245-1eb810308fd3) Jobs completed: 6. Time elapsed: 22.8s. Cache hits: 0%. Commands: 2 (cached: 0, remote: 1, local: 1) BUILD SUCCEEDED Running main() from third-party/googletest/1.11.0/googletest/googletest/src/gtest_main.cc Note: Google Test filter = *slice* [==========] Running 6 tests from 1 test suite. [----------] Global test environment set-up. [----------] 6 tests from VulkanAPITest [ RUN ] VulkanAPITest.slice_width_success [ OK ] VulkanAPITest.slice_width_success (160 ms) [ RUN ] VulkanAPITest.slice_height_success [ OK ] VulkanAPITest.slice_height_success (6 ms) [ RUN ] VulkanAPITest.slice_feature_success [ OK ] VulkanAPITest.slice_feature_success (84 ms) [ RUN ] VulkanAPITest.slice_batch_success [ OK ] VulkanAPITest.slice_batch_success (5 ms) [ RUN ] VulkanAPITest.slice_zero_sized [ OK ] VulkanAPITest.slice_zero_sized (0 ms) [ RUN ] VulkanAPITest.slice_invalidinputs_exceptions [ OK ] VulkanAPITest.slice_invalidinputs_exceptions (0 ms) [----------] 6 tests from VulkanAPITest (257 ms total) [----------] Global test environment tear-down [==========] 6 tests from 1 test suite ran. (257 ms total) [ PASSED ] 6 tests. ``` Differential Revision: D50961979 Pull Request resolved: pytorch#112879 Approved by: https://github.com/manuelcandales
Summary: With D50030659, we are able to support zero-size tensor. Hence remove the check in slice. Also update related tests.
Test Plan:
Differential Revision: D50961979