Skip to content
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] Add Vulkan support and tests for at::upsample_bilinear2d #98022

Closed
wants to merge 1 commit into from

Conversation

liuk22
Copy link
Contributor

@liuk22 liuk22 commented Mar 30, 2023

Summary: Bilinear upsampling is a 4D tensor upsampling operation, 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

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 30, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/98022

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 4f73c5e:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the release notes: vulkan release notes category label Mar 30, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D43142564

@SS-JIA SS-JIA self-requested a review March 30, 2023 21:43
…ytorch#98022)

Summary:
Pull Request resolved: pytorch#98022

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
```

Reviewed By: SS-JIA

Differential Revision: D43142564

fbshipit-source-id: 39931862c2700e69562565042e2f9e92a262f276
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D43142564

@facebook-github-bot
Copy link
Contributor

@pytorchbot merge

(Initiating merge automatically since Phabricator Diff has merged)

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Mar 31, 2023
@facebook-github-bot
Copy link
Contributor

@pytorchbot merge

(Initiating merge automatically since Phabricator Diff has merged)

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request fb-exported Merged release notes: vulkan release notes category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants