Repository navigation
[ET-VK] Add int and bool tensor support for many operators - #15834
Conversation
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #15829 * #15796 * #15795 * #15794 * #15793 Title says it all! Adds `int32` and `uint8` shader variants to a bunch of operators that don't currently have variants for these dtypes, but should. This should prevent folks from running into dtype crashes at runtime when using the Vulkan delegate. Differential Revision: [D87082724](https://our.internmc.facebook.com/intern/diff/D87082724/) Co-authored-by: ssjia <ssjia@devvm1479.ncg0.facebook.com> (cherry picked from commit a6c5921)
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15834
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New Failures, 4 Cancelled Jobs, 1 Unrelated FailureAs of commit cf90786 with merge base e0dda90 ( NEW FAILURES - The following jobs have failed:
CANCELLED JOBS - The following jobs were cancelled. Please retry:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds int32 and uint8 (boolean) tensor dtype support to multiple Vulkan shader operators to prevent runtime dtype crashes when using the Vulkan delegate in ExecuTorch.
- Adds
int32and/oruint8dtype variants to 11 different shader operator configurations - Removes debug/test code from the
concat_texture.glslshader - Enhances dtype coverage across operators for better runtime compatibility
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| repeat_interleave.yaml | Adds int32 and uint8 dtype support |
| repeat_channel.yaml | Adds int32 and uint8 dtype support |
| pad_height_width.yaml | Adds int32 and uint8 dtype support |
| pad_channel.yaml | Adds int32 and uint8 dtype support |
| index_select_channel.yaml | Adds uint8 dtype support |
| index_select.yaml | Adds uint8 dtype support |
| full.yaml | Adds uint8 dtype support |
| expand_buffer.yaml | Adds uint8 dtype support |
| concat_texture.yaml | Adds int32 dtype support only |
| concat_texture.glsl | Removes unused debug/test variables |
| concat_buffer.yaml | Adds int32 dtype support only |
| clone.yaml | Adds int32 and uint8 dtype support |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| DTYPE: | ||
| - VALUE: half | ||
| - VALUE: float | ||
| - VALUE: int32 |
There was a problem hiding this comment.
The concat_texture operator only adds int32 support but not uint8, while most other operators in this PR (e.g., repeat_interleave, repeat_channel, pad_height_width, pad_channel, clone) add both int32 and uint8 support. The GLSL shader code for concat operations appears to be generic and should support uint8. Consider adding uint8 support for consistency.
| - VALUE: int32 | |
| - VALUE: int32 | |
| - VALUE: uint8 |
| DTYPE: | ||
| - VALUE: half | ||
| - VALUE: float | ||
| - VALUE: int32 |
There was a problem hiding this comment.
Similar to concat_texture.yaml, this operator only adds int32 support but not uint8. For consistency with other operators in this PR that add both dtypes, consider adding uint8 support here as well.
| - VALUE: int32 | |
| - VALUE: int32 | |
| - VALUE: uint8 |
Original commit message:
Stack from ghstack (oldest at bottom):
Title says it all!
Adds
int32anduint8shader variants to a bunch of operators that don't currently have variants for these dtypes, but should.This should prevent folks from running into dtype crashes at runtime when using the Vulkan delegate.
Differential Revision:
D87082724
(cherry picked from commit a6c5921)
Summary
[PLEASE REMOVE] See CONTRIBUTING.md's Pull Requests for ExecuTorch PR guidelines.
[PLEASE REMOVE] If this PR closes an issue, please add a
Fixes #<issue-id>line.[PLEASE REMOVE] If this PR introduces a fix or feature that should be the upcoming release notes, please add a "Release notes: " label. For a list of available release notes labels, check out CONTRIBUTING.md's Pull Requests.
Test plan
[PLEASE REMOVE] How did you test this PR? Please write down any manual commands you used and note down tests that you have written if applicable.