trainer evaluation strucked when using dynamic padding in distributed evaluation
### System Info

tranasformer version=4.28.1
deepspeed=0.9.2

As I known, trainer evaluate func is distributed. when I use longest padding in every eval batch, the program will be strucked.  This won't happen when I use max_length padding.  I guess processes is structed because gather operation between different length tensors from different processes. Please fix this bug.

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

1.use longest padding
2.trainer evaluate in multi-gpus with deepspeed

### Expected behavior

the program won't struck
Without a code reproducer, there is nothing we can do. The Trainer will pad samples to the same length before gathering them, so this is already accounted for.<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.