pytorch/docs
Syed Tousif Ahmed 7c89ec0f7c Implements torch.cuda.MemPool() API (#131152)
In this PR:
- Pool id creation logic is refactored and moved to a MemPool class. `graph_pool_handle()` API now uses `torch.cuda.MemPool()` to get a unique id for a pool. Existing tests should cover this change.
- MemPool holds a pointer to a CUDAAllocator as proposed in https://github.com/pytorch/pytorch/issues/124807#issuecomment-2077506997. Tests are added to show usage with CUDAPluggableAllocator.
- MemPoolContext API makes a mempool active. Tests are added to show usage of this API. This API will be used in CUDACachingAllocator to route allocations to a user provided allocator. See draft here: https://github.com/pytorch/pytorch/pull/125722/

Pull Request resolved: https://github.com/pytorch/pytorch/pull/131152
Approved by: https://github.com/eqy, https://github.com/ezyang
2024-08-01 01:29:30 +00:00
..
cpp [BE][Easy][1/19] enforce style for empty lines in import segments (#129752) 2024-07-16 00:42:56 +00:00
source Implements torch.cuda.MemPool() API (#131152) 2024-08-01 01:29:30 +00:00
.gitignore
libtorch.rst Replace master with main in links and docs/conf.py (#100176) 2023-05-02 18:20:32 +00:00
make.bat
Makefile Refactor torch.onnx documentation (#108379) 2023-09-08 18:23:48 +00:00
README.md
requirements.txt update requirements.txt in /docs (#101092) 2023-05-12 03:19:36 +00:00

Please see the Writing documentation section of CONTRIBUTING.md for details on both writing and building the docs.