-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[BUG] Update usage of deprecated amp APIs #3331
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
Comments
Hi @svekars, I am working on this issue, can you please assign it to me? |
Thank you @svekars, I think the branch is merged with changes for this issue. Also do you think it's more appropriate to use torch.amp.autocast(...) instead of torch.autocast(....) / torch.amp.GradScaler(...) instead of torch.GradScaler(...)? |
nWEIdia
pushed a commit
to nWEIdia/pytorch
that referenced
this issue
Jun 2, 2025
Update usage of deprecated amp APIs. Fixes pytorch/tutorials#3331 Pull Request resolved: pytorch#154553 Approved by: https://github.com/Skylion007
qingyi-yan
pushed a commit
to qingyi-yan/pytorch
that referenced
this issue
Jun 3, 2025
Update usage of deprecated amp APIs. Fixes pytorch/tutorials#3331 Pull Request resolved: pytorch#154553 Approved by: https://github.com/Skylion007
iupaikov-amd
pushed a commit
to ROCm/pytorch
that referenced
this issue
Jun 4, 2025
Update usage of deprecated amp APIs. Fixes pytorch/tutorials#3331 Pull Request resolved: pytorch#154553 Approved by: https://github.com/Skylion007
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add Link
https://pytorch.org/docs/stable/amp.html
Describe the bug
See the link above for the list of deprecated APIs.
We need to fix:
And same for:
torch.cuda.amp.autocast(args...) and torch.cpu.amp.autocast(args...) will be deprecated. Please use torch.autocast("cuda", args...) or torch.autocast("cpu", args...) instead.
torch.cuda.amp.GradScaler(args...) and torch.cpu.amp.GradScaler(args...) will be deprecated. Please use torch.GradScaler("cuda", args...) or torch.GradScaler("cpu", args...) instead.
Describe your environment
The text was updated successfully, but these errors were encountered: