Performance Regression of Dataloader #23642
Labels
module: dataloader
Related to torch.utils.data.DataLoader and Sampler
module: performance
Issues related to performance, either of kernel code or framework glue
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
馃悰 Bug
Latest change to Dataloader (#19228) leads to severe performance regression for large scale training up to 30%. We finally root the cause to theses change: https://github.com/pytorch/pytorch/blob/master/torch/utils/data/dataloader.py#L889-L891. It causes the exit of each epoch has additional 5 seconds.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The exit is basically free in pytorch 1.1, but it takes 5s in pytorch 1.2.
Environment
Additional context
The suggest fix is to recover previous lines around https://github.com/pytorch/pytorch/blob/master/torch/utils/data/dataloader.py#L889-L891. For example, following code will fix the problem:
The text was updated successfully, but these errors were encountered: