Add support for real and imag tensor attributes (#54692)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/54692
Test Plan: Imported from OSS
Reviewed By: ejguan
Differential Revision: D28412240
Pulled By: anjali411
fbshipit-source-id: e6965c55539a44260a812fdaa4a982f02067bb05