[ET-VK] Modernize permute op with safe indexing and unified dispatch#18510
[ET-VK] Modernize permute op with safe indexing and unified dispatch#18510SS-JIA wants to merge 1 commit intogh/SS-JIA/509/basefrom
Conversation
Modernize the permute operator to follow current best practices, fixing an Adreno 740 driver crash caused by dynamic UBO indexing in the texture shader. Texture shader changes: - Replace old indexing_utils.h with indexing.glslh - Use TextureMetadata UBOs instead of push constant sizes - Use texture_pos_to_tensor4d_idx_simple() and related helpers - Replace permute_dims[out_packed_dim] with safe_idx() to avoid dynamic indexing of push constant with spec-const-derived index - Use TextureElementIndex pattern for the slow path C++ dispatch changes: - Merge add_permute_node() and add_permute_buffer_node() into a single unified function using graph.meta_ubo() and conditional logic - Remove unused channel_info computation - Move WHCNPermuteDims struct into anonymous namespace - Guard texture path with VK_CHECK_COND(permute_ndim <= 4) Differential Revision: [D98220451](https://our.internmc.facebook.com/intern/diff/D98220451/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18510
Note: Links to docs will display an error until the docs builds have been completed. ❌ 9 New Failures, 2 Unrelated FailuresAs of commit 672416e with merge base 8f1b5ee ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
Stack from ghstack (oldest at bottom):
Modernize the permute operator to follow current best practices, fixing an
Adreno 740 driver crash caused by dynamic UBO indexing in the texture shader.
Texture shader changes:
dynamic indexing of push constant with spec-const-derived index
C++ dispatch changes:
unified function using graph.meta_ubo() and conditional logic
Differential Revision: D98220451