pytorch
f2127bbf - [PyTorch] Add Vulkan support and tests for at::upsample_bilinear2d (#98022)

Commit
1 year ago
[PyTorch] Add Vulkan support and tests for at::upsample_bilinear2d (#98022) Summary: Bilinear upsampling is a [4D tensor upsampling operation](https://pytorch.org/docs/stable/generated/torch.nn.Upsample.html), this adds support for the operation on the Vulkan GPU backend. Test Plan: 1. `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` on Apple M1 MacBook 2. Confirm all tests pass with no regression, and the added tests `*upsample_bilinear2d*` pass 2a. All tests P669847383 2b. `upsample_bilinear2d` tests P669866631 3. Overview: ``` ... [ RUN ] VulkanAPITest.upsample_bilinear2d_align_false_small [ OK ] VulkanAPITest.upsample_bilinear2d_align_false_small (1 ms) [ RUN ] VulkanAPITest.upsample_bilinear2d_align_false_large [ OK ] VulkanAPITest.upsample_bilinear2d_align_false_large (2 ms) [ RUN ] VulkanAPITest.upsample_bilinear2d_align_true_small [ OK ] VulkanAPITest.upsample_bilinear2d_align_true_small (2 ms) [ RUN ] VulkanAPITest.upsample_bilinear2d_align_true_large [ OK ] VulkanAPITest.upsample_bilinear2d_align_true_large (1 ms) ... [==========] 209 tests from 1 test suite ran. (6317 ms total) [ PASSED ] 201 tests. [ SKIPPED ] 1 test, listed below: [ SKIPPED ] VulkanAPITest.querypool_flushed_shader_log [ FAILED ] 7 tests, listed below: [ FAILED ] VulkanAPITest.cat_dim1_singledepth_success [ FAILED ] VulkanAPITest.gru_success [ FAILED ] VulkanAPITest.gru_mclareninputs_success [ FAILED ] VulkanAPITest.gru_prepack_success [ FAILED ] VulkanAPITest.lstm_success [ FAILED ] VulkanAPITest.lstm_mclareninputs_success [ FAILED ] VulkanAPITest.lstm_prepack_success ``` Differential Revision: D43142564 Pull Request resolved: https://github.com/pytorch/pytorch/pull/98022 Approved by: https://github.com/SS-JIA
Author
Committer
Parents
Loading