Adding backward compatibility for sharding support in old DataLoader (#61237)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/61237
Test Plan: Imported from OSS
Reviewed By: ejguan
Differential Revision: D29588832
Pulled By: VitalyFedyunin
fbshipit-source-id: 3bfa4417f6a04450f656ecf28fc95322d2cf076a