Repository navigation
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/95020
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 88c1b3a: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
[ghstack-poisoned]
[ghstack-poisoned]
When we checkpoint the state of the private pool allocator, we will need to make sure that its current live allocated blocks will get properly cleaned up when the tensors they correspond to die. Return DataPtrs for these new allocated blocks that the callee can swap onto live Tensors. The exact api for setting the checkpoint can be manipulated after this as the cudagraph implementation is built out, but this at least shows its sufficiently general. This should be the last PR touching cuda caching allocator necessary for new cudagraphs integration. [ghstack-poisoned]
When we checkpoint the state of the private pool allocator, we will need to make sure that its current live allocated blocks will get properly cleaned up when the tensors they correspond to die. Return DataPtrs for these new allocated blocks that the callee can swap onto live Tensors. The exact api for setting the checkpoint can be manipulated after this as the cudagraph implementation is built out, but this at least shows its sufficiently general. This should be the last PR touching cuda caching allocator necessary for new cudagraphs integration. [ghstack-poisoned]
When we checkpoint the state of the private pool allocator, we will need to make sure that its current live allocated blocks will get properly cleaned up when the tensors they correspond to die. Return DataPtrs for these new allocated blocks that the callee can swap onto live Tensors. The exact api for setting the checkpoint can be manipulated after this as the cudagraph implementation is built out, but this at least shows its sufficiently general. This should be the last PR touching cuda caching allocator necessary for new cudagraphs integration. [ghstack-poisoned]
When we checkpoint the state of the private pool allocator, we will need to make sure that its current live allocated blocks will get properly cleaned up when the tensors they correspond to die. Return DataPtrs for these new allocated blocks that the callee can swap onto live Tensors. The exact api for setting the checkpoint can be manipulated after this as the cudagraph implementation is built out, but this at least shows its sufficiently general. This should be the last PR touching cuda caching allocator necessary for new cudagraphs integration. [ghstack-poisoned]
zdevito
left a comment
There was a problem hiding this comment.
Looks good. With this API I think it does make sense to have the allocator return the set of pointers it had to free as well. Then the checkpointing operation has a simple definition: obliterate state, return the new state, return the set of pointers in the old state that are now unsafe.
| return at::globalContext().linalgPreferredBackend(); | ||
| }); | ||
|
|
||
| py_module.def( |
There was a problem hiding this comment.
For testing, I bet there is an already existing way to go from data_ptr to tensor.
There was a problem hiding this comment.
Not to my knowledge.. if you have one link me ! For one, data pointer is not a python exposed concept.
When we checkpoint the state of the private pool allocator, we will need to make sure that its current live allocated blocks will get properly cleaned up when the tensors they correspond to die. Return DataPtrs for these new allocated blocks that the callee can swap onto live Tensors. The exact api for setting the checkpoint can be manipulated after this as the cudagraph implementation is built out, but this at least shows its sufficiently general. This should be the last PR touching cuda caching allocator necessary for new cudagraphs integration. [ghstack-poisoned]
When we checkpoint the state of the private pool allocator, we will need to make sure that its current live allocated blocks will get properly cleaned up when the tensors they correspond to die. Return DataPtrs for these new allocated blocks that the callee can swap onto live Tensors. The exact api for setting the checkpoint can be manipulated after this as the cudagraph implementation is built out, but this at least shows its sufficiently general. This should be the last PR touching cuda caching allocator necessary for new cudagraphs integration. [ghstack-poisoned]
When we checkpoint the state of the private pool allocator, we will need to make sure that its current live allocated blocks will get properly cleaned up when the tensors they correspond to die. Return DataPtrs for these new allocated blocks that the callee can swap onto live Tensors. The exact api for setting the checkpoint can be manipulated after this as the cudagraph implementation is built out, but this at least shows its sufficiently general. This should be the last PR touching cuda caching allocator necessary for new cudagraphs integration. [ghstack-poisoned]
When we checkpoint the state of the private pool allocator, we will need to make sure that its current live allocated blocks will get properly cleaned up when the tensors they correspond to die. Return DataPtrs for these new allocated blocks that the callee can swap onto live Tensors. The exact api for setting the checkpoint can be manipulated after this as the cudagraph implementation is built out, but this at least shows its sufficiently general. This should be the last PR touching cuda caching allocator necessary for new cudagraphs integration. [ghstack-poisoned]
When we checkpoint the state of the private pool allocator, we will need to make sure that its current live allocated blocks will get properly cleaned up when the tensors they correspond to die. Return DataPtrs for these new allocated blocks that the callee can swap onto live Tensors. The exact api for setting the checkpoint can be manipulated after this as the cudagraph implementation is built out, but this at least shows its sufficiently general. This should be the last PR touching cuda caching allocator necessary for new cudagraphs integration. [ghstack-poisoned]
|
@davidberard98 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
When we checkpoint the state of the private pool allocator, we will need to make sure that its current live allocated blocks will get properly cleaned up when the tensors they correspond to die. Return DataPtrs for these new allocated blocks that the callee can swap onto live Tensors. The exact api for setting the checkpoint can be manipulated after this as the cudagraph implementation is built out, but this at least shows its sufficiently general. This should be the last PR touching cuda caching allocator necessary for new cudagraphs integration. Differential Revision: [D43999888](https://our.internmc.facebook.com/intern/diff/D43999888) [ghstack-poisoned]
When we checkpoint the state of the private pool allocator, we will need to make sure that its current live allocated blocks will get properly cleaned up when the tensors they correspond to die. Return DataPtrs for these new allocated blocks that the callee can swap onto live Tensors. The exact api for setting the checkpoint can be manipulated after this as the cudagraph implementation is built out, but this at least shows its sufficiently general. This should be the last PR touching cuda caching allocator necessary for new cudagraphs integration. Differential Revision: [D43999888](https://our.internmc.facebook.com/intern/diff/D43999888) [ghstack-poisoned]
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
When we checkpoint the state of the private pool allocator, we will need to make sure that its current live allocated blocks will get properly cleaned up when the tensors they correspond to die. Return DataPtrs for these new allocated blocks that the callee can swap onto live Tensors. The exact api for setting the checkpoint can be manipulated after this as the cudagraph implementation is built out, but this at least shows its sufficiently general. This should be the last PR touching cuda caching allocator necessary for new cudagraphs integration. Differential Revision: [D43999888](https://our.internmc.facebook.com/intern/diff/D43999888) Pull Request resolved: pytorch/pytorch#95020 Approved by: https://github.com/zdevito
When we checkpoint the state of the private pool allocator, we will need to make sure that its current live allocated blocks will get properly cleaned up when the tensors they correspond to die. Return DataPtrs for these new allocated blocks that the callee can swap onto live Tensors. The exact api for setting the checkpoint can be manipulated after this as the cudagraph implementation is built out, but this at least shows its sufficiently general. This should be the last PR touching cuda caching allocator necessary for new cudagraphs integration. Differential Revision: [D43999888](https://our.internmc.facebook.com/intern/diff/D43999888) Pull Request resolved: pytorch/pytorch#95020 Approved by: https://github.com/zdevito
Stack from ghstack (oldest at bottom):
When we checkpoint the state of the private pool allocator, we will need to make sure that its current live allocated blocks will get properly cleaned up when the tensors they correspond to die. Return DataPtrs for these new allocated blocks that the callee can swap onto live Tensors.
The exact api for setting the checkpoint can be manipulated after this as the cudagraph implementation is built out, but this at least shows its sufficiently general.
This should be the last PR touching cuda caching allocator necessary for new cudagraphs integration.
Differential Revision: D43999888