make apply_to_tensors support OrderedDict type (#75560)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75560
make apply_to_tensors support OrderedDict type
ghstack-source-id: 153492674
Test Plan: unit test
Reviewed By: rohan-varma
Differential Revision: D35524080
fbshipit-source-id: c71fa86ddb642b32aad6358fdcb040c4a0593f12
(cherry picked from commit 937f7acd65878cbea51e533fc4491fc577a904f7)