commit | bbf892dd58dcd8a5683b56a365489ecc6fc67b0c | [log] [tgz] |
---|---|---|
author | PyTorch MergeBot <pytorchmergebot@users.noreply.github.com> | Fri May 31 19:35:15 2024 +0000 |
committer | PyTorch MergeBot <pytorchmergebot@users.noreply.github.com> | Fri May 31 19:35:15 2024 +0000 |
tree | 15b2e48decf6a09348d923b60c6f2933e7029141 | |
parent | 11034448708ef878de9f0c0bbee595961b0c9d3b [diff] |
Revert "Add back private function torch.cuda.amp.autocast_mode._cast (#127433)" This reverts commit 6e0eeecc7cd4dc389683e35d1f2e34738e09e597. Reverted https://github.com/pytorch/pytorch/pull/127433 on behalf of https://github.com/fbgheith due to depends on https://github.com/pytorch/pytorch/pull/126898 which is failing internally and needs to be reverted ([comment](https://github.com/pytorch/pytorch/pull/127433#issuecomment-2142869610))
diff --git a/torch/cuda/amp/autocast_mode.py b/torch/cuda/amp/autocast_mode.py index 09a44f5..e50206c 100644 --- a/torch/cuda/amp/autocast_mode.py +++ b/torch/cuda/amp/autocast_mode.py
@@ -50,11 +50,6 @@ return super().__call__(func) -# Preserved only for BC reasons -def _cast(value, dtype): - return torch.amp.autocast_mode._cast(value, "cuda", dtype) - - @deprecated( "`torch.cuda.amp.custom_fwd(args...)` is deprecated. " "Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.",