Skip to content

[ET-VK] Enable Dynamic shape support via tensor virtual and physical resizing #122634

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

Closed

Conversation

pytorchbot
Copy link
Collaborator

Summary:

Context

This changeset lays the foundations for supporting dynamic shapes in the ExecuTorch Vulkan delegate via allowing Tensors to be resized in one of two ways:

  1. Discarding underlying vkImage or vkBuffer and reallocating a new vkImage or vkBuffer with updated sizes. This method is intended to be used when the current vkImage or vkBuffer is not large enough to contain the new sizes.
  2. Update the tensor's size metadata without reallocating any new resources. This allows shaders to interpret the underlying vkImage or vkBuffer as if it were smaller than it actually is, and allows command buffers to be preserved when sizes are changed.

Test Plan: Check CI. Tests have also been added to vulkan_compute_api_test that test the two methods of tensor resizing.

Differential Revision: D54728401

…resizing (#121598)

Summary:
## Context

This changeset lays the foundations for supporting dynamic shapes in the ExecuTorch Vulkan delegate via allowing Tensors to be resized in one of two ways:

1. Discarding underlying `vkImage` or `vkBuffer` and reallocating a new `vkImage` or `vkBuffer` with updated sizes. This method is intended to be used when the current `vkImage` or `vkBuffer` is not large enough to contain the new sizes.
2. Update the tensor's size metadata without reallocating any new resources. This allows shaders to interpret the underlying `vkImage` or `vkBuffer` as if it were smaller than it actually is, and allows command buffers to be preserved when sizes are changed.

Test Plan: Check CI. Tests have also been added to `vulkan_compute_api_test` that test the two methods of tensor resizing.

Differential Revision: D54728401

Pull Request resolved: #121598
Approved by: https://github.com/jorgep31415

(cherry picked from commit cc51e10)
Copy link

pytorch-bot bot commented Mar 25, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 621eb79 with merge base 86a2d67 (image):
💚 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 25, 2024
@SS-JIA SS-JIA requested a review from huydhn March 25, 2024 20:20
Copy link
Contributor

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label May 24, 2024
@github-actions github-actions bot closed this Jun 23, 2024
@github-actions github-actions bot deleted the cherry-pick-121598-by-pytorch_bot_bot_ branch July 25, 2024 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants