-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Is this a bug? - unnecessary CPU/GPU copying in supporters.py just for aggregating loss #12408
Comments
this will probably be removed in some time: #9372 |
This is a very old piece of code. I guess the choice was to prefer less GPU memory usage over speed |
Well, I'm not sure how impactful this is on the memory, but it's an easy fix. Should I submit a PR? Never mind the other bars in the plot, but focus on the red highlighted one. The total time to run is around 105 S, out of this time the green bar (10 S) is the training, the remaining time, red, is performing the loss update. Just adding the |
Yes, go ahead! |
I've noticed that while training, this chunk here is eating a lot of time.
https://github.com/PyTorchLightning/pytorch-lightning/blob/0b682b807a76b732492a3d43e3208a80c80b6c2f/pytorch_lightning/trainer/supporters.py#L76-L80
I'm wondering whether this is a bug, and why we don't have it like:
It works, and it's much, faster.
cc @Borda @akihironitta
The text was updated successfully, but these errors were encountered: