pytorch
f04106f1 - [FSDP][state_dict] Fix incorrect valid_data_size for local_state_dict when some ranks have zero data. (#94109)

Commit
3 years ago
[FSDP][state_dict] Fix incorrect valid_data_size for local_state_dict when some ranks have zero data. (#94109) When using `torch.chunks` to split the `flat_param`, some ranks may have zero data and `local_state_dict` does not handle the case correctly -- `local_state_dict` won't resize the local tensor to an empty one. This PR fixes the issue. Differential Revision: [D43004643](https://our.internmc.facebook.com/intern/diff/D43004643/) Pull Request resolved: https://github.com/pytorch/pytorch/pull/94109 Approved by: https://github.com/zhaojuanmao
Author
Committer
Parents
Loading