Fix bug in ShardedTensorMetadata serde. (#63902)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63902
The 'memory_format' field was not being serialized correctly and used
the same encoding for different fields.
ghstack-source-id: 137142406
Test Plan: waitforbuildbot
Reviewed By: bowangbj
Differential Revision: D30527324
fbshipit-source-id: f0f223e2d660ef6e4abae9649d9992acc36e1278