-
Notifications
You must be signed in to change notification settings - Fork 684
[ET-VK] Persistently map staging buffers #5021
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
1. Tensors accessible to both CPU and GPU use `StorageBuffer`. 2. Tensors accessible to GPU only use `vTensorStorage`. Since `StorageBuffer` is only used for [staging buffers](https://vulkan-tutorial.com/Vertex_buffers/Staging_buffer), i.e., buffers accessible to both CPU and GPU, `StagingBuffer` is a fitting name for (1) that decreases confusion between (1) and (2). Differential Revision: [D62049779](https://our.internmc.facebook.com/intern/diff/D62049779/) [ghstack-poisoned]
TSIA Differential Revision: [D62049777](https://our.internmc.facebook.com/intern/diff/D62049777/) [ghstack-poisoned]
There are ~4 lines of duplicated code but IMO, the distinct function names make the code much clearer. Differential Revision: [D62049778](https://our.internmc.facebook.com/intern/diff/D62049778/) [ghstack-poisoned]
…on methods" There are ~4 lines of duplicated code but IMO, the distinct function names make the code much clearer. Differential Revision: [D62049778](https://our.internmc.facebook.com/intern/diff/D62049778/) [ghstack-poisoned]
`StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/) [ghstack-poisoned]
There are ~4 lines of duplicated code but IMO, the distinct function names make the code much clearer. Differential Revision: [D62049778](https://our.internmc.facebook.com/intern/diff/D62049778/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/5021
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 0bd4b96 with merge base 3cf9237 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D59706627 |
`StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/) ghstack-source-id: 233620788 Pull Request resolved: #5021
`StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D59706627 |
Pull Request resolved: #5021 `StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. ghstack-source-id: 240798121 @exported-using-ghexport Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/)
`StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/) [ghstack-poisoned]
`StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D59706627 |
Pull Request resolved: #5021 `StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. ghstack-source-id: 240813745 @exported-using-ghexport Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/)
`StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/) [ghstack-poisoned]
`StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D59706627 |
Pull Request resolved: #5021 `StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. ghstack-source-id: 240814116 @exported-using-ghexport Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/)
`StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/) [ghstack-poisoned]
`StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D59706627 |
Pull Request resolved: #5021 `StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. ghstack-source-id: 240818434 @exported-using-ghexport Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/)
`StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/) [ghstack-poisoned]
`StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/) [ghstack-poisoned]
Pull Request resolved: #5021 `StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. ghstack-source-id: 240831447 @exported-using-ghexport Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/)
This pull request was exported from Phabricator. Differential Revision: D59706627 |
`StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/) [ghstack-poisoned]
`StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/) [ghstack-poisoned]
This pull request was exported from Phabricator. Differential Revision: D59706627 |
Pull Request resolved: #5021 `StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. ghstack-source-id: 241025872 @exported-using-ghexport Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/)
`StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/) [ghstack-poisoned]
`StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/) [ghstack-poisoned]
Pull Request resolved: #5021 `StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. ghstack-source-id: 241047807 @exported-using-ghexport Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/)
This pull request was exported from Phabricator. Differential Revision: D59706627 |
`StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/) [ghstack-poisoned]
`StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/) [ghstack-poisoned]
Pull Request resolved: #5021 `StagingBuffer`s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, [persistently map the memory](https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/memory_mapping.html) once on model load. ghstack-source-id: 241050420 @exported-using-ghexport Differential Revision: [D59706627](https://our.internmc.facebook.com/intern/diff/D59706627/)
This pull request was exported from Phabricator. Differential Revision: D59706627 |
I missed migration of this callsite in #5021 Differential Revision: [D62403691](https://our.internmc.facebook.com/intern/diff/D62403691/) [ghstack-poisoned]
I missed migration of this callsite in #5021 Differential Revision: [D62403691](https://our.internmc.facebook.com/intern/diff/D62403691/) ghstack-source-id: 241692821 Pull Request resolved: #5202
Stack from ghstack (oldest at bottom):
StagingBuffer
s are used for input, output, and constant tensors. For input and output, they are mapped every inference which is unnecessary. Instead, persistently map the memory once on model load.Differential Revision: D59706627