-
Notifications
You must be signed in to change notification settings - Fork 603
[ET-VK] Consolidate shader compilation into one vkCreateComputePipelines call #11345
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
[ET-VK] Consolidate shader compilation into one vkCreateComputePipelines call #11345
Conversation
…nes call 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 1.0s, and down to 300ms once @SSJia removes the noop shader. Differential Revision: [D75763660](https://our.internmc.facebook.com/intern/diff/D75763660/) [ghstack-poisoned]
…nes call 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 1.0s, and down to 300ms once ssjia removes the noop shader. Differential Revision: [D75763660](https://our.internmc.facebook.com/intern/diff/D75763660/) ghstack-source-id: 287485414 Pull Request resolved: #11345
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/11345
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 528b571 with merge base af0a246 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D75763660 |
…mputePipelines call" 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 1.0s, and down to 300ms once ssjia removes the noop shader. Differential Revision: [D75763660](https://our.internmc.facebook.com/intern/diff/D75763660/) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D75763660 |
…mputePipelines call" 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. Differential Revision: [D75763660](https://our.internmc.facebook.com/intern/diff/D75763660/) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D75763660 |
…mputePipelines call" 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. Differential Revision: [D75763660](https://our.internmc.facebook.com/intern/diff/D75763660/) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D75763660 |
…nes call (#11381) 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 Co-authored-by: jorgep31415 <jorgepineda140@gmail.com>
Stack from ghstack (oldest at bottom):
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 thecreateInfoCount
,pCreateInfos
andpPipelines
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 300ms.Differential Revision: D75763660