Sorting Batches for pack_padded_sequence

If I use the following code for sorting batches will I face issues while running on single/multiple GPUs? If so Could you please explain why.

make sure ur RNN is batch_first, it should be fine.