-
Notifications
You must be signed in to change notification settings - Fork 685
[ET-VK][ez] Fix to codegen caching mechanism #12272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
## Changes * Fixed a bug with caching the generated GLSL file too early in `gen_vulkan_spv.py` ## Context Currently, the `gen_vulkan_spv.py` script saves the generated GLSL file to the cache immediately after generation. Then, when compiling the GLSL to SPIR-V, it checks the current generated GLSL file against the one in the cache. However, because of the early caching, this check will always pass, even when the GLSL template was updated and a SPIR-V recompilation is needed. The fix is to only store the generated GLSL file after the SPIR-V compilation succeeds. Differential Revision: [D77933112](https://our.internmc.facebook.com/intern/diff/D77933112/) [ghstack-poisoned]
## Changes * Fixed a bug with caching the generated GLSL file too early in `gen_vulkan_spv.py` ## Context Currently, the `gen_vulkan_spv.py` script saves the generated GLSL file to the cache immediately after generation. Then, when compiling the GLSL to SPIR-V, it checks the current generated GLSL file against the one in the cache. However, because of the early caching, this check will always pass, even when the GLSL template was updated and a SPIR-V recompilation is needed. The fix is to only store the generated GLSL file after the SPIR-V compilation succeeds. Differential Revision: [D77933112](https://our.internmc.facebook.com/intern/diff/D77933112/) ghstack-source-id: 294852284 Pull Request resolved: #12272
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/12272
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 1 Unrelated FailureAs of commit f800e41 with merge base ba19c75 ( NEW FAILURE - The following job has failed:
BROKEN TRUNK - The following job 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 pull request was exported from Phabricator. Differential Revision: D77933112 |
This PR needs a
|
62ed54b
into
gh/SS-JIA/253/base
This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: #12272 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/253/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/253/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/253/orig @diff-train-skip-merge Co-authored-by: Stephen Jia <ssjia@meta.com>
This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: pytorch#12272 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/253/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/SS-JIA/253/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/253/orig @diff-train-skip-merge Co-authored-by: Stephen Jia <ssjia@meta.com>
Stack from ghstack (oldest at bottom):
Changes
gen_vulkan_spv.py
Context
Currently, the
gen_vulkan_spv.py
script saves the generated GLSL file to the cache immediately after generation.Then, when compiling the GLSL to SPIR-V, it checks the current generated GLSL file against the one in the cache. However, because of the early caching, this check will always pass, even when the GLSL template was updated and a SPIR-V recompilation is needed.
The fix is to only store the generated GLSL file after the SPIR-V compilation succeeds.
Differential Revision: D77933112