Weirdly, setting ‘num_workers’ = 0 seems to allow it to work. ??
# this works and doesn't throw the errors from above
loader = DataLoader(train,batch_size=256,shuffle=True, num_workers=0) 

While that seems to fix the error, I’m wondering if there is a way to structure my code for better performance on the GPU? When num_workers = 0 performance is still limited as only 1 core is used at 100% to go over the epoch loop. Using a small batch_size is much slower than using a large batch_size. I thought by moving the data to the CPU, I wouldn’t be experiencing memory traffic (i’m assuming it’s memory traffic) or are some parts of the training loop that are necessarily on the CPU and need to pull results from the GPU?
When using ‘cpu’ only, all my cores are used. I’m assuming some of that is numpy backend + python interpreter
Is there something else I’m doing wrong that is limiting performance of ‘on-GPU’ datasets? (some setting or issue with my epoch loop or dataloader for example)