def cholesky(x, upper=False, name=None):
    '\n    Computes the Cholesky decomposition of one symmetric positive-definite\n    matrix or batches of symmetric positive-definite matrice.\n\n    If `upper` is `True`, the decomposition has the form :math:`A = U^{T}U` ,\n    and the returned matrix :math:`U` is upper-triangular. Otherwise, the\n    decomposition has the form  :math:`A = LL^{T}` , and the returned matrix\n    :math:`L` is lower-triangular.\n\n    Args:\n        x (Tensor): The input tensor. Its shape should be `[*, M, M]`,\n            where * is zero or more batch dimensions, and matrices on the\n            inner-most 2 dimensions all should be symmetric positive-definite.\n            Its data type should be float32 or float64.\n        upper (bool): The flag indicating whether to return upper or lower\n            triangular matrices. Default: False.\n\n    Returns:\n        Tensor: A Tensor with same shape and data type as `x`. It represents \\\n            triangular matrices generated by Cholesky decomposition.\n\n    Examples:\n        .. code-block:: python\n\n            import paddle\n            import numpy as np\n\n            a = np.random.rand(3, 3)\n            a_t = np.transpose(a, [1, 0])\n            x_data = np.matmul(a, a_t) + 1e-03\n            x = paddle.to_tensor(x_data)\n            out = paddle.linalg.cholesky(x, upper=False)\n            print(out)\n            # [[1.190523   0.         0.        ]\n            #  [0.9906703  0.27676893 0.        ]\n            #  [1.25450498 0.05600871 0.06400121]]\n\n    '
    if paddle.in_dynamic_mode():
        return _C_ops.cholesky(x, 'upper', upper)
    check_variable_and_dtype(x, 'dtype', ['float32', 'float64'], 'cholesky')
    check_type(upper, 'upper', bool, 'cholesky')
    helper = LayerHelper('cholesky', **locals())
    out = helper.create_variable_for_type_inference(dtype=x.dtype)
    helper.append_op(type='cholesky', inputs={'X': [x]}, outputs={'Out': out}, attrs={'upper': upper})
    return out
Computes the Cholesky decomposition of one symmetric positive-definite
matrix or batches of symmetric positive-definite matrice.

If `upper` is `True`, the decomposition has the form :math:`A = U^{T}U` ,
and the returned matrix :math:`U` is upper-triangular. Otherwise, the
decomposition has the form  :math:`A = LL^{T}` , and the returned matrix
:math:`L` is lower-triangular.

Args:
    x (Tensor): The input tensor. Its shape should be `[*, M, M]`,
        where * is zero or more batch dimensions, and matrices on the
        inner-most 2 dimensions all should be symmetric positive-definite.
        Its data type should be float32 or float64.
    upper (bool): The flag indicating whether to return upper or lower
        triangular matrices. Default: False.

Returns:
    Tensor: A Tensor with same shape and data type as `x`. It represents \
        triangular matrices generated by Cholesky decomposition.

Examples:
    .. code-block:: python

        import paddle
        import numpy as np

        a = np.random.rand(3, 3)
        a_t = np.transpose(a, [1, 0])
        x_data = np.matmul(a, a_t) + 1e-03
        x = paddle.to_tensor(x_data)
        out = paddle.linalg.cholesky(x, upper=False)
        print(out)
        # [[1.190523   0.         0.        ]
        #  [0.9906703  0.27676893 0.        ]
        #  [1.25450498 0.05600871 0.06400121]]
def cholesky(x, upper=False, name=None):
    '\n    Computes the Cholesky decomposition of one symmetric positive-definite\n    matrix or batches of symmetric positive-definite matrice.\n\n    If `upper` is `True`, the decomposition has the form :math:`A = U^{T}U` ,\n    and the returned matrix :math:`U` is upper-triangular. Otherwise, the\n    decomposition has the form  :math:`A = LL^{T}` , and the returned matrix\n    :math:`L` is lower-triangular.\n\n    Args:\n        x (Tensor): The input tensor. Its shape should be `[*, M, M]`,\n            where * is zero or more batch dimensions, and matrices on the\n            inner-most 2 dimensions all should be symmetric positive-definite.\n            Its data type should be float32 or float64.\n        upper (bool): The flag indicating whether to return upper or lower\n            triangular matrices. Default: False.\n\n    Returns:\n        Tensor: A Tensor with same shape and data type as `x`. It represents \\\n            triangular matrices generated by Cholesky decomposition.\n\n    Examples:\n        .. code-block:: python\n\n            import paddle\n            import numpy as np\n\n            a = np.random.rand(3, 3)\n            a_t = np.transpose(a, [1, 0])\n            x_data = np.matmul(a, a_t) + 1e-03\n            x = paddle.to_tensor(x_data)\n            out = paddle.linalg.cholesky(x, upper=False)\n            print(out)\n            # [[1.190523   0.         0.        ]\n            #  [0.9906703  0.27676893 0.        ]\n            #  [1.25450498 0.05600871 0.06400121]]\n\n    '
    if paddle.in_dynamic_mode():
        return _C_ops.cholesky(x, 'upper', upper)
    check_variable_and_dtype(x, 'dtype', ['float32', 'float64'], 'cholesky')
    check_type(upper, 'upper', bool, 'cholesky')
    helper = LayerHelper('cholesky', **locals())
    out = helper.create_variable_for_type_inference(dtype=x.dtype)
    helper.append_op(type='cholesky', inputs={'X': [x]}, outputs={'Out': out}, attrs={'upper': upper})
    return out