[GLOO] handle empty split size (#43256)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/43256
* Handle empty split size by moving to call computeLengthsAndOffsets()
* Enable GLOO alltoall python tests
ghstack-source-id: 109292763
Test Plan:
buck build mode/dev-nosan caffe2/torch/lib/c10d:ProcessGroupGlooTest
./trainer_cmd.sh -p 16 -n 8 -d gloo (modify ./trainer_cmd.sh a bit)
Reviewed By: mingzhe09088
Differential Revision: D22961600
fbshipit-source-id: b9e90dadf7b45323b8af2e6cab2e156043b7743b