Improve torch.fft n-dimensional transforms (#46911)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/46911
Test Plan: Imported from OSS
Reviewed By: ngimel
Differential Revision: D25420647
Pulled By: mruberry
fbshipit-source-id: bf7e6a2ec41f9f95ffb05c128ee0f3297e34aae2