Skip to content

[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

Open
svekars opened this issue Apr 16, 2025 · 0 comments
Open

[BUG] Update usage of deprecated amp APIs #3331

svekars opened this issue Apr 16, 2025 · 0 comments
Labels
amp Issues relating to the automatic mixed precision tutorial bug

Comments

@svekars
Copy link
Contributor

svekars commented Apr 16, 2025

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:

FutureWarning: `torch.cuda.amp.autocast(args...)` is deprecated. Please use `torch.amp.autocast('cuda', args...)` instead.

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

  • PyTorch 2.6 or later
@svekars svekars added amp Issues relating to the automatic mixed precision tutorial bug labels Apr 16, 2025
@svekars svekars changed the title [BUG] torch.cuda.amp.autocast with torch.amp.autocast [BUG] Update usage of deprecated amp APIs Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
amp Issues relating to the automatic mixed precision tutorial bug
Projects
None yet
Development

No branches or pull requests

1 participant