Skip to content

Use more workers in DataLoader #251

Open
@prabhuteja12

Description

@prabhuteja12

Most of the DataLoader instances use no additional workers for data loading. This can be a bottleneck when performing non-trivial data augmentations on images with a large enough batch size, or with a slower disk.

There are some crude heuristics like 2 x num_gpus which might serve as a reasonable starting point. See
https://discuss.pytorch.org/t/guidelines-for-assigning-num-workers-to-dataloader/813
https://chtalhaanwar.medium.com/pytorch-num-workers-a-tip-for-speedy-training-ed127d825db7#:~:text=Num_workers%20tells%20the%20data%20loader,the%20GPU%20has%20to%20wait.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions