Automatic Mixed Precision package - PyTorch
https://pytorch.org/docs/stable/amp.htmlOrdinarily, “automatic mixed precision training” uses torch.cuda.amp.autocast and torch.cuda.amp.GradScaler together, as shown in the Automatic Mixed Precision examples and Automatic Mixed Precision recipe . However, autocast and GradScaler are modular, and may be used separately if desired. Autocasting Gradient Scaling Autocast Op Reference