rebase for autocast updates to include device_type and dtype flags (#61002)
Summary:
Fixes #{55374}
https://github.com/pytorch/pytorch/issues/55374
Pull Request resolved: https://github.com/pytorch/pytorch/pull/61002
Reviewed By: malfet, mruberry
Differential Revision: D30016812
Pulled By: ngimel
fbshipit-source-id: 6e09a29f539d28e9aea5cd9489b1e633cc588033