Computes the Cholesky decomposition of a complex Hermitian or real symmetric positive-definite matrix.
Letting be or ,
the of a complex Hermitian or real symmetric positive-definite matrix
is defined as
K
R
C
Cholesky decomposition
A∈Kn×n
A=LLHL∈Kn×n
where L is a lower triangular matrix with real positive diagonal (even in the complex case) and
LH is the conjugate transpose when L is complex, and the transpose when L is real-valued.
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.
Parameters:
A (Tensor) – tensor of shape (*, n, n) where * is zero or more batch dimensions
consisting of symmetric or Hermitian positive-definite matrices.
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.
out (Tensor, optional) – output tensor. Ignored if None. Default: None.
Raises:
RuntimeError – if the A matrix or any matrix in a batched A is not Hermitian
(resp. symmetric) positive-definite. If A is a batch of matrices,
the error message will include the batch index of the first matrix that fails
to meet this condition.