Skip to content

[ET-VK] Consolidate shader compilation into one vkCreateComputePipelines call#11381

Merged
lucylq merged 1 commit into
mainfrom
gh/jorgep31415/135/orig
Jun 4, 2025
Merged

[ET-VK] Consolidate shader compilation into one vkCreateComputePipelines call#11381
lucylq merged 1 commit into
mainfrom
gh/jorgep31415/135/orig

Conversation

@pytorchbot

Copy link
Copy Markdown
Collaborator

This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #11345 by @jorgep31415
^ 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/jorgep31415/135/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/jorgep31415/135/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/main
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/jorgep31415/135/orig
@diff-train-skip-merge

…nes call

Pull Request resolved: #11345

We target the QC Adreno driver implementation of Vulkan. The Vulkan API does not enforce how QC actually uses the cache. As the plural naming of `vkCreateComputePipelines` suggests, we observed that the `createInfoCount`, `pCreateInfos` and `pPipelines` arguments above allow construction of multiple compute pipelines in one invocation. We refactor ET-VK to accumulate metadata necessary for pipeline construction and invoke vkCreateComputePipelines only once. QC's implementation maximizes the cache if we create the same number of compute pipelines in fewer invocations of vkCreateComputePipelines. This decreases model load for a sample model from 1.7s to 200ms.
ghstack-source-id: 288170368

Differential Revision: [D75763660](https://our.internmc.facebook.com/intern/diff/D75763660/)
@pytorchbot pytorchbot requested a review from SS-JIA as a code owner June 4, 2025 22:44
@pytorch-bot

pytorch-bot Bot commented Jun 4, 2025

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ No Failures, 24 Pending

As of commit d0d965b with merge base af0a246 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@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 Jun 4, 2025
@lucylq lucylq added the release notes: vulkan Changes to the Vulkan backend delegate label Jun 4, 2025
@lucylq lucylq merged commit 3550824 into main Jun 4, 2025
96 of 97 checks passed
@lucylq lucylq deleted the gh/jorgep31415/135/orig branch June 4, 2025 23:04
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. release notes: vulkan Changes to the Vulkan backend delegate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants