[ET-VK] Add ANY_STORAGE support to repeat#18056
Open
SS-JIA wants to merge 4 commits intogh/SS-JIA/473/basefrom
Open
[ET-VK] Add ANY_STORAGE support to repeat#18056SS-JIA wants to merge 4 commits intogh/SS-JIA/473/basefrom
SS-JIA wants to merge 4 commits intogh/SS-JIA/473/basefrom
Conversation
Add a buffer shader variant for the repeat operator and rewrite the C++ dispatch code to support both buffer and texture storage types. Key changes: - Add repeat_buffer.glsl/.yaml: a new buffer-path compute shader that uses BufferMetadata UBOs and linear index arithmetic to map each output element to its source element via modulo on each dimension. - Rename repeat.glsl/.yaml to repeat_texture.glsl/.yaml (shader variant name repeat_texture3d) and update the push constant from dst_repeats to out_dims, computing out_channel_size directly from output dimensions rather than from input size * repeat count. - Rewrite Repeat.cpp: remove the old check_args() function and pre-computed ivec4 push constants. Add resize_repeat_node() that uses extract_int_or_symint_list() to dynamically compute output sizes from input sizes and repeats, enabling dynamic shape support. Dispatch uses add_storage_type_suffix for shader selection, with the buffer path using meta_ubo UBOs and the texture path using push constants from logical_limits_pc_of/sizes_pc_of. Wire resize_repeat_node into DynamicDispatchNode. - Update op_registry.py: change inputs_storage from ANY_TEXTURE to ANY_STORAGE. - Update test cases: add utils::kBuffer to storage_types for both 2d and 3d repeat test suites. Differential Revision: [D95970170](https://our.internmc.facebook.com/intern/diff/D95970170/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18056
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New Failures, 2 Unrelated FailuresAs of commit c087102 with merge base 8a285b7 ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
This was referenced Mar 10, 2026
added 3 commits
March 11, 2026 09:52
Add a buffer shader variant for the repeat operator and rewrite the C++ dispatch code to support both buffer and texture storage types. Key changes: - Add repeat_buffer.glsl/.yaml: a new buffer-path compute shader that uses BufferMetadata UBOs and linear index arithmetic to map each output element to its source element via modulo on each dimension. - Rename repeat.glsl/.yaml to repeat_texture.glsl/.yaml (shader variant name repeat_texture3d) and update the push constant from dst_repeats to out_dims, computing out_channel_size directly from output dimensions rather than from input size * repeat count. - Rewrite Repeat.cpp: remove the old check_args() function and pre-computed ivec4 push constants. Add resize_repeat_node() that uses extract_int_or_symint_list() to dynamically compute output sizes from input sizes and repeats, enabling dynamic shape support. Dispatch uses add_storage_type_suffix for shader selection, with the buffer path using meta_ubo UBOs and the texture path using push constants from logical_limits_pc_of/sizes_pc_of. Wire resize_repeat_node into DynamicDispatchNode. - Update op_registry.py: change inputs_storage from ANY_TEXTURE to ANY_STORAGE. - Update test cases: add utils::kBuffer to storage_types for both 2d and 3d repeat test suites. Differential Revision: [D95970170](https://our.internmc.facebook.com/intern/diff/D95970170/) [ghstack-poisoned]
Add a buffer shader variant for the repeat operator and rewrite the C++ dispatch code to support both buffer and texture storage types. Key changes: - Add repeat_buffer.glsl/.yaml: a new buffer-path compute shader that uses BufferMetadata UBOs and linear index arithmetic to map each output element to its source element via modulo on each dimension. - Rename repeat.glsl/.yaml to repeat_texture.glsl/.yaml (shader variant name repeat_texture3d) and update the push constant from dst_repeats to out_dims, computing out_channel_size directly from output dimensions rather than from input size * repeat count. - Rewrite Repeat.cpp: remove the old check_args() function and pre-computed ivec4 push constants. Add resize_repeat_node() that uses extract_int_or_symint_list() to dynamically compute output sizes from input sizes and repeats, enabling dynamic shape support. Dispatch uses add_storage_type_suffix for shader selection, with the buffer path using meta_ubo UBOs and the texture path using push constants from logical_limits_pc_of/sizes_pc_of. Wire resize_repeat_node into DynamicDispatchNode. - Update op_registry.py: change inputs_storage from ANY_TEXTURE to ANY_STORAGE. - Update test cases: add utils::kBuffer to storage_types for both 2d and 3d repeat test suites. Differential Revision: [D95970170](https://our.internmc.facebook.com/intern/diff/D95970170/) [ghstack-poisoned]
Add a buffer shader variant for the repeat operator and rewrite the C++ dispatch code to support both buffer and texture storage types. Key changes: - Add repeat_buffer.glsl/.yaml: a new buffer-path compute shader that uses BufferMetadata UBOs and linear index arithmetic to map each output element to its source element via modulo on each dimension. - Rename repeat.glsl/.yaml to repeat_texture.glsl/.yaml (shader variant name repeat_texture3d) and update the push constant from dst_repeats to out_dims, computing out_channel_size directly from output dimensions rather than from input size * repeat count. - Rewrite Repeat.cpp: remove the old check_args() function and pre-computed ivec4 push constants. Add resize_repeat_node() that uses extract_int_or_symint_list() to dynamically compute output sizes from input sizes and repeats, enabling dynamic shape support. Dispatch uses add_storage_type_suffix for shader selection, with the buffer path using meta_ubo UBOs and the texture path using push constants from logical_limits_pc_of/sizes_pc_of. Wire resize_repeat_node into DynamicDispatchNode. - Update op_registry.py: change inputs_storage from ANY_TEXTURE to ANY_STORAGE. - Update test cases: add utils::kBuffer to storage_types for both 2d and 3d repeat test suites. Differential Revision: [D95970170](https://our.internmc.facebook.com/intern/diff/D95970170/) [ghstack-poisoned]
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):
Add a buffer shader variant for the repeat operator and rewrite the C++
dispatch code to support both buffer and texture storage types. Key changes:
BufferMetadata UBOs and linear index arithmetic to map each output element
to its source element via modulo on each dimension.
repeat_texture3d) and update the push constant from dst_repeats to out_dims,
computing out_channel_size directly from output dimensions rather than from
input size * repeat count.
ivec4 push constants. Add resize_repeat_node() that uses
extract_int_or_symint_list() to dynamically compute output sizes from input
sizes and repeats, enabling dynamic shape support. Dispatch uses
add_storage_type_suffix for shader selection, with the buffer path using
meta_ubo UBOs and the texture path using push constants from
logical_limits_pc_of/sizes_pc_of. Wire resize_repeat_node into
DynamicDispatchNode.
repeat test suites.
Differential Revision: D95970170