[ET-VK] Introduce ParamsBindList to prevent needing to pass shared_ptr to bind parameter UBOs#3150
Closed
SS-JIA wants to merge 2 commits intogh/SS-JIA/41/basefrom
Closed
[ET-VK] Introduce ParamsBindList to prevent needing to pass shared_ptr to bind parameter UBOs#3150SS-JIA wants to merge 2 commits intogh/SS-JIA/41/basefrom
ParamsBindList to prevent needing to pass shared_ptr to bind parameter UBOs#3150SS-JIA wants to merge 2 commits intogh/SS-JIA/41/basefrom
Conversation
…_ptr` to bind parameter UBOs Differential Revision: [D56357188](https://our.internmc.facebook.com/intern/diff/D56357188/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/3150
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 91751a3 with merge base 269b6ad ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Apr 19, 2024
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D56357188 |
SS-JIA
added a commit
that referenced
this pull request
Apr 19, 2024
…_ptr` to bind parameter UBOs Differential Revision: [D56357188](https://our.internmc.facebook.com/intern/diff/D56357188/) ghstack-source-id: 223199138 Pull Request resolved: #3150
junpi3
approved these changes
Apr 19, 2024
…ass `shared_ptr` to bind parameter UBOs" ## Context In keeping with the below changeset in this stack, this diff introduces the `ParamsBindList` structure to avoid storing shared pointers to `api::UniformParamsBuffer` objects in `ExecuteNode` and `PrepackNode`. The idea is to store the binding information of each UPB instead of taking ownership of the UPB itself. There isn't really a need for `ExecuteNode` and `PrepackNode` to take ownership since `ComputeGraph` provides a guarantee that the UPBs will be in scope at the time of binding. With this change, all `shared_ptr` members can be eliminated from `vTensor`, further reducing heap allocations and pointer chasing. In the future I will change `prepack_nodes_` and `execute_nodes_` to store `PrepackNode` and `ExecuteNode` instances directly instead of storing unique pointers to them. Differential Revision: [D56357188](https://our.internmc.facebook.com/intern/diff/D56357188/) [ghstack-poisoned]
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D56357188 |
SS-JIA
added a commit
that referenced
this pull request
Apr 19, 2024
…_ptr` to bind parameter UBOs Pull Request resolved: #3150 ## Context In keeping with the below changeset in this stack, this diff introduces the `ParamsBindList` structure to avoid storing shared pointers to `api::UniformParamsBuffer` objects in `ExecuteNode` and `PrepackNode`. The idea is to store the binding information of each UPB instead of taking ownership of the UPB itself. There isn't really a need for `ExecuteNode` and `PrepackNode` to take ownership since `ComputeGraph` provides a guarantee that the UPBs will be in scope at the time of binding. With this change, all `shared_ptr` members can be eliminated from `vTensor`, further reducing heap allocations and pointer chasing. In the future I will change `prepack_nodes_` and `execute_nodes_` to store `PrepackNode` and `ExecuteNode` instances directly instead of storing unique pointers to them. ghstack-source-id: 223225899 @exported-using-ghexport Differential Revision: [D56357188](https://our.internmc.facebook.com/intern/diff/D56357188/)
Contributor
|
This pull request has been merged in db17853. |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
ParamsBindListto prevent needing to passshared_ptrto bind parameter UBOs #3150Value#3148Context
In keeping with the below changeset in this stack, this diff introduces the
ParamsBindListstructure to avoid storing shared pointers toapi::UniformParamsBufferobjects inExecuteNodeandPrepackNode.The idea is to store the binding information of each UPB instead of taking ownership of the UPB itself. There isn't really a need for
ExecuteNodeandPrepackNodeto take ownership sinceComputeGraphprovides a guarantee that the UPBs will be in scope at the time of binding.With this change, all
shared_ptrmembers can be eliminated fromvTensor, further reducing heap allocations and pointer chasing.In the future I will change
prepack_nodes_andexecute_nodes_to storePrepackNodeandExecuteNodeinstances directly instead of storing unique pointers to them.Differential Revision: D56357188