o
    "Õj<  ã                   @   s(   d dl mZ dd„ Zdd„ Zdd„ ZdS )	é    )Úcorec                 C   s^   | dkrt | d ƒ}| d } n
t | d ƒ}| d } t | d ƒ}t | d ƒ}|› d|› d|› S )Ni'  iè  éd   Ú.)Úint)ÚverZNCCL_MAJOR_VERSIONZNCCL_MINOR_VERSIONZNCCL_PATCH_VERSION© r   úd/var/www/html/Deteccion_Ine/venv/lib/python3.10/site-packages/paddle/distributed/utils/nccl_utils.pyÚget_nccl_version_str   s   
r	   c                  C   s.   t  ¡ } t| ƒ}d}| |ksJ d |¡ƒ‚d S )Niô
  af  The version of NCCL is required to be at least v2.8.4 while training with pipeline/MoE parallelism, but we found v{}. The previous version of NCCL has some bugs in p2p communication, and you can see more detailed description about this issue from ReleaseNotes of NCCL v2.8.4 (https://docs.nvidia.com/deeplearning/nccl/release-notes/rel_2-8-4.html#rel_2-8-4).)r   Únccl_versionr	   Úformat)r
   Znccl_version_strÚnccl_version_baseliner   r   r   Úcheck_nccl_version_for_p2p!   s   
ÿûr   c                  C   s   t  ¡ } d}| |kS )NiR  )r   r
   )r
   r   r   r   r   Úcheck_nccl_version_for_bf160   s   r   N)Zpaddle.baser   r	   r   r   r   r   r   r   Ú<module>   s   