Added CUDA support for complex input for torch.solve (#47045)
Summary:
`torch.solve` now works for complex inputs on GPU.
I moved the existing tests to `test_linalg.py` and modified them to test complex and float32 dtypes.
Differentiation also works correctly with complex inputs.
Fixes https://github.com/pytorch/pytorch/issues/41084
Ref. https://github.com/pytorch/pytorch/issues/33152
anjali411 I hope you don't mind that I took over https://github.com/pytorch/pytorch/pull/42737
Pull Request resolved: https://github.com/pytorch/pytorch/pull/47045
Reviewed By: nikithamalgifb
Differential Revision: D24921503
Pulled By: anjali411
fbshipit-source-id: 4c3fc4f193a84b6e28c43c08672d480715000923