I cannot reproduce the print statements by calling iter(dataloader) or enumerate(dataloader), however I’m also unsure if the prefetching behavior has changed recently (as I’m using a source build).
In any case, you should be able to remove the prefetching by using prefetch_factor = 0 in your DataLoader. This should make sure that no samples are pre-loaded.