-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[PyTorch][Vulkan] Allow 0-size tensors to be represented in PyTorch Vulkan #111512
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
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/111512
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (3 Unrelated Failures)As of commit ee668b8 with merge base 675df75 ( 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. |
30d7336 to
a1e19ea
Compare
|
This pull request was exported from Phabricator. Differential Revision: D50030659 |
a1e19ea to
1627793
Compare
|
This pull request was exported from Phabricator. Differential Revision: D50030659 |
1627793 to
22b7ba8
Compare
|
This pull request was exported from Phabricator. Differential Revision: D50030659 |
22b7ba8 to
75c3472
Compare
75c3472 to
f79ba19
Compare
…ulkan (pytorch#111512) Summary: 0-size tensors are allowed in PyTorch (e.g. a tensor with size {2, 1, 0}). However, this currently causes issues with PyTorch Vulkan as the Vulkan API would raise an error when attempting to allocate a resource with no memory. This diff fixes the behaviour by adding support for `VulkanImage` and `VulkanBuffer` objects that do not have any associated memory. Test Plan: Tested locally with `vulkan_api_test` on Mac as a sanity test. ``` buck run //xplat/caffe2:pt_vulkan_api_test_bin --target-platforms ovr_config//platform/macos:x86_64-fbsource -- --gtest_filter="*" ``` But given how foundational of a change this is, more extensive testing should be done in order to be safe. Reviewed By: yipjustin Differential Revision: D50030659
|
This pull request was exported from Phabricator. Differential Revision: D50030659 |
f79ba19 to
ee668b8
Compare
|
This pull request was exported from Phabricator. Differential Revision: D50030659 |
|
@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 |
…ulkan (pytorch#111512) Summary: 0-size tensors are allowed in PyTorch (e.g. a tensor with size {2, 1, 0}). However, this currently causes issues with PyTorch Vulkan as the Vulkan API would raise an error when attempting to allocate a resource with no memory. This diff fixes the behaviour by adding support for `VulkanImage` and `VulkanBuffer` objects that do not have any associated memory. Test Plan: Tested locally with `vulkan_api_test` on Mac as a sanity test. ``` buck run //xplat/caffe2:pt_vulkan_api_test_bin --target-platforms ovr_config//platform/macos:x86_64-fbsource -- --gtest_filter="*" ``` But given how foundational of a change this is, more extensive testing should be done in order to be safe. Reviewed By: yipjustin Differential Revision: D50030659 Pull Request resolved: pytorch#111512 Approved by: https://github.com/yipjustin
Summary:
0-size tensors are allowed in PyTorch (e.g. a tensor with size {2, 1, 0}). However, this currently causes issues with PyTorch Vulkan as the Vulkan API would raise an error when attempting to allocate a resource with no memory.
This diff fixes the behaviour by adding support for
VulkanImageandVulkanBufferobjects that do not have any associated memory.Test Plan:
Tested locally with
vulkan_api_teston Mac as a sanity test.But given how foundational of a change this is, more extensive testing should be done in order to be safe.
Reviewed By: yipjustin
Differential Revision: D50030659