torch.linalg.lu_factor
torch.linalg.lu_factor(A, *, bool pivot=True, out=None) -> (Tensor, Tensor)
Computes a compact representation of the LU factorization with
   partial pivoting of a matrix.
This function computes a compact representation of the
   decomposition given by "torch.linalg.lu()". If the matrix is
   square, this representation may be used in
   "torch.linalg.lu_solve()" to solve system of linear equations that
   share the matrix "A".
The returned decomposition is represented as a named tuple (LU,
   pivots). The "LU" matrix has the same shape as the input matrix
   "A". Its upper and lower triangular parts encode the non-constant
   elements of "L" and "U" of the LU decomposition of "A".
The returned permutation matrix is represented by a 1-indexed
   vector. pivots[i] == j represents that in the i-th step of the
   algorithm, the i-th row was permuted with the j-1-th row.
On CUDA, one may use "pivot"= False. In this case, this function