[ET-VK] Add supports_highdim field to OpFeatures#17356
Merged
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17356
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 17 PendingAs of commit 78dfdd4 with merge base bc3b703 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Previously, dtype validation for Vulkan operators was scattered across individual node-checking functions (e.g., `check_to_copy_node` had inline float16/float32 checks). This made it difficult to see at a glance which dtypes each operator supports. This diff introduces a centralized dtype constraint system: - `utils.py`: Adds dtype set constants (`FP_T`, `INT_T`, `FP_INT32_T`, `FP_INT32_BOOL_T`, etc.) and a `DtypeSetList` wrapper class with broadcasting semantics. The `check_node_dtypes()` function validates tensor inputs/outputs against allowed dtype sets and returns descriptive error messages. - `op_registry.py`: Extends `OpFeatures` with `inputs_dtypes` and `outputs_dtypes` parameters. Each operator registration now explicitly declares its supported dtypes. Simplified node-checking functions like `check_to_copy_node` since dtype logic is now handled declaratively. - `vulkan_partitioner.py`: Calls `features.check_dtypes()` early in validation, failing fast with a clear skip reason if dtypes are invalid. This approach improves maintainability by making dtype support explicit and centralizing the validation logic. Authored with assistance from Claude. Differential Revision: [D92740295](https://our.internmc.facebook.com/intern/diff/D92740295/) ghstack-source-id: 339885885 Pull Request resolved: #17336
fac8492 to
78dfdd4
Compare
SS-JIA
approved these changes
Feb 11, 2026
4066d7f to
78dfdd4
Compare
This PR needs a
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #17337 by @SS-JIA
^ Please use this as the source of truth for the PR details, comments, and reviews
ghstack PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/415/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/415/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/414/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/415/orig
Differential Revision: D92740294
@diff-train-skip-merge