Repository navigation
Conversation
…ding [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/96384
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 8b661f8: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…graph recording" [ghstack-poisoned]
…graph recording" Exposes a way for users to do allocations to a private pool without doing a cudagraph capture. We assume that there is already an existing graph that was used to get a unique capture_id identifier, and then use that to reuse the existing apis. We mimic the existing cudagraph capture api by only doing allocations to a particular thread, just as the stream was thread-local. This will be needed for the subsequent PR which will do warmup in a cudagraph pool. That pr also also adds some runtime checking which helped find a leaked cublas workspace allocation. [ghstack-poisoned]
…graph recording" Exposes a way for users to do allocations to a private pool without doing a cudagraph capture. We assume that there is already an existing graph that was used to get a unique capture_id identifier, and then use that to reuse the existing apis. We mimic the existing cudagraph capture api by only doing allocations to a particular thread, just as the stream was thread-local. This will be needed for the subsequent PR which will do warmup in a cudagraph pool. That pr also also adds some runtime checking which helped find a leaked cublas workspace allocation. [ghstack-poisoned]
…graph recording" Exposes a way for users to do allocations to a private pool without doing a cudagraph capture. We assume that there is already an existing graph that was used to get a unique capture_id identifier, and then use that to reuse the existing apis. We mimic the existing cudagraph capture api by only doing allocations to a particular thread, just as the stream was thread-local. This will be needed for the subsequent PR which will do warmup in a cudagraph pool. That pr also also adds some runtime checking which helped find a leaked cublas workspace allocation. [ghstack-poisoned]
|
@davidberard98 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
…graph recording" Exposes a way for users to do allocations to a private pool without doing a cudagraph capture. We assume that there is already an existing graph that was used to get a unique capture_id identifier, and then use that to reuse the existing apis. We mimic the existing cudagraph capture api by only doing allocations to a particular thread, just as the stream was thread-local. This will be needed for the subsequent PR which will do warmup in a cudagraph pool. That pr also also adds some runtime checking which helped find a leaked cublas workspace allocation. Differential Revision: [D43999891](https://our.internmc.facebook.com/intern/diff/D43999891) [ghstack-poisoned]
…graph recording" Exposes a way for users to do allocations to a private pool without doing a cudagraph capture. We assume that there is already an existing graph that was used to get a unique capture_id identifier, and then use that to reuse the existing apis. We mimic the existing cudagraph capture api by only doing allocations to a particular thread, just as the stream was thread-local. This will be needed for the subsequent PR which will do warmup in a cudagraph pool. That pr also also adds some runtime checking which helped find a leaked cublas workspace allocation. Differential Revision: [D43999891](https://our.internmc.facebook.com/intern/diff/D43999891) [ghstack-poisoned]
…graph recording" Exposes a way for users to do allocations to a private pool without doing a cudagraph capture. We assume that there is already an existing graph that was used to get a unique capture_id identifier, and then use that to reuse the existing apis. We mimic the existing cudagraph capture api by only doing allocations to a particular thread, just as the stream was thread-local. This will be needed for the subsequent PR which will do warmup in a cudagraph pool. That pr also also adds some runtime checking which helped find a leaked cublas workspace allocation. Differential Revision: [D43999891](https://our.internmc.facebook.com/intern/diff/D43999891) [ghstack-poisoned]
…graph recording" Exposes a way for users to do allocations to a private pool without doing a cudagraph capture. We assume that there is already an existing graph that was used to get a unique capture_id identifier, and then use that to reuse the existing apis. We mimic the existing cudagraph capture api by only doing allocations to a particular thread, just as the stream was thread-local. This will be needed for the subsequent PR which will do warmup in a cudagraph pool. That pr also also adds some runtime checking which helped find a leaked cublas workspace allocation. Differential Revision: [D43999891](https://our.internmc.facebook.com/intern/diff/D43999891) [ghstack-poisoned]
…graph recording" Exposes a way for users to do allocations to a private pool without doing a cudagraph capture. We assume that there is already an existing graph that was used to get a unique capture_id identifier, and then use that to reuse the existing apis. We mimic the existing cudagraph capture api by only doing allocations to a particular thread, just as the stream was thread-local. This will be needed for the subsequent PR which will do warmup in a cudagraph pool. That pr also also adds some runtime checking which helped find a leaked cublas workspace allocation. Differential Revision: [D43999891](https://our.internmc.facebook.com/intern/diff/D43999891) [ghstack-poisoned]
…graph recording" Exposes a way for users to do allocations to a private pool without doing a cudagraph capture. We assume that there is already an existing graph that was used to get a unique capture_id identifier, and then use that to reuse the existing apis. We mimic the existing cudagraph capture api by only doing allocations to a particular thread, just as the stream was thread-local. This will be needed for the subsequent PR which will do warmup in a cudagraph pool. That pr also also adds some runtime checking which helped find a leaked cublas workspace allocation. Differential Revision: [D43999891](https://our.internmc.facebook.com/intern/diff/D43999891) [ghstack-poisoned]
…graph recording" Exposes a way for users to do allocations to a private pool without doing a cudagraph capture. We assume that there is already an existing graph that was used to get a unique capture_id identifier, and then use that to reuse the existing apis. We mimic the existing cudagraph capture api by only doing allocations to a particular thread, just as the stream was thread-local. This will be needed for the subsequent PR which will do warmup in a cudagraph pool. That pr also also adds some runtime checking which helped find a leaked cublas workspace allocation. Differential Revision: [D43999891](https://our.internmc.facebook.com/intern/diff/D43999891) [ghstack-poisoned]
…graph recording" Exposes a way for users to do allocations to a private pool without doing a cudagraph capture. We assume that there is already an existing graph that was used to get a unique capture_id identifier, and then use that to reuse the existing apis. We mimic the existing cudagraph capture api by only doing allocations to a particular thread, just as the stream was thread-local. This will be needed for the subsequent PR which will do warmup in a cudagraph pool. That pr also also adds some runtime checking which helped find a leaked cublas workspace allocation. Differential Revision: [D43999891](https://our.internmc.facebook.com/intern/diff/D43999891) [ghstack-poisoned]
zdevito
left a comment
There was a problem hiding this comment.
Looks good. Couple minor comments.
|
|
||
| m.def( | ||
| "_cuda_beginAllocateCurrentStreamToPool", | ||
| [](int device, at::cuda::MempoolId_t mempool_id) { |
There was a problem hiding this comment.
nit: feels weird to use the default stream but explicit device vs (default device + default stream) or (explicit stream)
There was a problem hiding this comment.
True. Is there any way of passing a python object as CudaStream_t ?
| b = int8_cuda(LARGE_BUFFER) | ||
| del a, b | ||
|
|
||
| graph_thread = threading.Thread(target=use_pool) |
There was a problem hiding this comment.
what is the intention of the threads here? In all likelihood without additional synchronization one is just going to run entirely before the other. Barriers placed inside the threads would guarantee some interleaving.
Differential Revision: [D43999891](https://our.internmc.facebook.com/intern/diff/D43999891) [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 |
Differential Revision: [D43999891](https://our.internmc.facebook.com/intern/diff/D43999891) Pull Request resolved: pytorch/pytorch#96384 Approved by: https://github.com/zdevito
Differential Revision: [D43999891](https://our.internmc.facebook.com/intern/diff/D43999891) Pull Request resolved: pytorch/pytorch#96384 Approved by: https://github.com/zdevito
Stack from ghstack (oldest at bottom):
Differential Revision: D43999891