-
Notifications
You must be signed in to change notification settings - Fork 473
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
Move tensors to correct device #1010
Conversation
Model Benchmark
|
Codecov Report
@@ Coverage Diff @@
## main #1010 +/- ##
==========================================
+ Coverage 89.89% 89.99% +0.10%
==========================================
Files 19 19
Lines 4659 4659
==========================================
+ Hits 4188 4193 +5
+ Misses 471 466 -5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - not sure if there are any other tensors for which we need to specify the device, yet anyhow better to have more of them on the right device 👍
Resolves #1002
Initially we assumed that with Lightning we do not have to worry about moving tensors to devices at all, but it turns out that this assumption only holds for tensor created via the data loaders. All manually created tensors need to be moved to the correct device (which is very straight forward in Lightning due to the self.device arg, Reference).
Adds a pytest that uses an accelerator if available. On github action workers, accelerators are most likely not available, but on local machines this could help detect issues early.