-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[1/N] Refine beginner tutorial by accelerator api #3167
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3167
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New FailuresAs of commit e57d5f2 with merge base 540bd0c (): NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
Thank you for the fix. Can you check other tutorials to see where it needs to be updated? Also, we'll have to wait to merge this until 2.6 is available. We'll test against the 2.6-TEST branch after the first RC.
if torch.backends.mps.is_available() | ||
else "cpu" | ||
) | ||
# We want to be able to train our model on an `accelerator <https://pytorch.org/docs/stable/torch.html#accelerators>` |
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.
# We want to be able to train our model on an `accelerator <https://pytorch.org/docs/stable/torch.html#accelerators>` | |
# We want to be able to train our model on an `accelerator <https://pytorch.org/docs/stable/torch.html#accelerators>`__ |
else "cpu" | ||
) | ||
# We want to be able to train our model on an `accelerator <https://pytorch.org/docs/stable/torch.html#accelerators>` | ||
# like CUDA, MPS, MTIA, or XPU. If the current accelerator is available, we will use it, otherwise we use the CPU. |
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.
# like CUDA, MPS, MTIA, or XPU. If the current accelerator is available, we will use it, otherwise we use the CPU. | |
# such as CUDA, MPS, MTIA, or XPU. If the current accelerator is available, we will use it. Otherwise, we use the CPU. |
Co-authored-by: Svetlana Karslioglu <[email protected]>
Co-authored-by: Svetlana Karslioglu <[email protected]>
Thanks, @svekars I will continue checking the other tutorials. |
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.
Sounds good!
For #3113
Motivation
As titled, we aim to use accelerator API to refine the build model tutorial to make it device-agnostic.
Additional Context
This is my first PR to pytorch/tutorials
Checklist
cc @subramen @albanD @jbschlosser