-
Notifications
You must be signed in to change notification settings - Fork 607
[ET-VK] Introduce ParamsBindList
to prevent needing to pass shared_ptr
to bind parameter UBOs
#3150
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
…_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 pull request was exported from Phabricator. Differential Revision: D56357188 |
…_ptr` to bind parameter UBOs Differential Revision: [D56357188](https://our.internmc.facebook.com/intern/diff/D56357188/) ghstack-source-id: 223199138 Pull Request resolved: #3150
…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]
This pull request was exported from Phabricator. Differential Revision: D56357188 |
…_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/)
This pull request has been merged in db17853. |
Stack from ghstack (oldest at bottom):
ParamsBindList
to prevent needing to passshared_ptr
to bind parameter UBOs #3150Value
#3148Context
In keeping with the below changeset in this stack, this diff introduces the
ParamsBindList
structure to avoid storing shared pointers toapi::UniformParamsBuffer
objects inExecuteNode
andPrepackNode
.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
andPrepackNode
to take ownership sinceComputeGraph
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 fromvTensor
, further reducing heap allocations and pointer chasing.In the future I will change
prepack_nodes_
andexecute_nodes_
to storePrepackNode
andExecuteNode
instances directly instead of storing unique pointers to them.Differential Revision: D56357188