Eliminate global usage of torch.set_default_dtype in test_autograd (#56446)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/56446
Test Plan: Imported from OSS
Reviewed By: ngimel
Differential Revision: D28000589
Pulled By: mruberry
fbshipit-source-id: c8fb2907d656138e72ecf8fb3e572591f8972900