"""Create a LocalTensor from per-rank tensors.
// They operate on raw double arrays in row-major order. // LU decomposition with partial pivoting (in-place). // A is n x n row-major, piv[i] stores the row swapped with row i. // Returns the sign of ...