This function skips the (slow) error checking and error message construction
linalg_cholesky(), instead directly returning the LAPACK
error codes as part of a named tuple
(L, info). 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
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.
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,
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.
info contains positive integers, then a RuntimeError is thrown.
(Tensor): the Hermitian
(bool, optional): controls whether to check the content of
A is on a CUDA device, this function may synchronize that device with the CPU.
This function is "experimental" and it may change in a future PyTorch release.
linalg_cholesky() is a NumPy compatible variant that always checks for errors.
1 2 3 4 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.