Hi,
I am facing a problem with DataLoader. I am training a classification problem, the code runs normally with num_workers equal 0 but it raised CUDA out of memory problem when I increased the num_workers.
My GPU: RTX 3090
Pytorch version:  1.8.0.dev20201104 - pytorch-nightly
Python version: 3.7.9
Operating system: Windows
CUDA version: 10.2
This case consumes 19.5GB GPU VRAM.
train_dataloader = DataLoader(dataset = train_dataset, 
                                  batch_size = 16, \
                                  shuffle = True,
                                  num_workers= 0)

This case return: RuntimeError: CUDA out of memory. Tried to allocate 90.00 MiB (GPU 0; 24.00 GiB total capacity; 13.09 GiB already allocated; 5.75 GiB free; 13.28 GiB reserved in total by PyTorch)
train_dataloader = DataLoader(dataset = train_dataset, 
                                  batch_size = 16, \
                                  shuffle = True,
                                  num_workers= 8)

I can understand if it was run out of PC memory, but run out of CUDA memory is so weird. Is that because of Nightly version?
Update:
I just install CUDA 11.1.
The memory in GPU is the same with num_workers =  0 or 2 or 4, but CUDA out of memory in 8.