apex
apex copied to clipboard
pytorch 1.8 dont have the func "get_autocast_gpu_dtype()"
File "/usr/local/lib/python3.7/dist-packages/apex/_autocast_utils.py", line 17, in _cast_if_autocast_enabled return torch.cuda.amp.autocast_mode._cast(args, torch.get_autocast_gpu_dtype())
AttributeError: module 'torch' has no attribute 'get_autocast_gpu_dtype'
Did you solve it? The same error came out.
use torch.cuda.amp

It's the torch version 1.9, but it can't be solved. What's the reason?
Dose anyone solve it? I encounter the same error with torch-1.9.0.
Dose anyone solve it? I encounter the same error with torch-1.9.0.
Update to torch-1.11 can solve this problem. torch-1.8 torch-1.9.0 do not have this function.