Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

num_workers=1 in DataLoader #108

Open
YoelShoshan opened this issue Nov 9, 2020 · 3 comments
Open

num_workers=1 in DataLoader #108

YoelShoshan opened this issue Nov 9, 2020 · 3 comments

Comments

@YoelShoshan
Copy link

YoelShoshan commented Nov 9, 2020

Wondering - is there any reason that num_workers is hardcoded to 1, and there's no usage of more workers?

@rosinality
Copy link
Owner

It is due to this: 211cb45 I remember using 1 workers is more efficient for low resolutions.

@YoelShoshan
Copy link
Author

I see - makes sense since the multi-process communication becomes heavier than the inter process communication overhead, due to the extremely small work that a single worker needs to do in small resolutions.
A possible solution is to reinitialize DataLoader with bigger workers_num as the resolution increases but I assume it's not high priority.

@rosinality
Copy link
Owner

Yes. And using distributed training will be even better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants