[ET-VK][codegen][fix] Split codegen and SPIR-V compilation into separate steps in gen_vulkan_spv#11823
Conversation
…ate steps in gen_vulkan_spv ## Changes * As title * Also removed caching mechanism for the codegen step for simplicity, and ad hoc latency testing didn't reveal any improvements from caching this step ## Motivation As written, gen_vulkan_spv has a potential bug where generated header files are out of date when SPIR-V compilation occurs. Due to the parallelization of SPIR-V compilation, it's possible for a generated GLSL file to be processed before header files that it uses are generated. The fix is to separate the steps of code generation and SPIR-V compilation, such that code generation finished before SPIR-V compilation occurs. Differential Revision: [D77034022](https://our.internmc.facebook.com/intern/diff/D77034022/) [ghstack-poisoned]
…ate steps in gen_vulkan_spv ## Changes * As title * Also removed caching mechanism for the codegen step for simplicity, and ad hoc latency testing didn't reveal any improvements from caching this step ## Motivation As written, gen_vulkan_spv has a potential bug where generated header files are out of date when SPIR-V compilation occurs. Due to the parallelization of SPIR-V compilation, it's possible for a generated GLSL file to be processed before header files that it uses are generated. The fix is to separate the steps of code generation and SPIR-V compilation, such that code generation finished before SPIR-V compilation occurs. Differential Revision: [D77034022](https://our.internmc.facebook.com/intern/diff/D77034022/) ghstack-source-id: 291681597 Pull Request resolved: #11823
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/11823
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit cc52ea1 with merge base 496cb05 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D77034022 |
This PR needs a
|
6d569c2
into
gh/SS-JIA/244/base
…ate steps in gen_vulkan_spv (#11829) This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: #11823 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/244/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/244/head Merge bot PR base: https://github.com/pytorch/executorch/tree/main Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/244/orig @diff-train-skip-merge cc @SS-JIA @manuelcandales @cbilgin Co-authored-by: Stephen Jia <ssjia@meta.com>
…ate steps in gen_vulkan_spv (pytorch#11829) This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: pytorch#11823 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/244/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/244/head Merge bot PR base: https://github.com/pytorch/executorch/tree/main Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/244/orig @diff-train-skip-merge cc @SS-JIA @manuelcandales @cbilgin Co-authored-by: Stephen Jia <ssjia@meta.com>
Stack from ghstack (oldest at bottom):
Changes
Motivation
As written, gen_vulkan_spv has a potential bug where generated header files are out of date when SPIR-V compilation occurs. Due to the parallelization of SPIR-V compilation, it's possible for a generated GLSL file to be processed before header files that it uses are generated.
The fix is to separate the steps of code generation and SPIR-V compilation, such that code generation finished before SPIR-V compilation occurs.
Differential Revision: D77034022
cc @manuelcandales @cbilgin