o
    + ië  ã                   @   sú   d Z dZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZg d¢Zg d¢Zd+dd„Zdefdd„Zdefdd„Zdefdd„Zdefdd„Zdefdd„Zdefdd „Zdefd!d"„Zdefd#d$„Zdefd%d&„Zdefd'd(„Zd)d*„ Z dS ),z3.2.1Ú3Ú2Ú1Z21602Ú0z11.8z8.9.7ÚFalseTZ(659ebc95069b4a5f34cf8102f0d0474fad5696c0ÚONz0.3.0z8.6.1ZOFF)é<   é=   éF   éK   éP   éV   )
ÚcudaÚcudnnÚncclÚshowÚxpuÚxpu_xreÚxpu_xcclÚxpu_xhpcÚtensorrtÚ
cuda_archsÚreturnNc                   C   s    t rtdtƒ tdtƒ tdtƒ tdtƒ tdtƒ ntdtƒ tdtƒ tdt	ƒ td	t
ƒ td
tƒ tdtƒ tdtƒ tdtƒ tdtƒ tdtƒ dS )a…  Get the version of paddle if `paddle` package if tagged. Otherwise, output the corresponding commit id.

    Returns:
        If paddle package is not tagged, the commit-id of paddle will be output.
        Otherwise, the following information will be output.

        full_version: version of paddle

        major: the major version of paddle

        minor: the minor version of paddle

        patch: the patch level version of paddle

        rc: whether it's rc version

        cuda: the cuda version of package. It will return `False` if CPU version paddle package is installed

        cudnn: the cudnn version of package. It will return `False` if CPU version paddle package is installed

        xpu_xre: the xpu xre version of package. It will return `False` if non-XPU version paddle package is installed

        xpu_xccl: the xpu xccl version of package. It will return `False` if non-XPU version paddle package is installed

        xpu_xhpc: the xpu xhpc version of package. It will return `False` if non-XPU version paddle package is installed

        cinn: the cinn version of package. It will return `False` if paddle package is not compiled with CINN

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> # Case 1: paddle is tagged with 2.2.0
            >>> paddle.version.show()
            >>> # doctest: +SKIP('Different environments yield different output.')
            full_version: 2.2.0
            major: 2
            minor: 2
            patch: 0
            rc: 0
            cuda: '10.2'
            cudnn: '7.6.5'
            xpu_xre: '4.32.0.1'
            xpu_xccl: '1.0.7'
            xpu_xhpc: '20231208'
            cinn: False
            >>> # doctest: -SKIP

            >>> # Case 2: paddle is not tagged
            >>> paddle.version.show()
            >>> # doctest: +SKIP('Different environments yield different output.')
            commit: cfa357e984bfd2ffa16820e354020529df434f7d
            cuda: '10.2'
            cudnn: '7.6.5'
            xpu_xre: '4.32.0.1'
            xpu_xccl: '1.0.7'
            xpu_xhpc: '20231208'
            cinn: False
            >>> # doctest: -SKIP
    zfull_version:zmajor:zminor:zpatch:zrc:zcommit:zcuda:zcudnn:znccl:zxpu_xre:z	xpu_xccl:z	xpu_xhpc:zcinn:ztensorrt_version:zcuda_archs:N)Ú	is_taggedÚprintÚfull_versionÚmajorÚminorÚpatchÚrcÚcommitÚcuda_versionÚcudnn_versionÚnccl_versionÚxpu_xre_versionÚxpu_xccl_versionÚxpu_xhpc_versionÚcinn_versionÚtensorrt_versionÚcompiled_cuda_archs© r)   r)   úc/home/app/PaddleOCR-VL-test/.venv_paddleocr/lib/python3.10/site-packages/paddle/version/__init__.pyr      s    >












r   c                   C   ó   t S )N)Úwith_mklr)   r)   r)   r*   Úmkli   s   r-   c                   C   r+   )a†  Get nccl version of paddle package.

    Returns:
        string: Return the version information of cuda nccl. If paddle package is CPU version, it will return False.

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> paddle.version.nccl()
            >>> # doctest: +SKIP('Different environments yield different output.')
            '2804'

    )r"   r)   r)   r)   r*   r   l   ó   r   c                   C   r+   )a  Get cuda version of paddle package.

    Returns:
        string: Return the version information of cuda. If paddle package is CPU version, it will return False.

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> paddle.version.cuda()
            >>> # doctest: +SKIP('Different environments yield different output.')
            '10.2'

    )r    r)   r)   r)   r*   r   ~   r.   r   c                   C   r+   )a…  Get cudnn version of paddle package.

    Returns:
        string: Return the version information of cudnn. If paddle package is CPU version, it will return False.

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> paddle.version.cudnn()
            >>> # doctest: +SKIP('Different environments yield different output.')
            '7.6.5'

    )r!   r)   r)   r)   r*   r      r.   r   c                   C   r+   )a¼  Get xpu version of paddle package. The API is deprecated now, please use xpu_xhpc() instead.

    Returns:
        string: Return the version information of xpu. If paddle package is non-XPU version, it will return False.
    Examples:
        .. code-block:: python
            >>> import paddle
            >>> paddle.version.xpu()
            >>> # doctest: +SKIP('Different environments yield different output.')
            '20230114'
    ©r%   r)   r)   r)   r*   r   ¢   s   r   c                   C   r+   )aŽ  Get xpu xre version of paddle package.

    Returns:
        string: Return the version information of xpu. If paddle package is non-XPU version, it will return False.

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> paddle.version.xpu_xre()
            >>> # doctest: +SKIP('Different environments yield different output.')
            '4.32.0.1'

    )r#   r)   r)   r)   r*   r   °   r.   r   c                   C   r+   )a’  Get xpu xccl version of paddle package.

    Returns:
        string: Return the version information of xpu xccl. If paddle package is non-XPU version, it will return False.

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> paddle.version.xpu_xccl()
            >>> # doctest: +SKIP('Different environments yield different output.')
            '1.0.7'

    )r$   r)   r)   r)   r*   r   Â   r.   r   c                   C   r+   )a•  Get xpu xhpc version of paddle package.

    Returns:
        string: Return the version information of xpu xhpc. If paddle package is non-XPU version, it will return False.

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> paddle.version.xpu_xhpc()
            >>> # doctest: +SKIP('Different environments yield different output.')
            '20231208'

    r/   r)   r)   r)   r*   r   Ô   r.   r   c                   C   r+   )a‹  Get CINN version of paddle package.

    Returns:
        string: Return the version information of CINN. If paddle package is not compiled with CINN, it will return False.

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> paddle.version.cinn()
            >>> # doctest: +SKIP('Different environments yield different output.')
            False

    )r&   r)   r)   r)   r*   Úcinnæ   r.   r0   c                   C   r+   )a›  Get TensorRT version of paddle package.

    Returns:
        string: Return the version information of TensorRT. If paddle package is not compiled with TensorRT, it will return False.

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> paddle.version.tensorrt()
            >>> # doctest: +SKIP('Different environments yield different output.')
            False

    )r'   r)   r)   r)   r*   r   ø   r.   r   c                   C   r+   )aš  Get compiled cuda archs of paddle package.

    Returns:
        list[int]: Return the compiled cuda archs if with gpu. If paddle package is not compiled with gpu, it will return "".

    Examples:
        .. code-block:: python

            >>> import paddle

            >>> paddle.version.cuda_archs()
            >>> # doctest: +SKIP('Different environments yield different output.')
            [86]

    )r(   r)   r)   r)   r*   r   
  r.   r   )r   N)!r   r   r   r   r"   r   r    r!   r#   r$   r%   r   r   r,   r&   r'   Zwith_pip_cuda_librariesZwith_pip_tensorrtr(   Ú__all__r   Ústrr-   r   r   r   r   r   r   r   r0   r   r   r)   r)   r)   r*   Ú<module>   s@   
P