Run gradgradcheck on torch.fft transforms (#46004)
Summary:
Ref https://github.com/pytorch/pytorch/issues/42175
As already noted in the `torch.fft` `gradcheck` tests, `gradcheck` isn't fully working for complex types yet and the function inputs need to be real. A similar workaround for `gradgradcheck` works, viewing the complex outputs as real before returning them makes `gradgradcheck` pass.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/46004
Reviewed By: ngimel
Differential Revision: D24187000
Pulled By: mruberry
fbshipit-source-id: 33c2986b07bac282dff1bd4f2109beb70e47bf79