Skip to content

[ET-VK] Add int and bool tensor support for many operators - #15834

Merged
GregoryComer merged 1 commit into
release/1.0from
ssj_cherry_pick
Nov 18, 2025
Merged

GregoryComer merged 1 commit into
release/1.0from
ssj_cherry_pick

Conversation

@SS-JIA

@SS-JIA SS-JIA commented Nov 14, 2025

Copy link
Copy Markdown
Contributor

Original commit message:

Stack from ghstack (oldest at bottom):

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

(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.

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)
@pytorch-bot

pytorch-bot Bot commented Nov 14, 2025 •

Copy link
Copy Markdown

🔗 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 Failure

As of commit cf90786 with merge base e0dda90 (image):

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.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 14, 2025
@SS-JIA SS-JIA changed the title Cherry-pick (PR #15829) [ET-VK] Add int and bool tensor support for many operators Nov 14, 2025
@mergennachin
mergennachin requested a review from Copilot November 17, 2025 15:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 int32 and/or uint8 dtype variants to 11 different shader operator configurations
  • Removes debug/test code from the concat_texture.glsl shader
  • 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

Copilot AI Nov 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- VALUE: int32
- VALUE: int32
- VALUE: uint8

Copilot uses AI. Check for mistakes.
DTYPE:
- VALUE: half
- VALUE: float
- VALUE: int32

Copilot AI Nov 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- VALUE: int32
- VALUE: int32
- VALUE: uint8

Copilot uses AI. Check for mistakes.
@GregoryComer
GregoryComer merged commit 5118de4 into release/1.0 Nov 18, 2025
160 of 175 checks passed
@GregoryComer
GregoryComer deleted the ssj_cherry_pick branch November 18, 2025 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/nightly CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants