Computes the Cholesky decomposition of a complex Hermitian or real
symmetric positive-definite matrix.
This function skips the (slow) error checking and error message construction
of , instead directly returning the LAPACK
error codes as part of a named tuple . This makes this function
a faster way to check if a matrix is positive-definite, and it provides an
opportunity to handle decomposition errors more gracefully or performantly
than does.
Supports input of float, double, cfloat and cdouble dtypes.
Also supports batches of matrices, and if A is a batch of matrices then
the output has the same batch dimensions.
If A is not a Hermitian positive-definite matrix, or if it’s a batch of matrices
and one or more of them is not a Hermitian positive-definite matrix,
then info stores a positive integer for the corresponding matrix.
The positive integer indicates the order of the leading minor that is not positive-definite,
and the decomposition could not be completed.
info filled with zeros indicates that the decomposition was successful.
If check_errors=True and info contains positive integers, then a RuntimeError is thrown.
Parameters:
A (Tensor) – the Hermitian n times n matrix or the batch of such matrices of size
(*, n, n) where * is one or more batch dimensions.
Keyword Arguments:
upper (bool, optional) – whether to return an upper triangular matrix.
The tensor returned with upper=True is the conjugate transpose of the tensor
returned with upper=False.
check_errors (bool, optional) – controls whether to check the content of infos. Default: False.
out (tuple, optional) – tuple of two tensors to write the output to. Ignored if None. Default: None.