Computes the p-norm distance between every pair of row vectors in the input.
This is identical to the upper triangular portion, excluding the diagonal, of
torch_norm(input[:, None] - input, dim=2, p=p)
. This function will be faster
if the rows are contiguous.