pytorch/docs/source/notes
Mikayla Gawarecki 2480e8b8a1 Add MAP_SHARED option for torch.load(mmap=True) (#124889)
Fixes #124528

Going over the options for our MapAllocator and what they do, I don't think any other of them need to be piped up to `torch.load`

4f29103749/aten/src/ATen/MapAllocator.h (L8-L16)

~However, I wonder if this `MmapVisibility(Enum)` is a good way to represent "or-ing" together of `mmap` flags if we want to extend it in the future. I looked over the flags for [`mmap(2)`](https://man7.org/linux/man-pages/man2/mmap.2.html), and could not immediately see how most of them would be useful for `torch.load` (would maybe `MAP_LOCKED` (like `mlock`) or `MAP_HUGE` ever be worthwhile?)~

Using the flags provided by the python `mmap` library so that we can extend the allowed flags and pipe them down to the cpp `mmap` call if there is a need for other flags in the future

Pull Request resolved: https://github.com/pytorch/pytorch/pull/124889
Approved by: https://github.com/albanD
2024-04-30 15:02:19 +00:00
..
amp_examples.rst
autograd.rst Document complex optimizer semantic behavior (#121667) 2024-03-16 00:43:47 +00:00
broadcasting.rst
cpu_threading_runtimes.svg
cpu_threading_torchscript_inference.rst
cpu_threading_torchscript_inference.svg
cuda.rst Graph-Safe RNG State Exchange for Tensor Parallelism (#114068) 2024-03-27 01:14:38 +00:00
ddp.rst Update DDP dynamo debug docs (#118295) 2024-01-29 14:58:26 +00:00
extending.func.rst Fix the example in the extending.func.rst (#109279) 2023-09-14 17:29:39 +00:00
extending.rst [BE] add parentheses to kwargs unpacking func(*args, **(kwargs or {})) (#115026) 2023-12-03 20:03:26 +00:00
faq.rst
fsdp.rst [docs] start a new FSDP notes doc (#117323) 2024-01-22 15:46:35 +00:00
gradcheck.rst
hip.rst
large_scale_deployments.rst
modules.rst
mps.rst
multiprocessing.rst
numerical_accuracy.rst [DOCS][CUDA] Update TF32 docs for sm90 (#111337) 2023-10-19 09:36:13 +00:00
randomness.rst Changed cublas repdocubility URL (#121534) 2024-03-08 23:46:21 +00:00
serialization.rst Add MAP_SHARED option for torch.load(mmap=True) (#124889) 2024-04-30 15:02:19 +00:00
windows.rst