Skip to content

[ET-VK] Cache compiled SPIR-V and only recompile when changed #9652

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

Merged
merged 2 commits into from
Mar 27, 2025

Conversation

SS-JIA
Copy link
Contributor

@SS-JIA SS-JIA commented Mar 26, 2025

Stack from ghstack (oldest at bottom):

Context

As title. Introduce a caching mechanism to store SPIR-V generated in a previous build to avoid re-compiling them.

A shader will not be re-compiled if the source GLSL template is unchanged.

For Meta internal builds, the etvk.force_shader_rebuild buck config can be used to force all shaders to be built without using the cache.

Differential Revision: D71916745

## Context

As title. Introduce a caching mechanism to store SPIR-V generated in a previous build to avoid re-compiling them.

A shader will not be re-compiled if the source GLSL template is unchanged.

For Meta internal builds, the `etvk.force_shader_rebuild` buck config can be used to force all shaders to be built without using the cache.

Differential Revision: [D71916745](https://our.internmc.facebook.com/intern/diff/D71916745/)

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Mar 26, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/9652

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit be86fb1 with merge base 7159650 (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

SS-JIA added a commit that referenced this pull request Mar 26, 2025
## Context

As title. Introduce a caching mechanism to store SPIR-V generated in a previous build to avoid re-compiling them.

A shader will not be re-compiled if the source GLSL template is unchanged.

For Meta internal builds, the `etvk.force_shader_rebuild` buck config can be used to force all shaders to be built without using the cache.

Differential Revision: [D71916745](https://our.internmc.facebook.com/intern/diff/D71916745/)

ghstack-source-id: 274260421
Pull Request resolved: #9652
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 26, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71916745

Copy link

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

…ged"

## Context

As title. Introduce a caching mechanism to store SPIR-V generated in a previous build to avoid re-compiling them.

A shader will not be re-compiled if the source GLSL template is unchanged.

For Meta internal builds, the `etvk.force_shader_rebuild` buck config can be used to force all shaders to be built without using the cache.

Differential Revision: [D71916745](https://our.internmc.facebook.com/intern/diff/D71916745/)

[ghstack-poisoned]
SS-JIA added a commit that referenced this pull request Mar 26, 2025
Pull Request resolved: #9652

## Context

As title. Introduce a caching mechanism to store SPIR-V generated in a previous build to avoid re-compiling them.

A shader will not be re-compiled if the source GLSL template is unchanged.

For Meta internal builds, the `etvk.force_shader_rebuild` buck config can be used to force all shaders to be built without using the cache.
ghstack-source-id: 274281888
@exported-using-ghexport

Differential Revision: [D71916745](https://our.internmc.facebook.com/intern/diff/D71916745/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D71916745

@facebook-github-bot facebook-github-bot merged commit 2f316c6 into gh/SS-JIA/202/base Mar 27, 2025
82 of 83 checks passed
@facebook-github-bot facebook-github-bot deleted the gh/SS-JIA/202/head branch March 27, 2025 03:49
SS-JIA added a commit that referenced this pull request Mar 27, 2025
This PR was created by the merge bot to help merge the original PR into
the main branch.
ghstack PR number: #9652 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/202/base
ghstack PR head:
https://github.com/pytorch/executorch/tree/gh/SS-JIA/202/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/202/orig
@diff-train-skip-merge

Co-authored-by: Stephen Jia <[email protected]>
kirklandsign pushed a commit that referenced this pull request Apr 11, 2025
This PR was created by the merge bot to help merge the original PR into
the main branch.
ghstack PR number: #9652 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/202/base
ghstack PR head:
https://github.com/pytorch/executorch/tree/gh/SS-JIA/202/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/202/orig
@diff-train-skip-merge

Co-authored-by: Stephen Jia <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants