[ET-VK] Add Vulkan ops for skin segmentation and EdgeTAM models#17709
Merged
SS-JIA merged 1 commit intogh/SS-JIA/451/basefrom Feb 25, 2026
Merged
[ET-VK] Add Vulkan ops for skin segmentation and EdgeTAM models#17709SS-JIA merged 1 commit intogh/SS-JIA/451/basefrom
SS-JIA merged 1 commit intogh/SS-JIA/451/basefrom
Conversation
Implement several missing Vulkan operators needed to reduce graph fragmentation in the skin segmentation and EdgeTAM models. **Skin segmentation ops:** - aten.where.self: already had C++ and GLSL implementations but was missing the Python partitioner registration. - aten.bitwise_and.Tensor: added as a new binary_op shader variant operating on uint8 (bool) tensors. **EdgeTAM partitioning fixes:** - Comparison ops (eq, lt, le, gt, ge): were registered under the generic BinaryOp features which inherited FP_INT_T as the output dtype set. The partitioner correctly rejected these because their outputs are bool tensors. Split them into a dedicated register_comparison_ops registration with outputs_dtypes=BOOL_T. The binary_op.glsl shader already handles bool output via the IS_COMPARISON_OP path (uint8 storage), so no shader changes are needed. - aten.copy.default: not in the op registry, causing a subgraph break in the first-frame model. This op appears when valid_num_points.to() is called with matching dtype (a no-op cast). Add it to RemoveRedundantOpsTransform so it is eliminated before the partitioner runs. Also register it as an ephemeral op as a fallback. The removal logic requires a _src_arg1_ops set to handle the copy.default(self, src) argument order, where the replacement target is args[1] (src) rather than args[0] (self) as in all other redundant ops. Differential Revision: [D94364641](https://our.internmc.facebook.com/intern/diff/D94364641/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17709
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New FailuresAs of commit 88544f6 with merge base 63f9724 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
manuelcandales
approved these changes
Feb 25, 2026
SS-JIA
pushed a commit
that referenced
this pull request
Feb 25, 2026
Implement several missing Vulkan operators needed to reduce graph fragmentation in the skin segmentation and EdgeTAM models. **Skin segmentation ops:** - aten.where.self: already had C++ and GLSL implementations but was missing the Python partitioner registration. - aten.bitwise_and.Tensor: added as a new binary_op shader variant operating on uint8 (bool) tensors. **EdgeTAM partitioning fixes:** - Comparison ops (eq, lt, le, gt, ge): were registered under the generic BinaryOp features which inherited FP_INT_T as the output dtype set. The partitioner correctly rejected these because their outputs are bool tensors. Split them into a dedicated register_comparison_ops registration with outputs_dtypes=BOOL_T. The binary_op.glsl shader already handles bool output via the IS_COMPARISON_OP path (uint8 storage), so no shader changes are needed. - aten.copy.default: not in the op registry, causing a subgraph break in the first-frame model. This op appears when valid_num_points.to() is called with matching dtype (a no-op cast). Add it to RemoveRedundantOpsTransform so it is eliminated before the partitioner runs. Also register it as an ephemeral op as a fallback. The removal logic requires a _src_arg1_ops set to handle the copy.default(self, src) argument order, where the replacement target is args[1] (src) rather than args[0] (self) as in all other redundant ops. Differential Revision: [D94364641](https://our.internmc.facebook.com/intern/diff/D94364641/) ghstack-source-id: 344667759 Pull Request resolved: #17709
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.
Stack from ghstack (oldest at bottom):
Implement several missing Vulkan operators needed to reduce graph
fragmentation in the skin segmentation and EdgeTAM models.
Skin segmentation ops:
missing the Python partitioner registration.
operating on uint8 (bool) tensors.
EdgeTAM partitioning fixes:
generic BinaryOp features which inherited FP_INT_T as the output
dtype set. The partitioner correctly rejected these because their
outputs are bool tensors. Split them into a dedicated
register_comparison_ops registration with outputs_dtypes=BOOL_T. The
binary_op.glsl shader already handles bool output via the
IS_COMPARISON_OP path (uint8 storage), so no shader changes are
needed.
in the first-frame model. This op appears when valid_num_points.to()
is called with matching dtype (a no-op cast). Add it to
RemoveRedundantOpsTransform so it is eliminated before the partitioner
runs. Also register it as an ephemeral op as a fallback. The removal
logic requires a _src_arg1_ops set to handle the copy.default(self,
src) argument order, where the replacement target is args[1] (src)
rather than args[0] (self) as in all other redundant ops.
Differential Revision: D94364641
cc @manuelcandales @digantdesai @cbilgin