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

Multi-GPU support and multi-threaded data loading #8

Closed
rohanchabra opened this issue Sep 14, 2018 · 3 comments
Closed

Multi-GPU support and multi-threaded data loading #8

rohanchabra opened this issue Sep 14, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@rohanchabra
Copy link

I think it will be good to use nn.DataParallel
self.model = nn.DataParallel(self.model)

Maybe also add multi-threading in dataloader in your utils.py (This can decrease training time by 4 times atleast)

loader = DataLoader(dataset, batch_size= batch_size,
shuffle=True, num_workers= 4)

@NikolasEnt NikolasEnt added the enhancement New feature or request label Sep 16, 2018
@voeykovroman
Copy link
Member

Yeah! Thank you @rohanchabra! Indeed it would be a significant improvement. I'll try to add these features later next week after implementing the rest of our planned "To do" list!

@NikolasEnt
Copy link
Member

Good idea, we'll add it.
Optimal number of threads in dataloader depends on hardware and use of multi-threading reduce predictability, so, num_workers should be set as an optional parameter.

@NikolasEnt
Copy link
Member

a88d674

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

No branches or pull requests

3 participants