supporting complex with requires_grad in autodiff (#74339)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/65480
autodiff should propagate requires_grad for complex tensors as well as float tensors.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74339
Reviewed By: anjali411
Differential Revision: D34967622
Pulled By: eellison
fbshipit-source-id: 89d23469294c0191f3a5d1c8e1df3d34acc94056
(cherry picked from commit 712f8bdf03b072ab6f4ab90a64ccaad11d64c862)