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 [AMP] Use generic autocast in example, specify dtype (#79579) 2022-06-17 21:32:51 +00:00
autograd.rst Document complex optimizer semantic behavior (#121667) 2024-03-16 00:43:47 +00:00
broadcasting.rst Fixes docs (#51439) 2021-01-31 22:00:26 -08:00
cpu_threading_runtimes.svg Update CPU threading doc (#33083) 2020-02-11 14:13:51 -08:00
cpu_threading_torchscript_inference.rst Upgrade MKL-DNN to DNNL v1.2 (#32422) 2020-03-26 22:07:59 -07:00
cpu_threading_torchscript_inference.svg Lint trailing newlines (#54737) 2021-03-30 13:09:52 -07:00
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 Update faq.rst so OOM section mentions checkpoint (#62709) 2021-08-05 07:40:08 -07:00
fsdp.rst [docs] start a new FSDP notes doc (#117323) 2024-01-22 15:46:35 +00:00
gradcheck.rst Add first draft of gradcheck note (#55966) 2021-04-27 14:33:42 -07:00
hip.rst Tweak formatting of note on macros (#89598) 2022-11-28 20:42:30 +00:00
large_scale_deployments.rst Move ThreadLocalDebugInfo to c10 (#37774) 2020-05-11 19:27:41 -07:00
modules.rst Replace master with main in links and docs/conf.py (#100176) 2023-05-02 18:20:32 +00:00
mps.rst update mps note with more details (#78669) 2022-06-02 20:53:19 +00:00
multiprocessing.rst [draft] Update Multiprocessing best practices with CPU device (#103229) 2023-06-25 06:26:40 +00:00
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 Remove remaining THC code (#69039) 2021-12-08 12:18:08 -08:00