Running on Ubuntu.
I use torch.multiprocessing.spawn(main, ...) to run DDP training. The dataloaders are initialized in main().  The memory usage without expilict setting multiprocessing_context is out of limit, as well as setting multiprocessing_context="spawn". However, setting multiprocessing_context="fork" makes memory usage much smaller, like 25G/ 63G. The OOM happens at enumerate(dataloader).