If we push the for-loop into the __getitem__ function, does that mean it’s 1 worker doing the loop? Would that be faster than just doing the for-loop in collate?
I was wondering if it is possible to assign a row index of the preallocated tensor to each worker and have them copy the data into that index of the tensor in __getitem__?