Repository navigation
[ET-VK][codegen] Support nested shader directories - #23720
Closed
pytorchbot wants to merge 1 commit into
Closed
pytorchbot wants to merge 1 commit into
pytorchbot wants to merge 1 commit into
Conversation
Pull Request resolved: #23490 ## Ulterior Motive Reorganize the flat Vulkan shader directory by operator implementation route before landing additional convolution implementations such as Winograd. ## Rationale **What**: Make shader code generation and build discovery preserve nested source paths. **Why**: The generator discovered nested files but identified and emitted them by basename. Repeated basenames overwrote each other, YAML templates were globally keyed, generated files were flattened, and build inputs excluded nested files. ## Details - Shader identity - **Before**: Source, YAML template, generated source, cache, and SPIR-V paths were basename-based. - **After**: Paths are relative to each shader source root and preserve directories through generation and caching. - Includes - **Before**: Cache invalidation resolved includes only from the generated output root. - **After**: Includes resolve from the including shader's directory, then each ancestor directory up to the generated output root, nearest first. `glslc` receives the same include path list, so route subdirectories (e.g. `convolution/conv2d/im2col/`) can share family-level headers (e.g. `convolution/conv2d/conv2d_common.glslh`). - Build discovery - **Before**: Buck and CMake shader filegroups selected only direct children. - **After**: Runtime, test, custom-op, and tool shader filegroups recursively include nested files. Runtime shader registry names remain flat and unchanged. Duplicate runtime shader names now fail during code generation instead of silently overwriting an earlier source. ghstack-source-id: 446951693 @exported-using-ghexport Differential Revision: [D123101914](https://our.internmc.facebook.com/intern/diff/D123101914/)
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/23720
Note: Links to docs will display an error until the docs builds have been completed. This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This branch was successfully deployed
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: #23490 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/657/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/657/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/gh/SS-JIA/669/orig
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/657/orig
Differential Revision: D123101914
@diff-train-skip-merge