In place sorting and don't keep the indices

Just wondering if there’s such thing as in place sorting in pytorch?

This comes handy when one is constraint by GPU memory size. I think torch.sort() allocate a new tensor for the sorted result. Doing something in place can double my batch size.

I was able to get only the sorted values and not indices by doing torch.sort()[0].