Add serialization logic for complex numbers (#51287)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/51287
This reverts commit dfdb1547b9c1934904bfd137b4007d6a46a6f597.
Test Plan: Imported from OSS
Reviewed By: SplitInfinity
Differential Revision: D26131165
Pulled By: anjali411
fbshipit-source-id: 047167fac594ddb670c5e169446e90e74991679a