-
Notifications
You must be signed in to change notification settings - Fork 881
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
GPU and TPU usage guide #826
Conversation
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.
This is great, thanks a lot :)
My only suggestion would be to add a link to PyTorch Lightning accelerator documentation, as it will provide reference documentation as to how to use accelerators.
docs/userguide/gpu_and_tpu_usage.md
Outdated
Now the model is ready to start predicting, which won't be shown here since it's included in the example linked in the start of this guide. | ||
|
||
## Use a GPU | ||
GPUs can dramatically improve the performance of your model in terms of processing time. We only need to instruct our model to use our machine's GPU through PyTorch Lighnting Trainer parameters, which are expressed as the `pl_trainer_kwargs` dictionary, like this: |
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.
You could add a reference to the Pytorch Lightning doc (e.g. this page: https://pytorch-lightning.readthedocs.io/en/stable/common/trainer.html#accelerator) 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.
@hrzn yes, argh I knew I forgot sth, thanks! OK, so now I pushed the update in my cloned repo (gsamaras/darts). What I should do now? It seems like that change is already reflected in this pull request?
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.
Thanks! Basically there's nothing more to do on your side for now. We'll wait for the checks to finish and then merge your branch. Thanks for the contribution :)
Codecov Report
@@ Coverage Diff @@
## master #826 +/- ##
=======================================
Coverage 91.33% 91.33%
=======================================
Files 69 69
Lines 6867 6867
=======================================
Hits 6272 6272
Misses 595 595
Continue to review full report at Codecov.
|
Fixes #808 .
Summary
As discussed, added a guide on how to use GPU and TPU with PyTorch Lightning. Also shows that a model uses CPU by default, based on an RNN example.
Other Information
[off-topic] The documentation has a typo in Timeseries here, which I corrected in this pull request.