nn.Sort

Applies torch.sort along dimension dim to the input.
Returns a table of {sortedInputs, sortedIndices}
Used with BlockSparse